- Revision
- 99440
- Author
- [email protected]
- Date
- 2011-11-07 10:24:48 -0800 (Mon, 07 Nov 2011)
Log Message
[Chromium] Rename WebView::scalePage to WebView::setPageScaleFactor to match WebCore
https://bugs.webkit.org/show_bug.cgi?id=71485
Reviewed by Darin Fisher.
Source/WebKit/chromium:
Created new method setPageScaleFactor to replace scalePage to match
renamed method in WebCore. This change will happen in three stages:
1. A new method is created called setPageScaleFactor with the same
functionality as scalePage.
2. All call sites of scalePage are changed to setPageScaleFactor in the Chromium
repository.
3. scalePage is deleted from WebView/WebViewImpl
* public/WebView.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::pageScaleFactor):
(WebKit::WebViewImpl::scalePage):
(WebKit::WebViewImpl::setPageScaleFactor):
* src/WebViewImpl.h:
Tools:
* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::scalePageBy):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::resetTestController):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (99439 => 99440)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-07 18:16:33 UTC (rev 99439)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-07 18:24:48 UTC (rev 99440)
@@ -1,3 +1,26 @@
+2011-11-07 Fady Samuel <[email protected]>
+
+ [Chromium] Rename WebView::scalePage to WebView::setPageScaleFactor to match WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=71485
+
+ Reviewed by Darin Fisher.
+
+ Created new method setPageScaleFactor to replace scalePage to match
+ renamed method in WebCore. This change will happen in three stages:
+
+ 1. A new method is created called setPageScaleFactor with the same
+ functionality as scalePage.
+ 2. All call sites of scalePage are changed to setPageScaleFactor in the Chromium
+ repository.
+ 3. scalePage is deleted from WebView/WebViewImpl
+
+ * public/WebView.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::pageScaleFactor):
+ (WebKit::WebViewImpl::scalePage):
+ (WebKit::WebViewImpl::setPageScaleFactor):
+ * src/WebViewImpl.h:
+
2011-11-07 Jessie Berlin <[email protected]>
Need a way to allow a scheme access to Local Storage and Databases while Private Browsing is
Modified: trunk/Source/WebKit/chromium/public/WebView.h (99439 => 99440)
--- trunk/Source/WebKit/chromium/public/WebView.h 2011-11-07 18:16:33 UTC (rev 99439)
+++ trunk/Source/WebKit/chromium/public/WebView.h 2011-11-07 18:24:48 UTC (rev 99440)
@@ -211,10 +211,13 @@
// is scaled up, < 1.0 is scaled down.
virtual float pageScaleFactor() const = 0;
+ // FIXME: Delete this once Chromium side has been updated.
+ virtual void scalePage(float scaleFactor, const WebPoint& origin) = 0;
+
// Scales a page by a factor of scaleFactor and then sets a scroll position to (x, y).
- // scalePage() magnifies and shrinks a page without affecting layout.
+ // setPageScaleFactor() magnifies and shrinks a page without affecting layout.
// On the other hand, zooming affects layout of the page.
- virtual void scalePage(float scaleFactor, WebPoint origin) = 0;
+ virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) = 0;
// The ratio of the current device's screen DPI to the target device's screen DPI.
virtual float deviceScaleFactor() const = 0;
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (99439 => 99440)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-11-07 18:16:33 UTC (rev 99439)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-11-07 18:24:48 UTC (rev 99440)
@@ -1841,13 +1841,18 @@
float WebViewImpl::pageScaleFactor() const
{
if (!page())
- return 1.0;
+ return 1;
return page()->pageScaleFactor();
}
-void WebViewImpl::scalePage(float scaleFactor, WebPoint origin)
+void WebViewImpl::scalePage(float scaleFactor, const WebPoint& origin)
{
+ setPageScaleFactor(scaleFactor, origin);
+}
+
+void WebViewImpl::setPageScaleFactor(float scaleFactor, const WebPoint& origin)
+{
if (!page())
return;
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (99439 => 99440)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.h 2011-11-07 18:16:33 UTC (rev 99439)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h 2011-11-07 18:24:48 UTC (rev 99440)
@@ -158,7 +158,8 @@
virtual void zoomLimitsChanged(double minimumZoomLevel,
double maximumZoomLevel);
virtual float pageScaleFactor() const;
- virtual void scalePage(float scaleFactor, WebPoint origin);
+ virtual void scalePage(float scaleFactor, const WebPoint& origin);
+ virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin);
virtual float deviceScaleFactor() const;
virtual void setDeviceScaleFactor(float);
virtual bool isFixedLayoutModeEnabled() const;
Modified: trunk/Tools/ChangeLog (99439 => 99440)
--- trunk/Tools/ChangeLog 2011-11-07 18:16:33 UTC (rev 99439)
+++ trunk/Tools/ChangeLog 2011-11-07 18:24:48 UTC (rev 99440)
@@ -1,3 +1,15 @@
+2011-11-07 Fady Samuel <[email protected]>
+
+ [Chromium] Rename WebView::scalePage to WebView::setPageScaleFactor to match WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=71485
+
+ Reviewed by Darin Fisher.
+
+ * DumpRenderTree/chromium/EventSender.cpp:
+ (EventSender::scalePageBy):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::resetTestController):
+
2011-11-07 Tor Arne Vestbø <[email protected]>
[Qt] Put the jsc binary in 'bin' instead of leaving it deep in the build tree
Modified: trunk/Tools/DumpRenderTree/chromium/EventSender.cpp (99439 => 99440)
--- trunk/Tools/DumpRenderTree/chromium/EventSender.cpp 2011-11-07 18:16:33 UTC (rev 99439)
+++ trunk/Tools/DumpRenderTree/chromium/EventSender.cpp 2011-11-07 18:24:48 UTC (rev 99440)
@@ -716,7 +716,7 @@
float scaleFactor = static_cast<float>(arguments[0].toDouble());
int x = arguments[1].toInt32();
int y = arguments[2].toInt32();
- webview()->scalePage(scaleFactor, WebPoint(x, y));
+ webview()->setPageScaleFactor(scaleFactor, WebPoint(x, y));
result->setNull();
}
Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (99439 => 99440)
--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2011-11-07 18:16:33 UTC (rev 99439)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2011-11-07 18:24:48 UTC (rev 99440)
@@ -270,7 +270,7 @@
m_drtDevToolsAgent->reset();
if (m_drtDevToolsClient)
m_drtDevToolsClient->reset();
- webView()->scalePage(1, WebPoint(0, 0));
+ webView()->setPageScaleFactor(1, WebPoint(0, 0));
webView()->enableFixedLayoutMode(false);
webView()->setFixedLayoutSize(WebSize(0, 0));
webView()->mainFrame()->clearOpener();