Title: [92980] trunk/Source/WebKit/chromium
Revision
92980
Author
[email protected]
Date
2011-08-12 12:38:44 -0700 (Fri, 12 Aug 2011)

Log Message

Unreviewed, rolling out r92978.
http://trac.webkit.org/changeset/92978
https://bugs.webkit.org/show_bug.cgi?id=66155

This patch does not compile (Requested by abarth|gardener on
#webkit).

Patch by Sheriff Bot <[email protected]> on 2011-08-12

* public/WebView.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::zoomLevel):
(WebKit::WebViewImpl::setZoomLevel):
(WebKit::WebViewImpl::zoomLimitsChanged):
(WebKit::WebViewImpl::fullFramePluginZoomLevelChanged):
(WebKit::WebView::zoomLevelToZoomFactor):
(WebKit::WebView::zoomFactorToZoomLevel):
* src/WebViewImpl.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (92979 => 92980)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-08-12 18:56:44 UTC (rev 92979)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-08-12 19:38:44 UTC (rev 92980)
@@ -1,3 +1,22 @@
+2011-08-12  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r92978.
+        http://trac.webkit.org/changeset/92978
+        https://bugs.webkit.org/show_bug.cgi?id=66155
+
+        This patch does not compile (Requested by abarth|gardener on
+        #webkit).
+
+        * public/WebView.h:
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::zoomLevel):
+        (WebKit::WebViewImpl::setZoomLevel):
+        (WebKit::WebViewImpl::zoomLimitsChanged):
+        (WebKit::WebViewImpl::fullFramePluginZoomLevelChanged):
+        (WebKit::WebView::zoomLevelToZoomFactor):
+        (WebKit::WebView::zoomFactorToZoomLevel):
+        * src/WebViewImpl.h:
+
 2011-08-12  Fady Samuel  <[email protected]>
 
         Chromium's WebKit API should use floats instead of doubles for zoom to match WebCore

Modified: trunk/Source/WebKit/chromium/public/WebView.h (92979 => 92980)


--- trunk/Source/WebKit/chromium/public/WebView.h	2011-08-12 18:56:44 UTC (rev 92979)
+++ trunk/Source/WebKit/chromium/public/WebView.h	2011-08-12 19:38:44 UTC (rev 92980)
@@ -182,7 +182,7 @@
     // of 300% and 50% of original size, respectively.  Only plugins use
     // non whole-numbers, since they might choose to have specific zoom level so
     // that fixed-width content is fit-to-page-width, for example.
-    virtual float zoomLevel() const = 0;
+    virtual double zoomLevel() = 0;
 
     // Changes the zoom level to the specified level, clamping at the limits
     // noted above, and returns the current zoom level after applying the
@@ -192,16 +192,16 @@
     // page will be zoomed. You can only have either text zoom or full page zoom
     // at one time.  Changing the mode while the page is zoomed will have odd
     // effects.
-    virtual float setZoomLevel(bool textOnly, float zoomLevel) = 0;
+    virtual double setZoomLevel(bool textOnly, double zoomLevel) = 0;
 
     // Updates the zoom limits for this view.
-    virtual void zoomLimitsChanged(float minimumZoomLevel,
-                                   float maximumZoomLevel) = 0;
+    virtual void zoomLimitsChanged(double minimumZoomLevel,
+                                   double maximumZoomLevel) = 0;
 
     // Helper functions to convert between zoom level and zoom factor.  zoom
     // factor is zoom percent / 100, so 300% = 3.0.
-    WEBKIT_EXPORT static float zoomLevelToZoomFactor(float zoomLevel);
-    WEBKIT_EXPORT static float zoomFactorToZoomLevel(float factor);
+    WEBKIT_EXPORT static double zoomLevelToZoomFactor(double zoomLevel);
+    WEBKIT_EXPORT static double zoomFactorToZoomLevel(double factor);
 
     // 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.

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (92979 => 92980)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-08-12 18:56:44 UTC (rev 92979)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-08-12 19:38:44 UTC (rev 92980)
@@ -1781,12 +1781,12 @@
     }
 }
 
