https://bugs.webkit.org/show_bug.cgi?id=66067
Reviewed by Darin Fisher.
* public/WebView.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::pageScaleFactor):
* src/WebViewImpl.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93007
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-08-12 Fady Samuel <fsamuel@chromium.org>
+
+ Expose pageScaleFactor() to Chromium's WebViewImpl
+ https://bugs.webkit.org/show_bug.cgi?id=66067
+
+ Reviewed by Darin Fisher.
+
+ * public/WebView.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::pageScaleFactor):
+ * src/WebViewImpl.h:
+
2011-08-12 Sadrul Habib Chowdhury <sadrul@chromium.org>
Wire gesture tap events, add support for gesture events in the DRT and add a layout test for it.
WEBKIT_EXPORT static double zoomLevelToZoomFactor(double zoomLevel);
WEBKIT_EXPORT static double zoomFactorToZoomLevel(double factor);
+ // Gets the scale factor of the page, where 1.0 is the normal size, > 1.0
+ // is scaled up, < 1.0 is scaled down.
+ virtual float pageScaleFactor() const = 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.
// On the other hand, zooming affects layout of the page.
return log(factor) / log(textSizeMultiplierRatio);
}
+float WebViewImpl::pageScaleFactor() const
+{
+ if (!page())
+ return 1.0;
+
+ Frame* frame = page()->mainFrame();
+ if (!frame)
+ return 1.0;
+
+ return frame->pageScaleFactor();
+}
+
void WebViewImpl::scalePage(float scaleFactor, WebPoint origin)
{
if (!page())
virtual double setZoomLevel(bool textOnly, double zoomLevel);
virtual void zoomLimitsChanged(double minimumZoomLevel,
double maximumZoomLevel);
+ virtual float pageScaleFactor() const;
virtual void scalePage(float scaleFactor, WebPoint origin);
virtual void performMediaPlayerAction(
const WebMediaPlayerAction& action,