diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/WebCore/html/HTMLMetaElement.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/WebCore/html/HTMLMetaElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLMetaElement.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Source/WebCore/html/HTMLMetaElement.cpp b/Source/WebCore/html/HTMLMetaElement.cpp index 1e576d144..6f360fe2b 100644 --- a/Source/WebCore/html/HTMLMetaElement.cpp +++ b/Source/WebCore/html/HTMLMetaElement.cpp @@ -37,9 +37,9 @@ inline HTMLMetaElement::HTMLMetaElement(const QualifiedName& tagName, Document& ASSERT(hasTagName(metaTag)); } -Ref<HTMLMetaElement> HTMLMetaElement::create(const QualifiedName& tagName, Document& document) +PassRefPtr<HTMLMetaElement> HTMLMetaElement::create(const QualifiedName& tagName, Document& document) { - return adoptRef(*new HTMLMetaElement(tagName, document)); + return adoptRef(new HTMLMetaElement(tagName, document)); } void HTMLMetaElement::parseAttribute(const QualifiedName& name, const AtomicString& value) @@ -71,16 +71,22 @@ void HTMLMetaElement::process() if (contentValue.isNull()) return; - if (equalLettersIgnoringASCIICase(name(), "viewport")) + if (equalIgnoringCase(name(), "viewport")) document().processViewport(contentValue, ViewportArguments::ViewportMeta); #if PLATFORM(IOS) - else if (equalLettersIgnoringASCIICase(name(), "format-detection")) + else if (equalIgnoringCase(name(), "format-detection")) document().processFormatDetection(contentValue); - else if (equalLettersIgnoringASCIICase(name(), "apple-mobile-web-app-orientations")) + else if (equalIgnoringCase(name(), "apple-mobile-web-app-orientations")) document().processWebAppOrientations(); #endif - else if (equalLettersIgnoringASCIICase(name(), "referrer")) + else if (equalIgnoringCase(name(), "referrer")) document().processReferrerPolicy(contentValue); +#if ENABLE(LEGACY_VIEWPORT_ADAPTION) + else if (equalIgnoringCase(name(), "handheldfriendly") && equalIgnoringCase(contentValue, "true")) + document().processViewport("width=device-width", ViewportArguments::HandheldFriendlyMeta); + else if (equalIgnoringCase(name(), "mobileoptimized")) + document().processViewport("width=device-width, initial-scale=1", ViewportArguments::MobileOptimizedMeta); +#endif // Get the document to process the tag, but only if we're actually part of DOM tree (changing a meta tag while // it's not in the tree shouldn't have any effect on the document) @@ -89,17 +95,17 @@ void HTMLMetaElement::process() document().processHttpEquiv(httpEquivValue, contentValue); } -const AtomicString& HTMLMetaElement::content() const +String HTMLMetaElement::content() const { - return fastGetAttribute(contentAttr); + return getAttribute(contentAttr); } -const AtomicString& HTMLMetaElement::httpEquiv() const +String HTMLMetaElement::httpEquiv() const { - return fastGetAttribute(http_equivAttr); + return getAttribute(http_equivAttr); } -const AtomicString& HTMLMetaElement::name() const +String HTMLMetaElement::name() const { return getNameAttribute(); } |