<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[163980] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163980">163980</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-12 13:37:26 -0800 (Wed, 12 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
https://bugs.webkit.org/show_bug.cgi?id=128639

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2014-02-12
Reviewed by Andreas Kling.

Source/WebCore: 

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
Document::setDocType() has been removed and the doctype update code with it.
Add a call to didReceiveDocType() to ensure the viewport is updated when the doctype is parsed.

* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::didReceiveDocType):
* page/ChromeClient.h:
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::xhtmlMobileParameters):
* page/ViewportConfiguration.h:

Source/WebKit/ios: 

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::didReceiveMobileDocType):

Source/WebKit2: 

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::didReceiveMobileDocType):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didReceiveMobileDocType):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientsh">trunk/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#trunkSourceWebCorepageChromecpp">trunk/Source/WebCore/page/Chrome.cpp</a></li>
<li><a href="#trunkSourceWebCorepageChromeClienth">trunk/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#trunkSourceWebCorepageViewportConfigurationcpp">trunk/Source/WebCore/page/ViewportConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebCorepageViewportConfigurationh">trunk/Source/WebCore/page/ViewportConfiguration.h</a></li>
<li><a href="#trunkSourceWebKitiosChangeLog">trunk/Source/WebKit/ios/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitiosWebCoreSupportWebChromeClientIOSh">trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.h</a></li>
<li><a href="#trunkSourceWebKitiosWebCoreSupportWebChromeClientIOSmm">trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebChromeClientIOSmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/ChangeLog        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-02-12  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
+        https://bugs.webkit.org/show_bug.cgi?id=128639
+
+        Reviewed by Andreas Kling.
+
+        * WebCore.exp.in:
+        * dom/Document.cpp:
+        (WebCore::Document::childrenChanged):
+        Document::setDocType() has been removed and the doctype update code with it.
+        Add a call to didReceiveDocType() to ensure the viewport is updated when the doctype is parsed.
+
+        * loader/EmptyClients.h:
+        * page/Chrome.cpp:
+        (WebCore::Chrome::didReceiveDocType):
+        * page/ChromeClient.h:
+        * page/ViewportConfiguration.cpp:
+        (WebCore::ViewportConfiguration::xhtmlMobileParameters):
+        * page/ViewportConfiguration.h:
+
</ins><span class="cx"> 2014-02-12  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Mountain Lion build fix.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -856,6 +856,7 @@
</span><span class="cx"> __ZN7WebCore21ViewportConfiguration17webpageParametersEv
</span><span class="cx"> __ZN7WebCore21ViewportConfiguration20setMinimumLayoutSizeERKNS_7IntSizeE
</span><span class="cx"> __ZN7WebCore21ViewportConfiguration20setViewportArgumentsERKNS_17ViewportArgumentsE
</span><ins>+__ZN7WebCore21ViewportConfiguration21xhtmlMobileParametersEv
</ins><span class="cx"> __ZN7WebCore21ViewportConfiguration22textDocumentParametersEv
</span><span class="cx"> __ZN7WebCore21ViewportConfiguration23imageDocumentParametersEv
</span><span class="cx"> __ZN7WebCore21ViewportConfiguration23setDefaultConfigurationERKNS0_10ParametersE
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -797,6 +797,13 @@
</span><span class="cx"> {
</span><span class="cx">     ContainerNode::childrenChanged(change);
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    // FIXME: Chrome::didReceiveDocType() used to be called only when the doctype changed. We need to check the
+    // impact of calling this systematically. If the overhead is negligible, we need to rename didReceiveDocType,
+    // otherwise, we need to detect the doc type changes before updating the viewport.
+    page()-&gt;chrome().didReceiveDocType(frame());
+#endif
+
</ins><span class="cx">     Element* newDocumentElement = childrenOfType&lt;Element&gt;(*this).first();
</span><span class="cx">     if (newDocumentElement == m_documentElement)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.h (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.h        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/loader/EmptyClients.h        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     virtual void didPreventDefaultForEvent() override { }
</span><span class="cx"> #endif
</span><del>-    virtual void didReceiveMobileDocType() override { }
</del><ins>+    virtual void didReceiveMobileDocType(bool) override { }
</ins><span class="cx">     virtual void setNeedsScrollNotifications(Frame*, bool) override { }
</span><span class="cx">     virtual void observedContentChange(Frame*) override { }
</span><span class="cx">     virtual void clearContentChangeObservers(Frame*) override { }
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Chrome.cpp (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Chrome.cpp        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/page/Chrome.cpp        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -605,15 +605,10 @@
</span><span class="cx">     if (!frame-&gt;isMainFrame())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    DocumentType* documentType = frame-&gt;document()-&gt;doctype();
-    if (!documentType) {
-        // FIXME: We should notify the client when &lt;!DOCTYPE&gt; is removed so that
-        // it can adjust the viewport accordingly. See &lt;rdar://problem/15417894&gt;.
-        return;
-    }
-
-    if (documentType-&gt;publicId().contains(&quot;xhtml mobile&quot;, false))
-        m_client.didReceiveMobileDocType();
</del><ins>+    bool hasMobileDocType = false;
+    if (DocumentType* documentType = frame-&gt;document()-&gt;doctype())
+        hasMobileDocType = documentType-&gt;publicId().contains(&quot;xhtml mobile&quot;, false);
+    m_client.didReceiveMobileDocType(hasMobileDocType);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ChromeClient.h (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ChromeClient.h        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/page/ChromeClient.h        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    virtual void didReceiveMobileDocType() = 0;
</del><ins>+    virtual void didReceiveMobileDocType(bool) = 0;
</ins><span class="cx">     virtual void setNeedsScrollNotifications(Frame*, bool) = 0;
</span><span class="cx">     virtual void observedContentChange(Frame*) = 0;
</span><span class="cx">     virtual void clearContentChangeObservers(Frame*) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorepageViewportConfigurationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ViewportConfiguration.cpp (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ViewportConfiguration.cpp        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/page/ViewportConfiguration.cpp        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -180,6 +180,13 @@
</span><span class="cx">     return parameters;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ViewportConfiguration::Parameters ViewportConfiguration::xhtmlMobileParameters()
+{
+    Parameters parameters = webpageParameters();
+    parameters.width = 320;
+    return parameters;
+}
+
</ins><span class="cx"> static inline bool viewportArgumentValueIsValid(float value)
</span><span class="cx"> {
</span><span class="cx">     return value &gt; 0;
</span></span></pre></div>
<a id="trunkSourceWebCorepageViewportConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ViewportConfiguration.h (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ViewportConfiguration.h        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebCore/page/ViewportConfiguration.h        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx">     static Parameters webpageParameters();
</span><span class="cx">     static Parameters textDocumentParameters();
</span><span class="cx">     static Parameters imageDocumentParameters();
</span><ins>+    static Parameters xhtmlMobileParameters();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void updateConfiguration();
</span></span></pre></div>
<a id="trunkSourceWebKitiosChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/ChangeLog (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/ChangeLog        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit/ios/ChangeLog        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-02-12  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
+        https://bugs.webkit.org/show_bug.cgi?id=128639
+
+        Reviewed by Andreas Kling.
+
+        * WebCoreSupport/WebChromeClientIOS.h:
+        * WebCoreSupport/WebChromeClientIOS.mm:
+        (WebChromeClientIOS::didReceiveMobileDocType):
+
</ins><span class="cx"> 2014-02-08  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fix after r163739.
</span></span></pre></div>
<a id="trunkSourceWebKitiosWebCoreSupportWebChromeClientIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.h (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.h        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.h        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     virtual void didPreventDefaultForEvent() override;
</span><span class="cx"> #endif
</span><del>-    virtual void didReceiveMobileDocType() override;
</del><ins>+    virtual void didReceiveMobileDocType(bool) override;
</ins><span class="cx">     virtual void setNeedsScrollNotifications(WebCore::Frame*, bool) override;
</span><span class="cx">     virtual void observedContentChange(WebCore::Frame*) override;
</span><span class="cx">     virtual void clearContentChangeObservers(WebCore::Frame*) override;
</span></span></pre></div>
<a id="trunkSourceWebKitiosWebCoreSupportWebChromeClientIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -131,9 +131,10 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebChromeClientIOS::didReceiveMobileDocType()
</del><ins>+void WebChromeClientIOS::didReceiveMobileDocType(bool isMobileDoctype)
</ins><span class="cx"> {
</span><del>-    [[webView() _UIKitDelegateForwarder] webViewDidReceiveMobileDocType:webView() ];
</del><ins>+    if (isMobileDoctype)
+        [[webView() _UIKitDelegateForwarder] webViewDidReceiveMobileDocType:webView()];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClientIOS::setNeedsScrollNotifications(WebCore::Frame* frame, bool flag)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-02-12  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype
+        https://bugs.webkit.org/show_bug.cgi?id=128639
+
+        Reviewed by Andreas Kling.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
+        (WebKit::WebChromeClient::didReceiveMobileDocType):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::didReceiveMobileDocType):
+
</ins><span class="cx"> 2014-02-12  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WKProcessClass.h and WKNavigationResponse.h should be public headers
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    virtual void didReceiveMobileDocType() override;
</del><ins>+    virtual void didReceiveMobileDocType(bool) override;
</ins><span class="cx">     virtual void setNeedsScrollNotifications(WebCore::Frame*, bool) override;
</span><span class="cx">     virtual void observedContentChange(WebCore::Frame*) override;
</span><span class="cx">     virtual void clearContentChangeObservers(WebCore::Frame*) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebChromeClientIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx">     m_page-&gt;elementDidBlur(const_cast&lt;WebCore::Node*&gt;(node));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebChromeClient::didReceiveMobileDocType()
</del><ins>+void WebChromeClient::didReceiveMobileDocType(bool isMobileDoctype)
</ins><span class="cx"> {
</span><del>-    // FIXME: update the ViewportConfiguration accordingly.
</del><ins>+    m_page-&gt;didReceiveMobileDocType(isMobileDoctype);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::setNeedsScrollNotifications(WebCore::Frame*, bool)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -423,6 +423,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     void viewportPropertiesDidChange(const WebCore::ViewportArguments&amp;);
</span><ins>+    void didReceiveMobileDocType(bool);
</ins><span class="cx"> 
</span><span class="cx">     double minimumPageScaleFactor() const;
</span><span class="cx">     double maximumPageScaleFactor() const;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (163979 => 163980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-02-12 21:27:22 UTC (rev 163979)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-02-12 21:37:26 UTC (rev 163980)
</span><span class="lines">@@ -89,6 +89,14 @@
</span><span class="cx">     viewportConfigurationChanged();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPage::didReceiveMobileDocType(bool isMobileDoctype)
+{
+    if (isMobileDoctype)
+        m_viewportConfiguration.setDefaultConfiguration(ViewportConfiguration::xhtmlMobileParameters());
+    else
+        m_viewportConfiguration.setDefaultConfiguration(ViewportConfiguration::webpageParameters());
+}
+
</ins><span class="cx"> double WebPage::minimumPageScaleFactor() const
</span><span class="cx"> {
</span><span class="cx">     return m_viewportConfiguration.minimumScale();
</span></span></pre>
</div>
</div>

</body>
</html>