| Index: Source/core/html/HTMLMetaElement.cpp
|
| diff --git a/Source/core/html/HTMLMetaElement.cpp b/Source/core/html/HTMLMetaElement.cpp
|
| index d84b68b69beff8c9a3f9de0fa963db86d88817ea..4a43932fcff6095705f89dd133084661c9408bf9 100644
|
| --- a/Source/core/html/HTMLMetaElement.cpp
|
| +++ b/Source/core/html/HTMLMetaElement.cpp
|
| @@ -405,24 +405,30 @@ void HTMLMetaElement::process()
|
| if (!inDocument())
|
| return;
|
|
|
| + // All below situations require a content attribute (which can be the empty string).
|
| const AtomicString& contentValue = fastGetAttribute(contentAttr);
|
| if (contentValue.isNull())
|
| return;
|
|
|
| - if (equalIgnoringCase(name(), "viewport"))
|
| + const AtomicString& nameValue = fastGetAttribute(nameAttr);
|
| + if (nameValue.isNull()) {
|
| + // 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)
|
| + const AtomicString& httpEquivValue = fastGetAttribute(http_equivAttr);
|
| + if (!httpEquivValue.isNull())
|
| + document().processHttpEquiv(httpEquivValue, contentValue);
|
| + return;
|
| + }
|
| +
|
| + if (equalIgnoringCase(nameValue, "viewport"))
|
| processViewportContentAttribute(contentValue, ViewportDescription::ViewportMeta);
|
| - else if (equalIgnoringCase(name(), "referrer"))
|
| + else if (equalIgnoringCase(nameValue, "referrer"))
|
| document().processReferrerPolicy(contentValue);
|
| - else if (equalIgnoringCase(name(), "handheldfriendly") && equalIgnoringCase(contentValue, "true"))
|
| + else if (equalIgnoringCase(nameValue, "handheldfriendly") && equalIgnoringCase(contentValue, "true"))
|
| processViewportContentAttribute("width=device-width", ViewportDescription::HandheldFriendlyMeta);
|
| - else if (equalIgnoringCase(name(), "mobileoptimized"))
|
| + else if (equalIgnoringCase(nameValue, "mobileoptimized"))
|
| processViewportContentAttribute("width=device-width, initial-scale=1", ViewportDescription::MobileOptimizedMeta);
|
| -
|
| - // 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)
|
| - const AtomicString& httpEquivValue = fastGetAttribute(http_equivAttr);
|
| - if (!httpEquivValue.isNull())
|
| - document().processHttpEquiv(httpEquivValue, contentValue);
|
| }
|
|
|
| String HTMLMetaElement::content() const
|
|
|