Title: [134630] trunk/Source/WebKit/blackberry
Revision
134630
Author
[email protected]
Date
2012-11-14 11:03:10 -0800 (Wed, 14 Nov 2012)

Log Message

[BlackBerry] Break suspend/resume of the backingstore and screen into separate methods
https://bugs.webkit.org/show_bug.cgi?id=102126

Patch by Adam Treat <[email protected]> on 2012-11-14
Reviewed by George Staikos.
PR 219976

Modify the suspend/resume methods so that they can be called from the UI thread
itself and split up the suspend/resume methods so that we can suspend/resume
the screen or backingstore separately.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
(WebKit):
(BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates):
(BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
(BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
(BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
(BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
(BlackBerry::WebKit::BackingStore::suspendBackingStoreUpdates):
(BlackBerry::WebKit::BackingStore::resumeBackingStoreUpdates):
(BlackBerry::WebKit::BackingStore::suspendScreenUpdates):
(BlackBerry::WebKit::BackingStore::resumeScreenUpdates):
(BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
(BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
* Api/BackingStore.h:
* Api/BackingStore_p.h:
(BackingStorePrivate):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
(BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
(BlackBerry::WebKit::WebPagePrivate::zoomBlock):
(BlackBerry::WebKit::WebPage::destroy):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPagePrivate::setCompositor):
(BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
(BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::setBatchEditingActive):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore.cpp (134629 => 134630)


--- trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-11-14 18:53:36 UTC (rev 134629)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore.cpp	2012-11-14 19:03:10 UTC (rev 134630)
@@ -279,15 +279,23 @@
     return true;
 }
 
-void BackingStorePrivate::suspendScreenAndBackingStoreUpdates()
+void BackingStorePrivate::suspendBackingStoreUpdates()
 {
+    if (atomic_add_value(&m_suspendBackingStoreUpdates, 0)) {
+        BBLOG(BlackBerry::Platform::LogLevelInfo,
+            "Backingstore already suspended, increasing suspend counter.");
+    }
+
+    atomic_add(&m_suspendBackingStoreUpdates, 1);
+}
+
+void BackingStorePrivate::suspendScreenUpdates()
+{
     if (m_suspendScreenUpdates) {
         BBLOG(BlackBerry::Platform::LogLevelInfo,
-            "Screen and backingstore already suspended, increasing suspend counter.");
+            "Screen already suspended, increasing suspend counter.");
     }
 
-    ++m_suspendBackingStoreUpdates;
-
     // Make sure the user interface thread gets the message before we proceed
     // because blitVisibleContents() can be called from the user interface
     // thread and it must honor this flag.
@@ -296,17 +304,27 @@
     BlackBerry::Platform::userInterfaceThreadMessageClient()->syncToCurrentMessage();
 }
 
-void BackingStorePrivate::resumeScreenAndBackingStoreUpdates(BackingStore::ResumeUpdateOperation op)
+void BackingStorePrivate::resumeBackingStoreUpdates()
 {
+    bool isSuspended = atomic_add_value(&m_suspendBackingStoreUpdates, 0) >= 1;
+    ASSERT(isSuspended);
+    if (!isSuspended) {
+        BlackBerry::Platform::logAlways(BlackBerry::Platform::LogLevelCritical,
+            "Call mismatch: Backingstore hasn't been suspended, therefore won't resume!");
+        return;
+    }
+
+    atomic_sub(&m_suspendBackingStoreUpdates, 1);
+}
+
+
+void BackingStorePrivate::resumeScreenUpdates(BackingStore::ResumeUpdateOperation op)
+{
     ASSERT(m_suspendScreenUpdates);
-    ASSERT(m_suspendBackingStoreUpdates);
 
-    // Both variables are similar except for the timing of setting them.
-    ASSERT(m_suspendScreenUpdates == m_suspendBackingStoreUpdates);
-
-    if (!m_suspendScreenUpdates || !m_suspendBackingStoreUpdates) {
+    if (!m_suspendScreenUpdates) {
         BlackBerry::Platform::logAlways(BlackBerry::Platform::LogLevelCritical,
-            "Call mismatch: Screen and backingstore haven't been suspended, therefore won't resume!");
+            "Call mismatch: Screen hasn't been suspended, therefore won't resume!");
         return;
     }
 
@@ -315,16 +333,13 @@
         || (m_resumeOperation == BackingStore::None && op == BackingStore::Blit))
         m_resumeOperation = op;
 
-    if (m_suspendScreenUpdates >= 2 && m_suspendBackingStoreUpdates >= 2) { // we're still suspended
+    if (m_suspendScreenUpdates >= 2) { // we're still suspended
         BBLOG(BlackBerry::Platform::LogLevelInfo,
             "Screen and backingstore still suspended, decreasing suspend counter.");
-        --m_suspendBackingStoreUpdates;
         --m_suspendScreenUpdates;
         return;
     }
 
-    --m_suspendBackingStoreUpdates;
-
     op = m_resumeOperation;
     m_resumeOperation = BackingStore::None;
 
@@ -1290,6 +1305,10 @@
         viewportAccessor->scale());
 #endif
 
+#if DEBUG_CHECKERBOARD
+    bool blitCheckered = false;
+#endif
+
     Vector<TileBuffer*> blittedTiles;
 
     if (isActive() && !m_webPage->d->compositorDrawsRootLayer()) {
@@ -1316,10 +1335,6 @@
         if (!transformedSrcRect.isEmpty())
             transformation = TransformationMatrix::rectToRect(FloatRect(FloatPoint(0.0, 0.0), WebCore::IntSize(transformedSrcRect.size())), WebCore::IntRect(dstRect));
 
-#if DEBUG_CHECKERBOARD
-        bool blitCheckered = false;
-#endif
-
         // Don't clip to contents if it is empty so we can still paint default background.
         if (!transformedContentsRect.isEmpty()) {
             clippedTransformedSrcRect.intersect(transformedContentsRect);
@@ -2088,8 +2103,11 @@
     createVisibleTileBufferForWebPage(m_webPage->d);
 
     // Don't try to blit to screen unless we have a buffer.
-    if (!buffer())
-        suspendScreenAndBackingStoreUpdates();
+    if (!buffer()) {
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        suspendBackingStoreUpdates();
+        suspendScreenUpdates();
+    }
 }
 
 void BackingStorePrivate::createVisibleTileBuffer()
@@ -2632,16 +2650,26 @@
     d->m_webPage->setFocused(true);
 }
 
-void BackingStore::suspendScreenAndBackingStoreUpdates()
+void BackingStore::suspendBackingStoreUpdates()
 {
-    d->suspendScreenAndBackingStoreUpdates();
+    d->suspendBackingStoreUpdates();
 }
 
-void BackingStore::resumeScreenAndBackingStoreUpdates(ResumeUpdateOperation op)
+void BackingStore::resumeBackingStoreUpdates()
 {
-    d->resumeScreenAndBackingStoreUpdates(op);
+    d->resumeBackingStoreUpdates();
 }
 
+void BackingStore::suspendScreenUpdates()
+{
+    d->suspendScreenUpdates();
+}
+
+void BackingStore::resumeScreenUpdates(ResumeUpdateOperation op)
+{
+    d->resumeScreenUpdates(op);
+}
+
 bool BackingStore::isScrollingOrZooming() const
 {
     return d->isScrollingOrZooming();
@@ -2673,10 +2701,12 @@
 {
     if (BackingStorePrivate::s_currentBackingStoreOwner == d->m_webPage)
         SurfacePool::globalSurfacePool()->createBuffers();
+    resumeBackingStoreUpdates();
 }
 
 void BackingStore::releaseBackingStoreMemory()
 {
+    suspendBackingStoreUpdates();
     if (BackingStorePrivate::s_currentBackingStoreOwner == d->m_webPage)
         SurfacePool::globalSurfacePool()->releaseBuffers();
 }

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore.h (134629 => 134630)


--- trunk/Source/WebKit/blackberry/Api/BackingStore.h	2012-11-14 18:53:36 UTC (rev 134629)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore.h	2012-11-14 19:03:10 UTC (rev 134630)
@@ -53,9 +53,12 @@
 
     void createSurface();
 
-    void suspendScreenAndBackingStoreUpdates();
-    void resumeScreenAndBackingStoreUpdates(ResumeUpdateOperation);
+    void suspendBackingStoreUpdates();
+    void resumeBackingStoreUpdates();
 
+    void suspendScreenUpdates();
+    void resumeScreenUpdates(BackingStore::ResumeUpdateOperation);
+
     bool isScrollingOrZooming() const;
     void setScrollingOrZooming(bool);
 

Modified: trunk/Source/WebKit/blackberry/Api/BackingStore_p.h (134629 => 134630)


--- trunk/Source/WebKit/blackberry/Api/BackingStore_p.h	2012-11-14 18:53:36 UTC (rev 134629)
+++ trunk/Source/WebKit/blackberry/Api/BackingStore_p.h	2012-11-14 19:03:10 UTC (rev 134630)
@@ -127,11 +127,17 @@
 
     bool isSuspended() const { return m_suspendBackingStoreUpdates; }
 
+    // Suspends all backingstore updates so that rendering to the backingstore is disabled.
+    void suspendBackingStoreUpdates();
+
+    // Resumes all backingstore updates so that rendering to the backingstore is enabled.
+    void resumeBackingStoreUpdates();
+
     // Suspends all screen updates so that 'blitVisibleContents' is disabled.
-    void suspendScreenAndBackingStoreUpdates();
+    void suspendScreenUpdates();
 
     // Resumes all screen updates so that 'blitVisibleContents' is enabled.
-    void resumeScreenAndBackingStoreUpdates(BackingStore::ResumeUpdateOperation);
+    void resumeScreenUpdates(BackingStore::ResumeUpdateOperation);
 
     // The functions repaint(), slowScroll(), scroll(), scrollingStartedHelper() are
     // called from outside WebKit and within WebKit via ChromeClientBlackBerry.

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (134629 => 134630)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-11-14 18:53:36 UTC (rev 134629)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-11-14 19:03:10 UTC (rev 134630)
@@ -1069,7 +1069,9 @@
 #endif
 
             // Suspend screen update to avoid ui thread blitting while resetting backingstore.
-            m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+            // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+            m_backingStore->d->suspendBackingStoreUpdates();
+            m_backingStore->d->suspendScreenUpdates();
 
             m_previousContentsSize = IntSize();
             m_backingStore->d->resetRenderQueue();
@@ -1125,7 +1127,9 @@
             setScrollPosition(IntPoint::zero());
             notifyTransformedScrollChanged();
 
-            m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::None);
+            // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+            m_backingStore->d->resumeBackingStoreUpdates();
+            m_backingStore->d->resumeScreenUpdates(BackingStore::None);
 
             // Paints the visible backingstore as white. Note it is important we do
             // this strictly after re-setting the scroll position to origin and resetting
@@ -1227,7 +1231,9 @@
     *m_transformationMatrix = zoom;
 
     // Suspend all screen updates to the backingstore.
-    m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    m_backingStore->d->suspendBackingStoreUpdates();
+    m_backingStore->d->suspendScreenUpdates();
 
     updateViewportSize();
 
@@ -1267,13 +1273,16 @@
     if (m_pendingOrientation != -1)
         m_client->updateInteractionViews();
 
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    m_backingStore->d->resumeBackingStoreUpdates();
+
     // Clear window to make sure there are no artifacts.
     if (shouldRender) {
         // Resume all screen updates to the backingstore and render+blit visible contents to screen.
-        m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
+        m_backingStore->d->resumeScreenUpdates(BackingStore::RenderAndBlit);
     } else {
         // Resume all screen updates to the backingstore but do not blit to the screen because we not rendering.
-        m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::None);
+        m_backingStore->d->resumeScreenUpdates(BackingStore::None);
     }
 
     return true;
@@ -2950,7 +2959,9 @@
     zoom.scale(m_blockZoomFinalScale);
     *m_transformationMatrix = zoom;
     m_client->resetBitmapZoomScale(m_blockZoomFinalScale);
-    m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    m_backingStore->d->suspendBackingStoreUpdates();
+    m_backingStore->d->suspendScreenUpdates();
     updateViewportSize();
 
 #if ENABLE(VIEWPORT_REFLOW)
@@ -3007,7 +3018,9 @@
 
     notifyTransformChanged();
     m_client->scaleChanged();
-    m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    m_backingStore->d->resumeBackingStoreUpdates();
+    m_backingStore->d->resumeScreenUpdates(BackingStore::RenderAndBlit);
 }
 
 void WebPage::blockZoomAnimationFinished()
@@ -3044,7 +3057,9 @@
     disableWebInspector();
 
     // WebPage::destroyWebPageCompositor()
-    d->m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    d->m_backingStore->d->suspendBackingStoreUpdates();
+    d->m_backingStore->d->suspendScreenUpdates();
 
     // Close the backforward list and release the cached pages.
     d->m_page->backForward()->close();
@@ -3579,7 +3594,9 @@
 
     // Suspend all screen updates to the backingstore to make sure no-one tries to blit
     // while the window surface and the BackingStore are out of sync.
-    m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    m_backingStore->d->suspendBackingStoreUpdates();
+    m_backingStore->d->suspendScreenUpdates();
 
     // The screen rotation is a major state transition that in this case is not properly
     // communicated to the backing store, since it does early return in most methods when
@@ -3698,7 +3715,9 @@
 
     // Need to resume so that the backingstore will start recording the invalidated
     // rects from below.
-    m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::None);
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    m_backingStore->d->resumeBackingStoreUpdates();
+    m_backingStore->d->resumeScreenUpdates(BackingStore::None);
 
     // We might need to layout here to get a correct contentsSize so that zoomToFit
     // is calculated correctly.
@@ -3771,7 +3790,9 @@
     } else {
 
         // Suspend all screen updates to the backingstore.
-        m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_backingStore->d->suspendBackingStoreUpdates();
+        m_backingStore->d->suspendScreenUpdates();
 
         // If the zoom failed, then we should still preserve the special case of scroll position.
         IntPoint scrollPosition = this->scrollPosition();
@@ -3799,7 +3820,9 @@
         }
 
         // If we need layout then render and blit, otherwise just blit as our viewport has changed.
-        m_backingStore->d->resumeScreenAndBackingStoreUpdates(needsLayout ? BackingStore::RenderAndBlit : BackingStore::Blit);
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_backingStore->d->resumeBackingStoreUpdates();
+        m_backingStore->d->resumeScreenUpdates(needsLayout ? BackingStore::RenderAndBlit : BackingStore::Blit);
     }
 }
 
