summaryrefslogtreecommitdiffstats
path: root/WebCore/dom
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-09-08 18:51:19 -0700
committerGrace Kloba <klobag@google.com>2009-09-08 19:02:26 -0700
commitf366646be4d60317eae7a689d6dd643fb6d77ae8 (patch)
tree7655d9fba48d13b90414a0548cc5affc3e4764e4 /WebCore/dom
parent1203a808ccf7c707a8bb93b2e25e71118f793b18 (diff)
downloadexternal_webkit-f366646be4d60317eae7a689d6dd643fb6d77ae8.zip
external_webkit-f366646be4d60317eae7a689d6dd643fb6d77ae8.tar.gz
external_webkit-f366646be4d60317eae7a689d6dd643fb6d77ae8.tar.bz2
Move mobile doctype check from HTMLDocument to Document so that it will cover xhtml case like http://us.m1.yahoo.com.
Fix http://b/issue?id=2102284
Diffstat (limited to 'WebCore/dom')
-rw-r--r--WebCore/dom/Document.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 066cf46..c510669 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -547,6 +547,15 @@ void Document::setDocType(PassRefPtr<DocumentType> docType)
m_docType = docType;
if (m_docType)
m_docType->setDocument(this);
+#ifdef ANDROID_META_SUPPORT
+ if (!ownerElement() && m_docType->publicId().startsWith("-//wapforum//dtd xhtml mobile 1.", false)) {
+ // fit mobile sites directly in the screen
+ frame()->settings()->setMetadataSettings("width", "device-width");
+ FrameView* frameView = view();
+ if (frameView)
+ android::WebViewCore::getWebViewCore(frameView)->updateViewport();
+ }
+#endif
determineParseMode();
}