-
jesus@webkit.org authored
[Qt] QtWebKit does not support viewport meta tag https://bugs.webkit.org/show_bug.cgi?id=39902 Patch by Jesus Sanchez-Palencia <jesus@webkit.org>, Kenneth Rohde Christiansen <kenneth@webkit.org> on 2010-06-01 Reviewed by Simon Hausmann. WebCore: Add windowRect() to page client. * platform/qt/QWebPageClient.h: WebKit/qt: This implements didReceiveViewportArguments in our ChromeClientQt which is hooked up with QWebPage::viewportChangeRequested(). This signal does not affect the current default behavior. The documentation of the signal explains how to make use of this new feature. * Api/qwebframe_p.h: (QWebFramePrivate::QWebFramePrivate): Store information about whether the page has been laid out or not. * Api/qwebpage.cpp: (QWebPage::viewportChangeRequested): * Api/qwebpage_p.h: Added class QtViewportHintsPrivate. * Api/qwebpage.h: (QWebPage::setPreferredContentsSize): Improved documentation and now only layout if the page had already passed layout phase. Added class QWebPage::ViewportHints. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::windowRect): Modified to work as intended by the DOM, for both QWebView and QGraphicsWebView. (WebCore::ChromeClientQt::didReceiveViewportArguments): Emits the signal QWebPage::viewportChangeRequested. * WebCoreSupport/ChromeClientQt.h: * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad): (WebCore::FrameLoaderClientQt::dispatchDidFirstLayout): Update information about whether the page has been laid out or not. If the page has been laid out we ignore any further viewport meta data. * WebCoreSupport/PageClientQt.cpp: (WebCore::PageClientQWidget::windowRect): (WebCore::PageClientQGraphicsWidget::windowRect): (WebCore::PageClientQGraphicsWidget::graphicsItemVisibleRect): * WebCoreSupport/PageClientQt.h: The PageClient is now responsible for providing the right window rect. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
640b6b2f