Changeset 163980 in webkit
- Timestamp:
- Feb 12, 2014 1:37:26 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r163978 r163980 1 2014-02-12 Benjamin Poulain <bpoulain@apple.com> 2 3 [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype 4 https://bugs.webkit.org/show_bug.cgi?id=128639 5 6 Reviewed by Andreas Kling. 7 8 * WebCore.exp.in: 9 * dom/Document.cpp: 10 (WebCore::Document::childrenChanged): 11 Document::setDocType() has been removed and the doctype update code with it. 12 Add a call to didReceiveDocType() to ensure the viewport is updated when the doctype is parsed. 13 14 * loader/EmptyClients.h: 15 * page/Chrome.cpp: 16 (WebCore::Chrome::didReceiveDocType): 17 * page/ChromeClient.h: 18 * page/ViewportConfiguration.cpp: 19 (WebCore::ViewportConfiguration::xhtmlMobileParameters): 20 * page/ViewportConfiguration.h: 21 1 22 2014-02-12 Alexey Proskuryakov <ap@apple.com> 2 23 -
trunk/Source/WebCore/WebCore.exp.in
r163978 r163980 857 857 __ZN7WebCore21ViewportConfiguration20setMinimumLayoutSizeERKNS_7IntSizeE 858 858 __ZN7WebCore21ViewportConfiguration20setViewportArgumentsERKNS_17ViewportArgumentsE 859 __ZN7WebCore21ViewportConfiguration21xhtmlMobileParametersEv 859 860 __ZN7WebCore21ViewportConfiguration22textDocumentParametersEv 860 861 __ZN7WebCore21ViewportConfiguration23imageDocumentParametersEv -
trunk/Source/WebCore/dom/Document.cpp
r163863 r163980 798 798 ContainerNode::childrenChanged(change); 799 799 800 #if PLATFORM(IOS) 801 // FIXME: Chrome::didReceiveDocType() used to be called only when the doctype changed. We need to check the 802 // impact of calling this systematically. If the overhead is negligible, we need to rename didReceiveDocType, 803 // otherwise, we need to detect the doc type changes before updating the viewport. 804 page()->chrome().didReceiveDocType(frame()); 805 #endif 806 800 807 Element* newDocumentElement = childrenOfType<Element>(*this).first(); 801 808 if (newDocumentElement == m_documentElement) -
trunk/Source/WebCore/loader/EmptyClients.h
r163920 r163980 192 192 virtual void didPreventDefaultForEvent() override { } 193 193 #endif 194 virtual void didReceiveMobileDocType( ) override { }194 virtual void didReceiveMobileDocType(bool) override { } 195 195 virtual void setNeedsScrollNotifications(Frame*, bool) override { } 196 196 virtual void observedContentChange(Frame*) override { } -
trunk/Source/WebCore/page/Chrome.cpp
r163726 r163980 606 606 return; 607 607 608 DocumentType* documentType = frame->document()->doctype(); 609 if (!documentType) { 610 // FIXME: We should notify the client when <!DOCTYPE> is removed so that 611 // it can adjust the viewport accordingly. See <rdar://problem/15417894>. 612 return; 613 } 614 615 if (documentType->publicId().contains("xhtml mobile", false)) 616 m_client.didReceiveMobileDocType(); 608 bool hasMobileDocType = false; 609 if (DocumentType* documentType = frame->document()->doctype()) 610 hasMobileDocType = documentType->publicId().contains("xhtml mobile", false); 611 m_client.didReceiveMobileDocType(hasMobileDocType); 617 612 } 618 613 #endif -
trunk/Source/WebCore/page/ChromeClient.h
r163863 r163980 227 227 228 228 #if PLATFORM(IOS) 229 virtual void didReceiveMobileDocType( ) = 0;229 virtual void didReceiveMobileDocType(bool) = 0; 230 230 virtual void setNeedsScrollNotifications(Frame*, bool) = 0; 231 231 virtual void observedContentChange(Frame*) = 0; -
trunk/Source/WebCore/page/ViewportConfiguration.cpp
r163839 r163980 181 181 } 182 182 183 ViewportConfiguration::Parameters ViewportConfiguration::xhtmlMobileParameters() 184 { 185 Parameters parameters = webpageParameters(); 186 parameters.width = 320; 187 return parameters; 188 } 189 183 190 static inline bool viewportArgumentValueIsValid(float value) 184 191 { -
trunk/Source/WebCore/page/ViewportConfiguration.h
r163839 r163980 86 86 static Parameters textDocumentParameters(); 87 87 static Parameters imageDocumentParameters(); 88 static Parameters xhtmlMobileParameters(); 88 89 89 90 private: -
trunk/Source/WebKit/ios/ChangeLog
r163740 r163980 1 2014-02-12 Benjamin Poulain <bpoulain@apple.com> 2 3 [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype 4 https://bugs.webkit.org/show_bug.cgi?id=128639 5 6 Reviewed by Andreas Kling. 7 8 * WebCoreSupport/WebChromeClientIOS.h: 9 * WebCoreSupport/WebChromeClientIOS.mm: 10 (WebChromeClientIOS::didReceiveMobileDocType): 11 1 12 2014-02-08 Ryosuke Niwa <rniwa@webkit.org> 2 13 -
trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.h
r163724 r163980 49 49 virtual void didPreventDefaultForEvent() override; 50 50 #endif 51 virtual void didReceiveMobileDocType( ) override;51 virtual void didReceiveMobileDocType(bool) override; 52 52 virtual void setNeedsScrollNotifications(WebCore::Frame*, bool) override; 53 53 virtual void observedContentChange(WebCore::Frame*) override; -
trunk/Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm
r163079 r163980 132 132 #endif 133 133 134 void WebChromeClientIOS::didReceiveMobileDocType() 135 { 136 [[webView() _UIKitDelegateForwarder] webViewDidReceiveMobileDocType:webView() ]; 134 void WebChromeClientIOS::didReceiveMobileDocType(bool isMobileDoctype) 135 { 136 if (isMobileDoctype) 137 [[webView() _UIKitDelegateForwarder] webViewDidReceiveMobileDocType:webView()]; 137 138 } 138 139 -
trunk/Source/WebKit2/ChangeLog
r163977 r163980 1 2014-02-12 Benjamin Poulain <bpoulain@apple.com> 2 3 [WK2][iOS] Add back the special viewport for the old xhtml mobile doctype 4 https://bugs.webkit.org/show_bug.cgi?id=128639 5 6 Reviewed by Andreas Kling. 7 8 * WebProcess/WebCoreSupport/WebChromeClient.h: 9 * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: 10 (WebKit::WebChromeClient::didReceiveMobileDocType): 11 * WebProcess/WebPage/WebPage.h: 12 * WebProcess/WebPage/ios/WebPageIOS.mm: 13 (WebKit::WebPage::didReceiveMobileDocType): 14 1 15 2014-02-12 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r163863 r163980 157 157 158 158 #if PLATFORM(IOS) 159 virtual void didReceiveMobileDocType( ) override;159 virtual void didReceiveMobileDocType(bool) override; 160 160 virtual void setNeedsScrollNotifications(WebCore::Frame*, bool) override; 161 161 virtual void observedContentChange(WebCore::Frame*) override; -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm
r163515 r163980 52 52 } 53 53 54 void WebChromeClient::didReceiveMobileDocType( )54 void WebChromeClient::didReceiveMobileDocType(bool isMobileDoctype) 55 55 { 56 // FIXME: update the ViewportConfiguration accordingly.56 m_page->didReceiveMobileDocType(isMobileDoctype); 57 57 } 58 58 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r163948 r163980 424 424 #if PLATFORM(IOS) 425 425 void viewportPropertiesDidChange(const WebCore::ViewportArguments&); 426 void didReceiveMobileDocType(bool); 426 427 427 428 double minimumPageScaleFactor() const; -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r163919 r163980 90 90 } 91 91 92 void WebPage::didReceiveMobileDocType(bool isMobileDoctype) 93 { 94 if (isMobileDoctype) 95 m_viewportConfiguration.setDefaultConfiguration(ViewportConfiguration::xhtmlMobileParameters()); 96 else 97 m_viewportConfiguration.setDefaultConfiguration(ViewportConfiguration::webpageParameters()); 98 } 99 92 100 double WebPage::minimumPageScaleFactor() const 93 101 {
Note: See TracChangeset
for help on using the changeset viewer.