Title: [135672] trunk/Source/WebKit/blackberry
Revision
135672
Author
[email protected]
Date
2012-11-25 11:06:22 -0800 (Sun, 25 Nov 2012)

Log Message

[BlackBerry] Get rid of resetBitmapZoomScale()
https://bugs.webkit.org/show_bug.cgi?id=103200

Patch by Jacky Jiang  <[email protected]>.
Reviewed by Rob Buis.
Internally reviewed by Gen Mak.

PR: 235707
Right now, resetBitmapZoomScale() takes an unused paramter and
dispatches a message to end the bitmap zooming. However, the
interaction has its own state machine to start bitmap zooming when it
is active and end bitmap zooming when it is inactive. This is
expecially for pinch zoom and scroll. From WebKit side, block zoom
which will call zoomBlock when the bitmap zoom finished doesn't even
need to dispatch the useless ending message to ZoomHandler.
resetBitmapZoomScale() is basically a noop for block zoom. And likewise
that is useless for zoomToInitialScaleOnLoad(). It can also potentially
cause problem if it is used somewhere else in the future and
incidentally breaks the interaction's own state machine. So just remove
this completely.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
(BlackBerry::WebKit::WebPagePrivate::zoomBlock):
* Api/WebPageClient.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (135671 => 135672)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-11-25 18:51:36 UTC (rev 135671)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-11-25 19:06:22 UTC (rev 135672)
@@ -1636,7 +1636,6 @@
         BBLOG(Platform::LogLevelInfo, "WebPagePrivate::zoomToInitialScaleOnLoad content is empty!");
 #endif
         requestLayoutIfNeeded();
-        m_client->resetBitmapZoomScale(currentScale());
         notifyTransformedContentsSizeChanged();
         return;
     }
@@ -1667,7 +1666,6 @@
     if (!performedZoom) {
         // We only notify if we didn't perform zoom, because zoom will notify on
         // its own...
-        m_client->resetBitmapZoomScale(currentScale());
         notifyTransformedContentsSizeChanged();
     }
 }
@@ -2959,7 +2957,6 @@
     TransformationMatrix zoom;
     zoom.scale(m_blockZoomFinalScale);
     *m_transformationMatrix = zoom;
-    m_client->resetBitmapZoomScale(m_blockZoomFinalScale);
     // FIXME: Do we really need to suspend/resume both backingstore and screen here?
     m_backingStore->d->suspendBackingStoreUpdates();
     m_backingStore->d->suspendScreenUpdates();

Modified: trunk/Source/WebKit/blackberry/Api/WebPageClient.h (135671 => 135672)


--- trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2012-11-25 18:51:36 UTC (rev 135671)
+++ trunk/Source/WebKit/blackberry/Api/WebPageClient.h	2012-11-25 19:06:22 UTC (rev 135672)
@@ -201,7 +201,6 @@
 
     virtual BlackBerry::Platform::ViewportAccessor* userInterfaceViewportAccessor() const = 0;
 
-    virtual void resetBitmapZoomScale(double scale) = 0;
     virtual void animateBlockZoom(double finalScale, const Platform::FloatPoint& finalDocumentScrollPosition) = 0;
 
     virtual void setPreventsScreenIdleDimming(bool noDimming) = 0;

Modified: trunk/Source/WebKit/blackberry/ChangeLog (135671 => 135672)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-11-25 18:51:36 UTC (rev 135671)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-11-25 19:06:22 UTC (rev 135672)
@@ -1,3 +1,30 @@
+2012-11-25  Jacky Jiang  <[email protected]>
+
+        [BlackBerry] Get rid of resetBitmapZoomScale()
+        https://bugs.webkit.org/show_bug.cgi?id=103200
+
+        Reviewed by Rob Buis.
+        Internally reviewed by Gen Mak.
+
+        PR: 235707
+        Right now, resetBitmapZoomScale() takes an unused paramter and
+        dispatches a message to end the bitmap zooming. However, the
+        interaction has its own state machine to start bitmap zooming when it
+        is active and end bitmap zooming when it is inactive. This is
+        expecially for pinch zoom and scroll. From WebKit side, block zoom
+        which will call zoomBlock when the bitmap zoom finished doesn't even
+        need to dispatch the useless ending message to ZoomHandler.
+        resetBitmapZoomScale() is basically a noop for block zoom. And likewise
+        that is useless for zoomToInitialScaleOnLoad(). It can also potentially
+        cause problem if it is used somewhere else in the future and
+        incidentally breaks the interaction's own state machine. So just remove
+        this completely.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
+        (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
+        * Api/WebPageClient.h:
+
 2012-11-24  Andy Chen  <[email protected]>
 
         [BlackBerry] Find-on-page keeps stale pointer
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to