Add zoom support to WebKit2 API
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Sep 2010 06:45:41 +0000 (06:45 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Sep 2010 06:45:41 +0000 (06:45 +0000)
commitf309f7ccf996090fe0ae1990617a025898aead95
treeacff0e7b1af78e4ef0879859114c53b67486e7e0
parente1a4b9756e4abfc7afea45109088d781e6d9217f
Add zoom support to WebKit2 API
<rdar://problem/7660657>
https://bugs.webkit.org/show_bug.cgi?id=45585

Reviewed by Dan Bernstein.

WebKit2:

- Add UIProcess API for setting zoom factors.
- Change bundle zoom API to be in terms of doubles
  for consistency.

* Shared/CoreIPCSupport/WebPageMessageKinds.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetTextZoomFactor):
(WKPageSetTextZoomFactor):
(WKPageGetPageZoomFactor):
(WKPageSetPageZoomFactor):
(WKPageSetPageAndTextZoomFactors):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setTextZoomFactor):
(WebKit::WebPageProxy::setPageZoomFactor):
(WebKit::WebPageProxy::setPageAndTextZoomFactors):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::textZoomFactor):
(WebKit::WebPageProxy::pageZoomFactor):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetTextZoomFactor):
(WKBundlePageSetTextZoomFactor):
(WKBundlePageGetPageZoomFactor):
(WKBundlePageSetPageZoomFactor):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::textZoomFactor):
(WebKit::WebPage::setTextZoomFactor):
(WebKit::WebPage::pageZoomFactor):
(WebKit::WebPage::setPageZoomFactor):
(WebKit::WebPage::setPageAndTextZoomFactors):
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebPage/WebPage.h:

WebKitTools:

- Add zoom options to MiniBrowser that mimic Safari's options using
  the new WebKit2 zoom APIs.
- Switch uses of float for the zoom APIs to use double.

* MiniBrowser/mac/BrowserWindowController.h:
* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController initWithPageNamespace:]):
(-[BrowserWindowController validateMenuItem:]):
(-[BrowserWindowController validateUserInterfaceItem:]):
(-[BrowserWindowController currentZoomFactor]):
(-[BrowserWindowController setCurrentZoomFactor:]):
(-[BrowserWindowController canZoomIn]):
(-[BrowserWindowController zoomIn:]):
(-[BrowserWindowController canZoomOut]):
(-[BrowserWindowController zoomOut:]):
(-[BrowserWindowController canResetZoom]):
(-[BrowserWindowController resetZoom:]):
(-[BrowserWindowController toggleZoomMode:]):
* MiniBrowser/mac/MainMenu.xib:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::textZoomIn):
(WTR::EventSendingController::textZoomOut):
(WTR::EventSendingController::zoomPageIn):
(WTR::EventSendingController::zoomPageOut):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
WebKit2/ChangeLog
WebKit2/Shared/CoreIPCSupport/WebPageMessageKinds.h
WebKit2/UIProcess/API/C/WKPage.cpp
WebKit2/UIProcess/API/C/WKPage.h
WebKit2/UIProcess/WebPageProxy.cpp
WebKit2/UIProcess/WebPageProxy.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/MiniBrowser/mac/BrowserWindowController.h
WebKitTools/MiniBrowser/mac/BrowserWindowController.m
WebKitTools/MiniBrowser/mac/MainMenu.xib
WebKitTools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp