[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

kenneth at webkit.org kenneth at webkit.org
Thu Apr 8 00:14:18 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9ba6222ab7d1ebeffa436a2b4cd0f8d5752e1b09
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 3 14:25:50 2009 +0000

    repaint events from outside the viewport aren't received
    https://bugs.webkit.org/show_bug.cgi?id=32081
    
    Reviewed by Simon Fraser.
    
    When using a tiled backing store for painting, you need to receive
    event from outside the viewport. Setting the viewport to the size
    of the contents is not an option if you want to make use of WebCore's
    infrastructure for drawing scrollbars etc.
    
    A new property, paintsEntireContents, has been introduced for the
    above use-case. It is settable, as tiling will be optional for Qt,
    and for the not yet upstreamed EFL port, there will be two different
    views, where only one of them are tiled.
    
    No change in behavior, so no new tests added.
    
    * page/FrameView.cpp:
    (WebCore::FrameView::repaintContentRectangle):
    * platform/ScrollView.cpp:
    (WebCore::ScrollView::ScrollView):
    (WebCore::ScrollView::setPaintsEntireContents):
    (WebCore::ScrollView::wheelEvent):
    * platform/ScrollView.h:
    (WebCore::ScrollView::paintsEntireContents):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51636 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b5e9023..875c6e4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2009-12-03  Rafael Antognolli  <antognolli at profusion.mobi>, Kenneth Christiansen <kenneth at webkit.org>
+
+        Reviewed by Simon Fraser.
+
+        repaint events from outside the viewport aren't received
+        https://bugs.webkit.org/show_bug.cgi?id=32081
+
+        When using a tiled backing store for painting, you need to receive
+        event from outside the viewport. Setting the viewport to the size
+        of the contents is not an option if you want to make use of WebCore's
+        infrastructure for drawing scrollbars etc.
+
+        A new property, paintsEntireContents, has been introduced for the
+        above use-case. It is settable, as tiling will be optional for Qt,
+        and for the not yet upstreamed EFL port, there will be two different
+        views, where only one of them are tiled.
+
+        No change in behavior, so no new tests added.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::repaintContentRectangle):
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::ScrollView):
+        (WebCore::ScrollView::setPaintsEntireContents):
+        (WebCore::ScrollView::wheelEvent):
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::paintsEntireContents):
+
 2009-11-23  Jeremy Moskovich  <jeremy at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index d0f9c47..49f741e 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -949,9 +949,10 @@ void FrameView::repaintContentRectangle(const IntRect& r, bool immediate)
 
     double delay = adjustedDeferredRepaintDelay();
     if ((m_deferringRepaints || m_deferredRepaintTimer.isActive() || delay) && !immediate) {
-        IntRect visibleContent = visibleContentRect();
-        visibleContent.intersect(r);
-        if (visibleContent.isEmpty())
+        IntRect paintRect = r;
+        if (!paintsEntireContents())
+            paintRect.intersect(visibleContentRect());
+        if (paintRect.isEmpty())
             return;
         if (m_repaintCount == cRepaintRectUnionThreshold) {
             IntRect unionedRect;
@@ -961,9 +962,9 @@ void FrameView::repaintContentRectangle(const IntRect& r, bool immediate)
             m_repaintRects.append(unionedRect);
         }
         if (m_repaintCount < cRepaintRectUnionThreshold)
-            m_repaintRects.append(visibleContent);
+            m_repaintRects.append(paintRect);
         else
-            m_repaintRects[0].unite(visibleContent);
+            m_repaintRects[0].unite(paintRect);
         m_repaintCount++;
     
         if (!m_deferringRepaints && !m_deferredRepaintTimer.isActive())
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index e91f8ee..8aff04d 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -49,6 +49,7 @@ ScrollView::ScrollView()
     , m_updateScrollbarsPass(0)
     , m_drawPanScrollIcon(false)
     , m_useFixedLayout(false)
+    , m_paintsEntireContents(false)
 {
     platformInit();
 }
@@ -168,6 +169,11 @@ bool ScrollView::canBlitOnScroll() const
     return m_canBlitOnScroll;
 }
 
+void ScrollView::setPaintsEntireContents(bool paintsEntireContents)
+{
+    m_paintsEntireContents = paintsEntireContents;
+}
+
 #if !PLATFORM(GTK)
 IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
 {
@@ -707,18 +713,19 @@ void ScrollView::frameRectsChanged()
 
 void ScrollView::repaintContentRectangle(const IntRect& rect, bool now)
 {
-    IntRect visibleContent = visibleContentRect();
-    visibleContent.intersect(rect);
-    if (visibleContent.isEmpty())
+    IntRect paintRect = rect;
+    if (!paintsEntireContents())
+        paintRect.intersect(visibleContentRect());
+    if (paintRect.isEmpty())
         return;
 
     if (platformWidget()) {
-        platformRepaintContentRectangle(visibleContent, now);
+        platformRepaintContentRectangle(paintRect, now);
         return;
     }
 
     if (hostWindow())
-        hostWindow()->repaint(contentsToWindow(visibleContent), true, now);
+        hostWindow()->repaint(contentsToWindow(paintRect), true, now);
 }
 
 IntRect ScrollView::scrollCornerRect() const
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index dbbbff1..ca72900 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -92,6 +92,11 @@ public:
     virtual void setCanHaveScrollbars(bool);
     bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
 
+    // By default you only receive paint events for the area that is visible. In the case of using a
+    // tiled backing store, this method can be set, so that the view paints the entire contents.
+    bool paintsEntireContents() const { return m_paintsEntireContents; }
+    void setPaintsEntireContents(bool);
+
     // Overridden by FrameView to create custom CSS scrollbars if applicable.
     virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
 
@@ -272,6 +277,8 @@ private:
     bool m_drawPanScrollIcon;
     bool m_useFixedLayout;
 
+    bool m_paintsEntireContents;
+
     void init();
     void destroy();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list