-float WebViewImpl::zoomLevel() const
+double WebViewImpl::zoomLevel()
 {
     return m_zoomLevel;
 }
 
-float WebViewImpl::setZoomLevel(bool textOnly, float zoomLevel)
+double WebViewImpl::setZoomLevel(bool textOnly, double zoomLevel)
 {
     if (zoomLevel < m_minimumZoomLevel)
         m_zoomLevel = m_minimumZoomLevel;
@@ -1800,7 +1800,7 @@
     if (pluginContainer)
         pluginContainer->plugin()->setZoomLevel(m_zoomLevel, textOnly);
     else {
-        float zoomFactor = zoomLevelToZoomFactor(m_zoomLevel);
+        float zoomFactor = static_cast<float>(zoomLevelToZoomFactor(m_zoomLevel));
         if (textOnly)
             frame->setPageAndTextZoomFactors(1, zoomFactor);
         else
@@ -1809,15 +1809,15 @@
     return m_zoomLevel;
 }
 
-void WebViewImpl::zoomLimitsChanged(float minimumZoomLevel,
-                                    float maximumZoomLevel)
+void WebViewImpl::zoomLimitsChanged(double minimumZoomLevel,
+                                    double maximumZoomLevel)
 {
     m_minimumZoomLevel = minimumZoomLevel;
     m_maximumZoomLevel = maximumZoomLevel;
     m_client->zoomLimitsChanged(m_minimumZoomLevel, m_maximumZoomLevel);
 }
 
-void WebViewImpl::fullFramePluginZoomLevelChanged(float zoomLevel)
+void WebViewImpl::fullFramePluginZoomLevelChanged(double zoomLevel)
 {
     if (zoomLevel == m_zoomLevel)
         return;
@@ -1826,12 +1826,12 @@
     m_client->zoomLevelChanged();
 }
 
-float WebView::zoomLevelToZoomFactor(float zoomLevel)
+double WebView::zoomLevelToZoomFactor(double zoomLevel)
 {
     return pow(textSizeMultiplierRatio, zoomLevel);
 }
 
-float WebView::zoomFactorToZoomLevel(float factor)
+double WebView::zoomFactorToZoomLevel(double factor)
 {
     // Since factor = 1.2^level, level = log(factor) / log(1.2)
     return log(factor) / log(textSizeMultiplierRatio);

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (92979 => 92980)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2011-08-12 18:56:44 UTC (rev 92979)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2011-08-12 19:38:44 UTC (rev 92980)
@@ -151,10 +151,10 @@
     virtual void setInitialFocus(bool reverse);
     virtual void clearFocusedNode();
     virtual void scrollFocusedNodeIntoView();
-    virtual float zoomLevel() const;
-    virtual float setZoomLevel(bool textOnly, float zoomLevel);
-    virtual void zoomLimitsChanged(float minimumZoomLevel,
-                                   float maximumZoomLevel);
+    virtual double zoomLevel();
+    virtual double setZoomLevel(bool textOnly, double zoomLevel);
+    virtual void zoomLimitsChanged(double minimumZoomLevel,
+                                   double maximumZoomLevel);
     virtual void scalePage(float scaleFactor, WebPoint origin);
     virtual void performMediaPlayerAction(
         const WebMediaPlayerAction& action,
@@ -394,7 +394,7 @@
     // zoom level has been updated.  The plugin should only call this function
     // if the zoom change was triggered by the browser, it's only needed in case
     // a plugin can update its own zoom, say because of its own UI.
-    void fullFramePluginZoomLevelChanged(float zoomLevel);
+    void fullFramePluginZoomLevelChanged(double zoomLevel);
 
 #if ENABLE(GESTURE_RECOGNIZER)
     void resetGestureRecognizer();
@@ -493,11 +493,11 @@
 
     // Keeps track of the current zoom level. 0 means no zoom, positive numbers
     // mean zoom in, negative numbers mean zoom out.
-    float m_zoomLevel;
+    double m_zoomLevel;
 
-    float m_minimumZoomLevel;
+    double m_minimumZoomLevel;
 
-    float m_maximumZoomLevel;
+    double m_maximumZoomLevel;
 
     bool m_contextMenuAllowed;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to