Title: [130501] trunk/Source/WebKit/blackberry
Revision
130501
Author
toniki...@webkit.org
Date
2012-10-05 07:29:05 -0700 (Fri, 05 Oct 2012)

Log Message

[BlackBerry] Find a proper fix for the WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling hack
https://bugs.webkit.org/show_bug.cgi?id=98517
PR #137382

Reviewed by Yong Li.
Patch by Antonio Gomes <ago...@rim.com>

We've generalized composited in-region scrolling, originally only applicable
to block elements, to inner frames (see PR #197093). Past that, we no longer
need to force repaints of offscreen areas when we finish scrolling, since translating
the Layer takes care of properly invalidating it. Thus, remove this method.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
* Api/WebPage_p.h:
(WebPagePrivate):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (130500 => 130501)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-10-05 14:19:58 UTC (rev 130500)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-10-05 14:29:05 UTC (rev 130501)
@@ -1432,7 +1432,6 @@
 void WebPagePrivate::notifyInRegionScrollStopped()
 {
     if (m_inRegionScroller->d->isActive()) {
-        enqueueRenderingOfClippedContentOfScrollableAreaAfterInRegionScrolling();
         // Notify the client side to clear InRegion scrollable areas before we destroy them here.
         std::vector<Platform::ScrollViewBase*> emptyInRegionScrollableAreas;
         m_client->notifyInRegionScrollableAreasChanged(emptyInRegionScrollableAreas);
@@ -1445,52 +1444,6 @@
     d->notifyInRegionScrollStopped();
 }
 
-void WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableAreaAfterInRegionScrolling()
-{
-    // If no scrolling was even performed, bail out.
-    if (m_inRegionScroller->d->m_needsActiveScrollableAreaCalculation)
-        return;
-
-    InRegionScrollableArea* scrollableArea = static_cast<InRegionScrollableArea*>(m_inRegionScroller->d->activeInRegionScrollableAreas()[0]);
-    ASSERT(scrollableArea);
-    Node* scrolledNode = scrollableArea->layer()->enclosingElement();
-
-    if (scrolledNode->isDocumentNode()) {
-        Frame* frame = static_cast<const Document*>(scrolledNode)->frame();
-        ASSERT(frame);
-        if (!frame)
-            return;
-        ASSERT(frame != m_mainFrame);
-        FrameView* view = frame->view();
-        if (!view)
-            return;
-
-        // Steps:
-        // #1 - Get frame rect in contents coords.
-        // #2 - Get the clipped scrollview rect in contents coords.
-        // #3 - Take transform into account for 1 and 2.
-        // #4 - Subtract 2 from 1, so we know exactly which areas of the frame
-        //      are offscreen, and need async repainting.
-        FrameView* mainFrameView = m_mainFrame->view();
-        ASSERT(mainFrameView);
-        IntRect frameRect = view->frameRect();
-        frameRect = frame->tree()->parent()->view()->contentsToWindow(frameRect);
-        frameRect = mainFrameView->windowToContents(frameRect);
-
-        IntRect visibleWindowRect = getRecursiveVisibleWindowRect(view);
-        IntRect visibleContentsRect = mainFrameView->windowToContents(visibleWindowRect);
-
-        IntRect transformedFrameRect = mapToTransformed(frameRect);
-        IntRect transformedVisibleContentsRect = mapToTransformed(visibleContentsRect);
-
-        Platform::IntRectRegion offscreenRegionOfIframe
-            = Platform::IntRectRegion::subtractRegions(Platform::IntRect(transformedFrameRect), Platform::IntRect(transformedVisibleContentsRect));
-
-        if (!offscreenRegionOfIframe.isEmpty())
-            m_backingStore->d->m_renderQueue->addToQueue(RenderQueue::RegularRender, offscreenRegionOfIframe.rects());
-    }
-}
-
 void WebPagePrivate::setHasInRegionScrollableAreas(bool b)
 {
     if (b != m_hasInRegionScrollableAreas)

Modified: trunk/Source/WebKit/blackberry/Api/WebPage_p.h (130500 => 130501)


--- trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-10-05 14:19:58 UTC (rev 130500)
+++ trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-10-05 14:29:05 UTC (rev 130501)
@@ -152,7 +152,6 @@
     void setScrollPosition(const WebCore::IntPoint&);
     void scrollBy(int deltaX, int deltaY);
 
-    void enqueueRenderingOfClippedContentOfScrollableAreaAfterInRegionScrolling();
     void notifyInRegionScrollStopped();
     void setScrollOriginPoint(const Platform::IntPoint&);
     void setHasInRegionScrollableAreas(bool);

Modified: trunk/Source/WebKit/blackberry/ChangeLog (130500 => 130501)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-10-05 14:19:58 UTC (rev 130500)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-10-05 14:29:05 UTC (rev 130501)
@@ -1,3 +1,21 @@
+2012-10-05  Antonio Gomes  <ago...@rim.com>
+
+        [BlackBerry] Find a proper fix for the WebPagePrivate::enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling hack
+        https://bugs.webkit.org/show_bug.cgi?id=98517
+        PR #137382
+
+        Reviewed by Yong Li.
+
+        We've generalized composited in-region scrolling, originally only applicable
+        to block elements, to inner frames (see PR #197093). Past that, we no longer
+        need to force repaints of offscreen areas when we finish scrolling, since translating
+        the Layer takes care of properly invalidating it. Thus, remove this method.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
+        * Api/WebPage_p.h:
+        (WebPagePrivate):
+
 2012-10-05  Mike Fenton  <mifen...@rim.com>
 
         [BlackBerry] Update default input support style for single line inputs.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to