diff options
Diffstat (limited to 'Source/WebCore')
-rw-r--r-- | Source/WebCore/dom/Document.cpp | 11 | ||||
-rw-r--r-- | Source/WebCore/dom/Document.h | 7 | ||||
-rw-r--r-- | Source/WebCore/html/HTMLMetaElement.cpp | 2 |
3 files changed, 18 insertions, 2 deletions
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 1ae3bae..7ba603b 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -2611,6 +2611,14 @@ Node* Document::nodeWithAbsIndex(int absIndex) return n; } +#ifdef ANDROID_META_SUPPORT +void Document::processMetadataSettings(const String& content) +{ + ASSERT(!content.isNull()); + processArguments(content, 0, 0); +} +#endif + void Document::processHttpEquiv(const String& equiv, const String& content) { ASSERT(!equiv.isNull() && !content.isNull()); @@ -2719,7 +2727,8 @@ void Document::processArguments(const String& features, void* data, ArgumentsCal if (frame()) frame()->settings()->setMetadataSettings(keyString, valueString); #endif - callback(keyString, valueString, this, data); + if (callback && data) + callback(keyString, valueString, this, data); } } diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h index ca304c1..179293c 100644 --- a/Source/WebCore/dom/Document.h +++ b/Source/WebCore/dom/Document.h @@ -793,6 +793,13 @@ public: void processHttpEquiv(const String& equiv, const String& content); void processViewport(const String& features); +#ifdef ANDROID_META_SUPPORT + /** + * Handles format-detection like <meta name = "format-detection" content = "telephone=no"> + */ + void processMetadataSettings(const String& content); +#endif + // Returns the owning element in the parent document. // Returns 0 if this is the top level document. HTMLFrameOwnerElement* ownerElement() const; diff --git a/Source/WebCore/html/HTMLMetaElement.cpp b/Source/WebCore/html/HTMLMetaElement.cpp index 493d4ac..cb7f4c0 100644 --- a/Source/WebCore/html/HTMLMetaElement.cpp +++ b/Source/WebCore/html/HTMLMetaElement.cpp @@ -80,7 +80,7 @@ void HTMLMetaElement::process() #ifdef ANDROID_META_SUPPORT // TODO: Evaluate whether to take upstreamed meta support else if (equalIgnoringCase(name(), "format-detection")) - document()->processViewport(m_content); + document()->processMetadataSettings(m_content); else if (((equalIgnoringCase(name(), "HandheldFriendly") && equalIgnoringCase(m_content, "true")) || equalIgnoringCase(name(), "MobileOptimized")) && document()->settings() && document()->settings()->viewportWidth() == -1) { |