Title: [125611] trunk/Source/WebKit/blackberry
Revision
125611
Author
commit-qu...@webkit.org
Date
2012-08-14 15:02:19 -0700 (Tue, 14 Aug 2012)

Log Message

[BlackBerry] Checkerboard flashes on Go Back
https://bugs.webkit.org/show_bug.cgi?id=94018

Patch by Leo Yang <leoy...@rim.com> on 2012-08-14
Reviewed by Yong Li.
Reviewed internally by Yong Li.

The backing store need to be suspended before the
WebPagePrivate::restoreHistoryViewState() is called to avoid UI thread
drawing checkerboard.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (125610 => 125611)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-08-14 21:36:08 UTC (rev 125610)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-08-14 22:02:19 UTC (rev 125611)
@@ -6424,10 +6424,11 @@
 
 void WebPagePrivate::restoreHistoryViewState(Platform::IntSize contentsSize, Platform::IntPoint scrollPosition, double scale, bool shouldReflowBlock)
 {
-    if (!m_mainFrame)
+    if (!m_mainFrame) {
+        m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
         return;
+    }
 
-    m_backingStore->d->suspendScreenAndBackingStoreUpdates(); // don't flash checkerboard for the setScrollPosition call
     m_mainFrame->view()->setContentsSizeFromHistory(contentsSize);
 
     // Here we need to set scroll position what we asked for.

Modified: trunk/Source/WebKit/blackberry/ChangeLog (125610 => 125611)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-08-14 21:36:08 UTC (rev 125610)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-08-14 22:02:19 UTC (rev 125611)
@@ -1,3 +1,20 @@
+2012-08-14  Leo Yang  <leoy...@rim.com>
+
+        [BlackBerry] Checkerboard flashes on Go Back
+        https://bugs.webkit.org/show_bug.cgi?id=94018
+
+        Reviewed by Yong Li.
+        Reviewed internally by Yong Li.
+
+        The backing store need to be suspended before the
+        WebPagePrivate::restoreHistoryViewState() is called to avoid UI thread
+        drawing checkerboard.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
+        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+        (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
+
 2012-08-14  Mike Fenton  <mifen...@rim.com>
 
         [BlackBerry] Remove unnecessary \n's from InputHandler log messages.

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (125610 => 125611)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-08-14 21:36:08 UTC (rev 125610)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-08-14 22:02:19 UTC (rev 125611)
@@ -1088,6 +1088,10 @@
     if (orientationChanged && viewState.isZoomToFitScale)
         scale = BlackBerry::Platform::Graphics::Screen::primaryScreen()->width() * scale / static_cast<double>(BlackBerry::Platform::Graphics::Screen::primaryScreen()->height());
 
+    // Don't flash checkerboard before WebPagePrivate::restoreHistoryViewState() finished.
+    // This call will be balanced by BackingStorePrivate::resumeScreenAndBackingStoreUpdates() in WebPagePrivate::restoreHistoryViewState().
+    m_webPagePrivate->m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+
     // It is not safe to render the page at this point. So we post a message instead. Messages have higher priority than timers.
     BlackBerry::Platform::webKitThreadMessageClient()->dispatchMessage(BlackBerry::Platform::createMethodCallMessage(
         &WebPagePrivate::restoreHistoryViewState, m_webPagePrivate, contentsSize, scrollPosition, scale, viewState.shouldReflowBlock));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to