Remove unnecessary constraint in WebCore of choosing either text zoom or full page...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Sep 2010 04:01:43 +0000 (04:01 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Sep 2010 04:01:43 +0000 (04:01 +0000)
commite245a5c6d8b455c5447c0d47b11e57d3cb95cacb
treef89ce2edc4de65b6328e67a8c7563256b8df0a66
parent6ba1b26cfd565ab102b1370d85ace0bb4a2c0efa
Remove unnecessary constraint in WebCore of choosing either text zoom or full page zoom.
Precursor to <rdar://problem/7660657>
https://bugs.webkit.org/show_bug.cgi?id=45522

Reviewed by Darin Adler.

WebCore:

* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Remove ZoomMode.h

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
(WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
Remove uses of shouldApplyTextZoom(), it had turned into just a compare to 1.0f.

* html/HTMLBodyElement.cpp:
(WebCore::adjustForZoom):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::setScrollTop):
Convert these to use the explicit pageZoomFactor() function, it made no sense for text zoom
anyway.

* page/Frame.h:
Remove include of ZoomMode.h

* page/FrameView.cpp:
(WebCore::parentPageZoomFactor):
(WebCore::parentTextZoomFactor):
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setPageZoomFactor):
(WebCore::FrameView::setTextZoomFactor):
(WebCore::FrameView::setPageAndTextZoomFactors):
* page/FrameView.h:
(WebCore::FrameView::pageZoomFactor):
(WebCore::FrameView::textZoomFactor):
Change FrameView to store two values for zoom, one for page zoom and one for text zoom.

* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
Removed zoom mode.

* page/ZoomMode.h: Removed.

* rendering/RenderView.cpp:
(WebCore::RenderView::zoomFactor):
Remove now unnecessary call to shouldApplyPageZoom since it will be 1 if it should
be ignored.

* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setCurrentScale):
Use explicit setPageZoomFactor function.

WebKit/chromium:

* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::createPlugin):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::setZoomLevel):
* src/WebViewImpl.h:
(WebKit::WebViewImpl::zoomTextOnly):
Move tracking of text only zoom here from WebCore.

WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_get_zoom_level):
(webkit_web_view_apply_zoom_level):
(webkit_web_view_set_full_content_zoom):

WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChangedNotification:]):
(-[WebView _setZoomMultiplier:isTextOnly:]):
(-[WebView _realZoomMultiplierIsTextOnly]):
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebViewPrivate init]):
Move tracking of text only zoom here from WebCore.

WebKit/qt:

* Api/qwebframe.cpp:
(QWebFrame::setTextSizeMultiplier):
(QWebFrame::textSizeMultiplier):
(QWebFrame::setZoomFactor):
(QWebFrame::zoomFactor):
* Api/qwebframe_p.h:
(QWebFramePrivate::QWebFramePrivate):
Move tracking of text only zoom here from WebCore.

WebKit/win:

* WebFrame.cpp:
* WebFrame.h:
Remove dead code.

* WebView.cpp:
(WebView::WebView):
(WebView::setZoomMultiplier):
(WebView::zoomMultiplier):
(WebView::canMakeTextLarger):
(WebView::makeTextLarger):
(WebView::canMakeTextSmaller):
(WebView::makeTextSmaller):
(WebView::notifyPreferencesChanged):
* WebView.h:
Move tracking of text only zoom here from WebCore.

WebKit2:

Now that WebCore doesn't require a mode, change the bundle API for zoom to not
require one either.

* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageStopLoading):
(WKBundlePageGetTextZoomFactor):
(WKBundlePageSetTextZoomFactor):
(WKBundlePageGetPageZoomFactor):
(WKBundlePageSetPageZoomFactor):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::textZoomFactor):
(WebKit::WebPage::setTextZoomFactor):
(WebKit::WebPage::pageZoomFactor):
(WebKit::WebPage::setPageZoomFactor):
* WebProcess/WebPage/WebPage.h:

WebKitTools:

Update for changes to the Bundle API to allow separate control of page and text zoom
levels.

* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::textZoomIn):
(WTR::EventSendingController::textZoomOut):
(WTR::EventSendingController::zoomPageIn):
(WTR::EventSendingController::zoomPageOut):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::reset):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@67274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
44 files changed:
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.exp.in
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/CSSStyleSelector.cpp
WebCore/html/HTMLBodyElement.cpp
WebCore/page/Frame.h
WebCore/page/FrameView.cpp
WebCore/page/FrameView.h
WebCore/page/Settings.cpp
WebCore/page/Settings.h
WebCore/page/ZoomMode.h [deleted file]
WebCore/rendering/RenderView.cpp
WebCore/svg/SVGSVGElement.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/src/FrameLoaderClientImpl.cpp
WebKit/chromium/src/WebViewImpl.cpp
WebKit/chromium/src/WebViewImpl.h
WebKit/gtk/ChangeLog
WebKit/gtk/webkit/webkitwebview.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebView.mm
WebKit/mac/WebView/WebViewData.h
WebKit/mac/WebView/WebViewData.mm
WebKit/qt/Api/qwebframe.cpp
WebKit/qt/Api/qwebframe_p.h
WebKit/qt/ChangeLog
WebKit/win/ChangeLog
WebKit/win/WebFrame.cpp
WebKit/win/WebFrame.h
WebKit/win/WebView.cpp
WebKit/win/WebView.h
WebKit2/ChangeLog
WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
WebKit2/WebProcess/WebPage/WebPage.cpp
WebKit2/WebProcess/WebPage/WebPage.h
WebKitTools/ChangeLog
WebKitTools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp