Title: [147747] trunk/Source/WebKit/blackberry
Revision
147747
Author
zhaji...@rim.com
Date
2013-04-05 08:26:48 -0700 (Fri, 05 Apr 2013)

Log Message

[BlackBerry] Blitting wrong rect during history navigations
https://bugs.webkit.org/show_bug.cgi?id=113963

Patch by Jacky Jiang <zhaji...@rim.com>.
Reviewed by Rob Buis.
Internally reviewed by Jakob Petsovits.

On www.bbc.com/news, we blit wrong rect during the second restoration
of the view states when we navigate back from stories to the main page.
Update the contents size and scroll position before we render and blit
if we failed to zoomAboutPoint so that UI thread can still get the
correct rect during blit.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (147746 => 147747)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-04-05 14:50:54 UTC (rev 147746)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-04-05 15:26:48 UTC (rev 147747)
@@ -6100,18 +6100,17 @@
 
     m_shouldReflowBlock = shouldReflowBlock;
 
-    bool didZoom = zoomAboutPoint(scale, m_mainFrame->view()->scrollPosition(), true /* enforceScaleClamping */, true /*forceRendering*/, true /*isRestoringZoomLevel*/);
+    if (!zoomAboutPoint(scale, m_mainFrame->view()->scrollPosition(), true /* enforceScaleClamping */, true /*forceRendering*/, true /*isRestoringZoomLevel*/)) {
+        // We need to notify the client of the scroll position and content size change(s) above even if we didn't scale.
+        notifyTransformedContentsSizeChanged();
+        notifyTransformedScrollChanged();
+    }
+
     // If we're already at that scale, then we should still force rendering
     // since our scroll position changed.
     // FIXME: Do we really need to suspend/resume both backingstore and screen here?
     m_backingStore->d->resumeBackingStoreUpdates();
     m_backingStore->d->resumeScreenUpdates(BackingStore::RenderAndBlit);
-
-    if (!didZoom) {
-        // We need to notify the client of the scroll position and content size change(s) above even if we didn't scale.
-        notifyTransformedContentsSizeChanged();
-        notifyTransformedScrollChanged();
-    }
 }
 
 IntSize WebPagePrivate::screenSize() const

Modified: trunk/Source/WebKit/blackberry/ChangeLog (147746 => 147747)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-04-05 14:50:54 UTC (rev 147746)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-04-05 15:26:48 UTC (rev 147747)
@@ -1,3 +1,20 @@
+2013-04-04  Jacky Jiang  <zhaji...@rim.com>
+
+        [BlackBerry] Blitting wrong rect during history navigations
+        https://bugs.webkit.org/show_bug.cgi?id=113963
+
+        Reviewed by Rob Buis.
+        Internally reviewed by Jakob Petsovits.
+
+        On www.bbc.com/news, we blit wrong rect during the second restoration
+        of the view states when we navigate back from stories to the main page.
+        Update the contents size and scroll position before we render and blit
+        if we failed to zoomAboutPoint so that UI thread can still get the
+        correct rect during blit.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
+
 2013-04-05  Jakob Petsovits  <jpetsov...@blackberry.com>
 
         [BlackBerry] Replace map{From,To}Transformed() with ViewportAccessor
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to