|
| 1 | +2011-08-18 Adam Roben < [email protected]> |
| 2 | + |
| 3 | + Make WebPageProxy keep track of the current device scale factor |
| 4 | + |
| 5 | + The device scale factor is no longer considered part of WebPageProxy's "view state". It now |
| 6 | + has its own setter/getter. This made the code a little simpler and more similar to the page |
| 7 | + scale factor. Each port-specific WebKit2 view is now responsible for calling |
| 8 | + WebPageProxy::setDeviceScaleFactor whenever it thinks the device scale factor might have |
| 9 | + changed. |
| 10 | + |
| 11 | + Fixes <http://webkit.org/b/66466> WebKit2 requires every port-specific view to keep track of |
| 12 | + the current device scale factor |
| 13 | + |
| 14 | + Reviewed by Anders Carlsson. |
| 15 | + |
| 16 | + * UIProcess/API/efl/PageClientImpl.cpp: |
| 17 | + * UIProcess/API/efl/PageClientImpl.h: |
| 18 | + * UIProcess/API/gtk/PageClientImpl.h: |
| 19 | + * UIProcess/API/mac/PageClientImpl.h: |
| 20 | + * UIProcess/API/mac/PageClientImpl.mm: |
| 21 | + * UIProcess/PageClient.h: |
| 22 | + * UIProcess/qt/QtWebPageProxy.h: |
| 23 | + * UIProcess/win/WebView.h: |
| 24 | + Removed deviceScaleFactor. |
| 25 | + |
| 26 | + * UIProcess/API/mac/WKView.mm: |
| 27 | + (-[WKView _deviceScaleFactor]): Added. Code came from PageClientImpl::deviceScaleFactor. |
| 28 | + (-[WKView _windowDidChangeResolution:]): Changed to call WebPageProxy::setDeviceScaleFactor. |
| 29 | + |
| 30 | + * UIProcess/WebPageProxy.cpp: |
| 31 | + (WebKit::WebPageProxy::WebPageProxy): Initialize m_deviceScaleFactor. |
| 32 | + (WebKit::WebPageProxy::viewStateDidChange): Removed device-scale-factor-related code. |
| 33 | + (WebKit::WebPageProxy::setDeviceScaleFactor): Added. Records the new device scale factor and |
| 34 | + tells the DrawingAreaProxy about it if it's actually changed. |
| 35 | + (WebKit::WebPageProxy::creationParameters): Use m_deviceScaleFactor instead of calling out |
| 36 | + to the PageClient. |
| 37 | + |
| 38 | + * UIProcess/WebPageProxy.h: Added m_deviceScaleFactor and setDeviceScaleFactor, which |
| 39 | + replaces the DeviceScaleFactor ViewStateFlag. |
| 40 | + (WebKit::WebPageProxy::deviceScaleFactor): Inlined this now-simple getter. |
| 41 | + |
1 | 42 | 2011-08-17 Adam Roben < [email protected]> |
2 | 43 |
|
3 | 44 | Make WebCore keep track of the current device scale factor |
|
0 commit comments