diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2011-07-01 17:06:05 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-01 17:06:05 -0700 |
commit | 84373792909396d36824255d643e86b3d3a2f28a (patch) | |
tree | bb4ff022d2de0702d3b6c36a75f6bd97c6a058af /Source/WebCore | |
parent | b18e666e226b16a009467f4c330cf66aa46f55d4 (diff) | |
parent | 94bd391238210e19ce80d03518fafab7d6d939b0 (diff) | |
download | external_webkit-84373792909396d36824255d643e86b3d3a2f28a.zip external_webkit-84373792909396d36824255d643e86b3d3a2f28a.tar.gz external_webkit-84373792909396d36824255d643e86b3d3a2f28a.tar.bz2 |
Merge "meta format-detection is not a viewport meta tag."
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) { |