@@ -5283,15 +5306,21 @@
     // That seems extremely likely to be the case, but let's assert just to make sure.
     ASSERT(webKitThreadMessageClient()->isCurrentThread());
 
-    if (m_compositor || m_client->window())
-        m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+    if (m_compositor || m_client->window()) {
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_backingStore->d->suspendBackingStoreUpdates();
+        m_backingStore->d->suspendScreenUpdates();
+    }
 
     // The m_compositor member has to be modified during a sync call for thread
     // safe access to m_compositor and its refcount.
     userInterfaceThreadMessageClient()->dispatchSyncMessage(createMethodCallMessage(&WebPagePrivate::setCompositorHelper, this, compositor));
 
-    if (m_compositor || m_client->window()) // the new compositor, if one was set
-        m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
+    if (m_compositor || m_client->window()) { // the new compositor, if one was set
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_backingStore->d->resumeBackingStoreUpdates();
+        m_backingStore->d->resumeScreenUpdates(BackingStore::RenderAndBlit);
+    }
 }
 
 void WebPagePrivate::setCompositorHelper(PassRefPtr<WebPageCompositorPrivate> compositor)
@@ -5737,7 +5766,9 @@
         // The Browser chrome has its own fullscreen video widget.
         exitFullscreenForNode(element);
     } else {
-        m_backingStore->d->suspendScreenAndBackingStoreUpdates();
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_backingStore->d->suspendBackingStoreUpdates();
+        m_backingStore->d->suspendScreenUpdates();
 
         // When leaving fullscreen mode, we need to restore the 'x' scroll position
         // before fullscreen.
@@ -5758,7 +5789,9 @@
         }
 
         notifyTransformChanged();
-        m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_backingStore->d->resumeBackingStoreUpdates();
+        m_backingStore->d->resumeScreenUpdates(BackingStore::RenderAndBlit);
 
         // This is where we would restore the browser's chrome
         // if hidden above.
@@ -6072,7 +6105,9 @@
 void WebPagePrivate::restoreHistoryViewState(Platform::IntSize contentsSize, Platform::IntPoint scrollPosition, double scale, bool shouldReflowBlock)
 {
     if (!m_mainFrame) {
-        m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_backingStore->d->resumeBackingStoreUpdates();
+        m_backingStore->d->resumeScreenUpdates(BackingStore::RenderAndBlit);
         return;
     }
 
@@ -6090,7 +6125,9 @@
     bool didZoom = zoomAboutPoint(scale, m_mainFrame->view()->scrollPosition(), true /* enforceScaleClamping */, true /*forceRendering*/, true /*isRestoringZoomLevel*/);
     // If we're already at that scale, then we should still force rendering
     // since our scroll position changed.
-    m_backingStore->d->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
+    // 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.

Modified: trunk/Source/WebKit/blackberry/ChangeLog (134629 => 134630)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-11-14 18:53:36 UTC (rev 134629)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-11-14 19:03:10 UTC (rev 134630)
@@ -1,3 +1,47 @@
+2012-11-14  Adam Treat  <[email protected]>
+
+        [BlackBerry] Break suspend/resume of the backingstore and screen into separate methods
+        https://bugs.webkit.org/show_bug.cgi?id=102126
+
+        Reviewed by George Staikos.
+        PR 219976
+
+        Modify the suspend/resume methods so that they can be called from the UI thread
+        itself and split up the suspend/resume methods so that we can suspend/resume
+        the screen or backingstore separately.
+
+        * Api/BackingStore.cpp:
+        (BlackBerry::WebKit::BackingStorePrivate::suspendBackingStoreUpdates):
+        (WebKit):
+        (BlackBerry::WebKit::BackingStorePrivate::suspendScreenUpdates):
+        (BlackBerry::WebKit::BackingStorePrivate::resumeBackingStoreUpdates):
+        (BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
+        (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
+        (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
+        (BlackBerry::WebKit::BackingStore::suspendBackingStoreUpdates):
+        (BlackBerry::WebKit::BackingStore::resumeBackingStoreUpdates):
+        (BlackBerry::WebKit::BackingStore::suspendScreenUpdates):
+        (BlackBerry::WebKit::BackingStore::resumeScreenUpdates):
+        (BlackBerry::WebKit::BackingStore::createBackingStoreMemory):
+        (BlackBerry::WebKit::BackingStore::releaseBackingStoreMemory):
+        * Api/BackingStore.h:
+        * Api/BackingStore_p.h:
+        (BackingStorePrivate):
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::setLoadState):
+        (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
+        (BlackBerry::WebKit::WebPagePrivate::zoomBlock):
+        (BlackBerry::WebKit::WebPage::destroy):
+        (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
+        (BlackBerry::WebKit::WebPagePrivate::setCompositor):
+        (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
+        (BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
+        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+        (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
+        (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::InputHandler::setBatchEditingActive):
+
 2012-11-14  Andy Chen  <[email protected]>
 
         [BlackBerry] Add FocusBased context node detection strategy

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (134629 => 134630)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-11-14 18:53:36 UTC (rev 134629)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp	2012-11-14 19:03:10 UTC (rev 134630)
@@ -435,8 +435,11 @@
     // in the backing store from another thread (see BackingStorePrivate::blitVisibleContents method),
     // so we suspend and resume screen update to make sure we do not get a invalid FrameView
     // state.
-    if (isMainFrame() && m_webPagePrivate->backingStoreClient())
-        m_webPagePrivate->backingStoreClient()->backingStore()->d->suspendScreenAndBackingStoreUpdates();
+    if (isMainFrame() && m_webPagePrivate->backingStoreClient()) {
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_webPagePrivate->backingStoreClient()->backingStore()->d->suspendBackingStoreUpdates();
+        m_webPagePrivate->backingStoreClient()->backingStore()->d->suspendScreenUpdates();
+    }
 
     // We are navigating away from this document, so clean up any footprint we might have.
     if (m_frame->document())
@@ -456,8 +459,11 @@
                         ScrollbarAlwaysOff,                    /* ver mode */
                         true);                                 /* lock the mode */
 
-    if (isMainFrame() && m_webPagePrivate->backingStoreClient())
-        m_webPagePrivate->backingStoreClient()->backingStore()->d->resumeScreenAndBackingStoreUpdates(BackingStore::None);
+    if (isMainFrame() && m_webPagePrivate->backingStoreClient()) {
+        // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+        m_webPagePrivate->backingStoreClient()->backingStore()->d->resumeBackingStoreUpdates();
+        m_webPagePrivate->backingStoreClient()->backingStore()->d->resumeScreenUpdates(BackingStore::None);
+    }
 
     m_frame->view()->updateCanHaveScrollbars();
 
@@ -1122,7 +1128,9 @@
 
     // 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();
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    m_webPagePrivate->m_backingStore->d->suspendBackingStoreUpdates();
+    m_webPagePrivate->m_backingStore->d->suspendScreenUpdates();
 
     // 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(

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (134629 => 134630)


--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-11-14 18:53:36 UTC (rev 134629)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-11-14 19:03:10 UTC (rev 134630)
@@ -1841,10 +1841,14 @@
     ASSERT(backingStoreClient);
 
     // Enable / Disable the backingstore to prevent visual updates.
-    if (!active)
-        backingStoreClient->backingStore()->resumeScreenAndBackingStoreUpdates(BackingStore::RenderAndBlit);
-    else
-        backingStoreClient->backingStore()->suspendScreenAndBackingStoreUpdates();
+    // FIXME: Do we really need to suspend/resume both backingstore and screen here?
+    if (!active) {
+        backingStoreClient->backingStore()->resumeBackingStoreUpdates();
+        backingStoreClient->backingStore()->resumeScreenUpdates(BackingStore::RenderAndBlit);
+    } else {
+        backingStoreClient->backingStore()->suspendBackingStoreUpdates();
+        backingStoreClient->backingStore()->suspendScreenUpdates();
+    }
 
     return true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to