HostWindow invalidation functions should use root view coordinates
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2011 17:54:52 +0000 (17:54 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2011 17:54:52 +0000 (17:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=72338

Reviewed by Dan Bernstein.

Source/WebCore:

Rename invalidateWindow to invalidateRootView, and invalidateContentsAndWindow
to invalidateContentsAndRootView. Make sure that the rects passed to the renamed functions
are in root view coordinates by changing contentsToWindow calls to contentsToRootView.

In practice this doesn't matter because for all platforms except Mac WebKit1, root view coordinates
and window coordinates are equivalent, and Mac WebKit1 doesn't use these invalidation functions.

* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::invalidateRootView):
(WebCore::Chrome::invalidateContentsAndRootView):
* page/Chrome.h:
* page/ChromeClient.h:
* page/Frame.cpp:
(WebCore::Frame::tiledBackingStorePaintEnd):
* page/FrameView.cpp:
(WebCore::FrameView::invalidateRect):
(WebCore::FrameView::scrollContentsFastPath):
* platform/HostWindow.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::rectToCopyOnScroll):
(WebCore::ScrollView::scrollContents):
(WebCore::ScrollView::wheelEvent):
* platform/chromium/FramelessScrollView.cpp:
(WebCore::FramelessScrollView::invalidateRect):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImageChromeClient::invalidateContentsAndRootView):

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::invalidateRootView):
(WebKit::ChromeClientImpl::invalidateContentsAndRootView):
(WebKit::ChromeClientImpl::invalidateContentsForSlowScroll):
* src/ChromeClientImpl.h:
* src/WebPopupMenuImpl.cpp:
(WebKit::WebPopupMenuImpl::invalidateRootView):
(WebKit::WebPopupMenuImpl::invalidateContentsAndRootView):
(WebKit::WebPopupMenuImpl::invalidateContentsForSlowScroll):
* src/WebPopupMenuImpl.h:

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::invalidateRootView):
(WebCore::ChromeClientEfl::invalidateContentsAndRootView):
(WebCore::ChromeClientEfl::invalidateContentsForSlowScroll):
* WebCoreSupport/ChromeClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::invalidateRootView):
(WebKit::ChromeClient::invalidateContentsAndRootView):
(WebKit::ChromeClient::invalidateContentsForSlowScroll):
* WebCoreSupport/ChromeClientGtk.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::invalidateRootView):
(WebChromeClient::invalidateContentsAndRootView):
(WebChromeClient::invalidateContentsForSlowScroll):

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::invalidateRootView):
(WebCore::ChromeClientQt::invalidateContentsAndRootView):
(WebCore::ChromeClientQt::invalidateContentsForSlowScroll):
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::invalidateRootView):
(WebChromeClient::invalidateContentsAndRootView):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.cpp:
(WebKit::ChromeClientWinCE::invalidateRootView):
(WebKit::ChromeClientWinCE::invalidateContentsAndRootView):
(WebKit::ChromeClientWinCE::invalidateContentsForSlowScroll):
(WebKit::ChromeClientWinCE::scroll):
* WebCoreSupport/ChromeClientWinCE.h:

Source/WebKit/wx:

* WebKitSupport/ChromeClientWx.cpp:
(WebCore::ChromeClientWx::invalidateRootView):
(WebCore::ChromeClientWx::invalidateContentsForSlowScroll):
(WebCore::ChromeClientWx::invalidateContentsAndRootView):
* WebKitSupport/ChromeClientWx.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateRootView):
(WebKit::WebChromeClient::invalidateContentsAndRootView):
* WebProcess/WebCoreSupport/WebChromeClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100290 268f45cc-cd09-0410-ab3c-d52691b4dbfc

40 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/Chrome.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/Frame.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/platform/HostWindow.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/chromium/FramelessScrollView.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/ChromeClientImpl.h
Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
Source/WebKit/chromium/src/WebPopupMenuImpl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

index 3b68b60..c5c9ea2 100644 (file)
@@ -1,3 +1,38 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        Rename invalidateWindow to invalidateRootView, and invalidateContentsAndWindow
+        to invalidateContentsAndRootView. Make sure that the rects passed to the renamed functions
+        are in root view coordinates by changing contentsToWindow calls to contentsToRootView.
+        
+        In practice this doesn't matter because for all platforms except Mac WebKit1, root view coordinates
+        and window coordinates are equivalent, and Mac WebKit1 doesn't use these invalidation functions.
+
+        * loader/EmptyClients.h:
+        * page/Chrome.cpp:
+        (WebCore::Chrome::invalidateRootView):
+        (WebCore::Chrome::invalidateContentsAndRootView):
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        * page/Frame.cpp:
+        (WebCore::Frame::tiledBackingStorePaintEnd):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::invalidateRect):
+        (WebCore::FrameView::scrollContentsFastPath):
+        * platform/HostWindow.h:
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::rectToCopyOnScroll):
+        (WebCore::ScrollView::scrollContents):
+        (WebCore::ScrollView::wheelEvent):
+        * platform/chromium/FramelessScrollView.cpp:
+        (WebCore::FramelessScrollView::invalidateRect):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImageChromeClient::invalidateContentsAndRootView):
+
 2011-11-15  Philip Rogers  <pdr@google.com>
 
         Implement maxWidth for fillText and strokeText, fixing the canvas/philip/tests/2d.text.draw.fill.maxWidth.fontface.html test.
index 13cc08f..d863673 100644 (file)
@@ -157,9 +157,9 @@ public:
 
     virtual IntRect windowResizerRect() const { return IntRect(); }
 
-    virtual void invalidateWindow(const IntRect&, bool) { }
-    virtual void invalidateContentsAndWindow(const IntRect&, bool) { }
-    virtual void invalidateContentsForSlowScroll(const IntRect&, bool) {};
+    virtual void invalidateRootView(const IntRect&, bool) OVERRIDE { }
+    virtual void invalidateContentsAndRootView(const IntRect&, bool) OVERRIDE { }
+    virtual void invalidateContentsForSlowScroll(const IntRect&, bool) OVERRIDE { }
     virtual void scroll(const IntSize&, const IntRect&, const IntRect&) { }
 #if USE(TILED_BACKING_STORE)
     virtual void delegatedScrollRequested(const IntPoint&) { }
index 6d0da8f..1d38603 100644 (file)
@@ -71,14 +71,14 @@ Chrome::~Chrome()
     m_client->chromeDestroyed();
 }
 
-void Chrome::invalidateWindow(const IntRect& updateRect, bool immediate)
+void Chrome::invalidateRootView(const IntRect& updateRect, bool immediate)
 {
-    m_client->invalidateWindow(updateRect, immediate);
+    m_client->invalidateRootView(updateRect, immediate);
 }
 
-void Chrome::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
+void Chrome::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate)
 {
-    m_client->invalidateContentsAndWindow(updateRect, immediate);
+    m_client->invalidateContentsAndRootView(updateRect, immediate);
 }
 
 void Chrome::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
index 51c5922..044eb6c 100644 (file)
@@ -69,8 +69,8 @@ namespace WebCore {
 
         // HostWindow methods.
 
-        virtual void invalidateWindow(const IntRect&, bool);
-        virtual void invalidateContentsAndWindow(const IntRect&, bool);
+        virtual void invalidateRootView(const IntRect&, bool) OVERRIDE;
+        virtual void invalidateContentsAndRootView(const IntRect&, bool) OVERRIDE;
         virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
         virtual void scroll(const IntSize&, const IntRect&, const IntRect&);
 #if USE(TILED_BACKING_STORE)
index 7ccb77a..3aca311 100644 (file)
@@ -146,8 +146,8 @@ namespace WebCore {
         virtual IntRect windowResizerRect() const = 0;
 
         // Methods used by HostWindow.
-        virtual void invalidateWindow(const IntRect&, bool) = 0;
-        virtual void invalidateContentsAndWindow(const IntRect&, bool) = 0;
+        virtual void invalidateRootView(const IntRect&, bool) = 0;
+        virtual void invalidateContentsAndRootView(const IntRect&, bool) = 0;
         virtual void invalidateContentsForSlowScroll(const IntRect&, bool) = 0;
         virtual void scroll(const IntSize&, const IntRect&, const IntRect&) = 0;
 #if USE(TILED_BACKING_STORE)
index df2d70c..e353b49 100644 (file)
@@ -929,7 +929,7 @@ void Frame::tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea)
     unsigned size = paintedArea.size();
     // Request repaint from the system
     for (int n = 0; n < size; ++n)
-        m_page->chrome()->invalidateContentsAndWindow(m_view->contentsToWindow(paintedArea[n]), false);
+        m_page->chrome()->invalidateContentsAndRootView(m_view->contentsToRootView(paintedArea[n]), false);
 }
 
 IntRect Frame::tiledBackingStoreContentsRect()
index e605c7e..44aad99 100644 (file)
@@ -377,7 +377,7 @@ void FrameView::invalidateRect(const IntRect& rect)
 {
     if (!parent()) {
         if (hostWindow())
-            hostWindow()->invalidateContentsAndWindow(rect, false /*immediate*/);
+            hostWindow()->invalidateContentsAndRootView(rect, false /*immediate*/);
         return;
     }
 
@@ -1452,7 +1452,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
         if (renderBox->style()->position() != FixedPosition)
             continue;
         IntRect updateRect = renderBox->layer()->repaintRectIncludingDescendants();
-        updateRect = contentsToWindow(updateRect);
+        updateRect = contentsToRootView(updateRect);
         if (!isCompositedContentLayer && clipsRepaints())
             updateRect.intersect(rectToScroll);
         if (!updateRect.isEmpty()) {
@@ -1478,7 +1478,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
             updateRect.unite(scrolledRect);
 #if USE(ACCELERATED_COMPOSITING)
             if (isCompositedContentLayer) {
-                updateRect = windowToContents(updateRect);
+                updateRect = rootViewToContents(updateRect);
                 RenderView* root = rootRenderer(this);
                 ASSERT(root);
                 root->layer()->setBackingNeedsRepaintInRect(updateRect);
@@ -1487,7 +1487,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
 #endif
             if (clipsRepaints())
                 updateRect.intersect(rectToScroll);
-            hostWindow()->invalidateContentsAndWindow(updateRect, false);
+            hostWindow()->invalidateContentsAndRootView(updateRect, false);
         }
         return true;
     }
index ad25185..15c3c71 100644 (file)
@@ -38,16 +38,16 @@ public:
     HostWindow() { }
     virtual ~HostWindow() { }
 
-    // Requests the host invalidate the window, not the contents.  If immediate is true do so synchronously, otherwise async.
-    virtual void invalidateWindow(const IntRect& updateRect, bool immediate) = 0;
+    // Requests the host invalidate the root view, not the contents. If immediate is true do so synchronously, otherwise async.
+    virtual void invalidateRootView(const IntRect& updateRect, bool immediate) = 0;
 
-    // Requests the host invalidate the contents and the window.  If immediate is true do so synchronously, otherwise async.
-    virtual void invalidateContentsAndWindow(const IntRect& updateRect, bool immediate) = 0;
+    // Requests the host invalidate the contents and the root view. If immediate is true do so synchronously, otherwise async.
+    virtual void invalidateContentsAndRootView(const IntRect& updateRect, bool immediate) = 0;
 
     // Requests the host scroll backingstore by the specified delta, rect to scroll, and clip rect.
     virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) = 0;
 
-    // Requests the host invalidate the contents, not the window.  This is the slow path for scrolling.
+    // Requests the host invalidate the contents, not the root view. This is the slow path for scrolling.
     virtual void invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) = 0;
 
 #if USE(TILED_BACKING_STORE)
index 5556394..4f2fe46 100644 (file)
@@ -603,7 +603,7 @@ const int panIconSizeLength = 16;
 
 IntRect ScrollView::rectToCopyOnScroll() const
 {
-    IntRect scrollViewRect = convertToContainingWindow(IntRect(0, 0, visibleWidth(), visibleHeight()));
+    IntRect scrollViewRect = convertToRootView(IntRect(0, 0, visibleWidth(), visibleHeight()));
     if (hasOverlayScrollbars()) {
         int verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVerticalScrollbar()) ? verticalScrollbar()->width() : 0;
         int horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHorizontalScrollbar()) ? horizontalScrollbar()->height() : 0;
@@ -626,8 +626,8 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
     IntRect updateRect = clipRect;
     updateRect.intersect(scrollViewRect);
 
-    // Invalidate the window (not the backing store).
-    hostWindow()->invalidateWindow(updateRect, false /*immediate*/);
+    // Invalidate the root view (not the backing store).
+    hostWindow()->invalidateRootView(updateRect, false /*immediate*/);
 
     if (m_drawPanScrollIcon) {
         // FIXME: the pan icon is broken when accelerated compositing is on, since it will draw under the compositing layers.
@@ -636,7 +636,7 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
         IntPoint panIconDirtySquareLocation = IntPoint(m_panScrollIconPoint.x() - (panIconDirtySquareSizeLength / 2), m_panScrollIconPoint.y() - (panIconDirtySquareSizeLength / 2));
         IntRect panScrollIconDirtyRect = IntRect(panIconDirtySquareLocation, IntSize(panIconDirtySquareSizeLength, panIconDirtySquareSizeLength));
         panScrollIconDirtyRect.intersect(clipRect);
-        hostWindow()->invalidateContentsAndWindow(panScrollIconDirtyRect, false /*immediate*/);
+        hostWindow()->invalidateContentsAndRootView(panScrollIconDirtyRect, false /*immediate*/);
     }
 
     if (canBlitOnScroll()) { // The main frame can just blit the WebView window
@@ -662,15 +662,15 @@ void ScrollView::scrollContents(const IntSize& scrollDelta)
     }
 #endif
     if (!horizontalOverhangRect.isEmpty())
-        hostWindow()->invalidateContentsAndWindow(horizontalOverhangRect, false /*immediate*/);
+        hostWindow()->invalidateContentsAndRootView(horizontalOverhangRect, false /*immediate*/);
     if (!verticalOverhangRect.isEmpty())
-        hostWindow()->invalidateContentsAndWindow(verticalOverhangRect, false /*immediate*/);
+        hostWindow()->invalidateContentsAndRootView(verticalOverhangRect, false /*immediate*/);
 
     // This call will move children with native widgets (plugins) and invalidate them as well.
     frameRectsChanged();
 
     // Now blit the backingstore into the window which should be very fast.
-    hostWindow()->invalidateWindow(IntRect(), true);
+    hostWindow()->invalidateRootView(IntRect(), true);
 }
 
 bool ScrollView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
@@ -929,7 +929,7 @@ void ScrollView::repaintContentRectangle(const IntRect& rect, bool now)
     }
 
     if (hostWindow())
-        hostWindow()->invalidateContentsAndWindow(contentsToWindow(paintRect), now /*immediate*/);
+        hostWindow()->invalidateContentsAndRootView(contentsToWindow(paintRect), now /*immediate*/);
 }
 
 IntRect ScrollView::scrollCornerRect() const
@@ -1252,7 +1252,7 @@ void ScrollView::addPanScrollIcon(const IntPoint& iconPosition)
         return;
     m_drawPanScrollIcon = true;    
     m_panScrollIconPoint = IntPoint(iconPosition.x() - panIconSizeLength / 2 , iconPosition.y() - panIconSizeLength / 2) ;
-    hostWindow()->invalidateContentsAndWindow(IntRect(m_panScrollIconPoint, IntSize(panIconSizeLength, panIconSizeLength)), true /*immediate*/);
+    hostWindow()->invalidateContentsAndRootView(IntRect(m_panScrollIconPoint, IntSize(panIconSizeLength, panIconSizeLength)), true /*immediate*/);
 }
 
 void ScrollView::removePanScrollIcon()
@@ -1260,7 +1260,7 @@ void ScrollView::removePanScrollIcon()
     if (!hostWindow())
         return;
     m_drawPanScrollIcon = false; 
-    hostWindow()->invalidateContentsAndWindow(IntRect(m_panScrollIconPoint, IntSize(panIconSizeLength, panIconSizeLength)), true /*immediate*/);
+    hostWindow()->invalidateContentsAndRootView(IntRect(m_panScrollIconPoint, IntSize(panIconSizeLength, panIconSizeLength)), true /*immediate*/);
 }
 
 void ScrollView::setScrollOrigin(const IntPoint& origin, bool updatePositionAtAll, bool updatePositionSynchronously)
index 3fca726..73bec0d 100644 (file)
@@ -66,7 +66,7 @@ ScrollableArea* FramelessScrollView::enclosingScrollableArea() const
 void FramelessScrollView::invalidateRect(const IntRect& rect)
 {
     if (HostWindow* h = hostWindow())
-        h->invalidateContentsAndWindow(rect, false /*immediate*/);
+        h->invalidateContentsAndRootView(rect, false /*immediate*/);
 }
 
 HostWindow* FramelessScrollView::hostWindow() const
index 7db6df8..b643ee6 100644 (file)
@@ -73,7 +73,7 @@ private:
         m_image = 0;
     }
 
-    virtual void invalidateContentsAndWindow(const IntRect& r, bool)
+    virtual void invalidateContentsAndRootView(const IntRect& r, bool)
     {
         if (m_image && m_image->imageObserver())
             m_image->imageObserver()->changedInRect(m_image, r);
index 501cb7e..53232c2 100644 (file)
@@ -1,3 +1,21 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::invalidateRootView):
+        (WebKit::ChromeClientImpl::invalidateContentsAndRootView):
+        (WebKit::ChromeClientImpl::invalidateContentsForSlowScroll):
+        * src/ChromeClientImpl.h:
+        * src/WebPopupMenuImpl.cpp:
+        (WebKit::WebPopupMenuImpl::invalidateRootView):
+        (WebKit::WebPopupMenuImpl::invalidateContentsAndRootView):
+        (WebKit::WebPopupMenuImpl::invalidateContentsForSlowScroll):
+        * src/WebPopupMenuImpl.h:
+
 2011-11-15  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: move generic code from DevTools.js into the WebCore.
index 39ccc63..ddcb7a1 100644 (file)
@@ -506,12 +506,12 @@ void ChromeClientImpl::registerProtocolHandler(const String& scheme, const Strin
 }
 #endif
 
-void ChromeClientImpl::invalidateWindow(const IntRect&, bool)
+void ChromeClientImpl::invalidateRootView(const IntRect&, bool)
 {
     notImplemented();
 }
 
-void ChromeClientImpl::invalidateContentsAndWindow(const IntRect& updateRect, bool /*immediate*/)
+void ChromeClientImpl::invalidateContentsAndRootView(const IntRect& updateRect, bool /*immediate*/)
 {
     if (updateRect.isEmpty())
         return;
@@ -529,7 +529,7 @@ void ChromeClientImpl::invalidateContentsAndWindow(const IntRect& updateRect, bo
 void ChromeClientImpl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
 {
     m_webView->hidePopups();
-    invalidateContentsAndWindow(updateRect, immediate);
+    invalidateContentsAndRootView(updateRect, immediate);
 }
 
 #if ENABLE(REQUEST_ANIMATION_FRAME)
index 7903c39..0095b9d 100644 (file)
@@ -105,8 +105,8 @@ public:
 #if ENABLE(REGISTER_PROTOCOL_HANDLER)
     virtual void registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title);
 #endif
-    virtual void invalidateWindow(const WebCore::IntRect&, bool);
-    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
+    virtual void invalidateRootView(const WebCore::IntRect&, bool);
+    virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     virtual void scheduleAnimation();
index 8812581..c2de045 100644 (file)
@@ -348,12 +348,12 @@ void WebPopupMenuImpl::invalidateContents(const IntRect&, bool)
     notImplemented();
 }
 
-void WebPopupMenuImpl::invalidateWindow(const IntRect&, bool)
+void WebPopupMenuImpl::invalidateRootView(const IntRect&, bool)
 {
     notImplemented();
 }
 
-void WebPopupMenuImpl::invalidateContentsAndWindow(const IntRect& paintRect, bool /*immediate*/)
+void WebPopupMenuImpl::invalidateContentsAndRootView(const IntRect& paintRect, bool /*immediate*/)
 {
     if (paintRect.isEmpty())
         return;
@@ -363,7 +363,7 @@ void WebPopupMenuImpl::invalidateContentsAndWindow(const IntRect& paintRect, boo
 
 void WebPopupMenuImpl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
 {
-    invalidateContentsAndWindow(updateRect, immediate);
+    invalidateContentsAndRootView(updateRect, immediate);
 }
 
 void WebPopupMenuImpl::scheduleAnimation()
index cb1ab82..7ff1311 100644 (file)
@@ -116,8 +116,8 @@ public:
 
     // WebCore::HostWindow methods:
     virtual void invalidateContents(const WebCore::IntRect&, bool);
-    virtual void invalidateWindow(const WebCore::IntRect&, bool);
-    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
+    virtual void invalidateRootView(const WebCore::IntRect&, bool);
+    virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
     virtual void scheduleAnimation();
     virtual void scroll(
index b440bd0..254c344 100755 (executable)
@@ -1,3 +1,16 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore::ChromeClientEfl::invalidateRootView):
+        (WebCore::ChromeClientEfl::invalidateContentsAndRootView):
+        (WebCore::ChromeClientEfl::invalidateContentsForSlowScroll):
+        * WebCoreSupport/ChromeClientEfl.h:
+
 2011-11-15  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
 
         [EFL] Use EINA_SAFETY_ON_NULL_RETURN_VAL for NULL checks instead of EINA_SAFETY_ON_FALSE_RETURN_VAL.
index 608b808..02e8bf6 100644 (file)
@@ -485,12 +485,12 @@ void ChromeClientEfl::invalidateContents(const IntRect& updateRect, bool immedia
     notImplemented();
 }
 
-void ChromeClientEfl::invalidateWindow(const IntRect& updateRect, bool immediate)
+void ChromeClientEfl::invalidateRootView(const IntRect& updateRect, bool immediate)
 {
     notImplemented();
 }
 
-void ChromeClientEfl::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
+void ChromeClientEfl::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate)
 {
     if (updateRect.isEmpty())
         return;
@@ -506,7 +506,7 @@ void ChromeClientEfl::invalidateContentsAndWindow(const IntRect& updateRect, boo
 
 void ChromeClientEfl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
 {
-    invalidateContentsAndWindow(updateRect, immediate);
+    invalidateContentsAndRootView(updateRect, immediate);
 }
 
 void ChromeClientEfl::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
index 72c02f3..d2b258a 100644 (file)
@@ -152,8 +152,8 @@ public:
     virtual void cancelGeolocationPermissionForFrame(Frame*, Geolocation*);
 
     virtual void invalidateContents(const IntRect&, bool);
-    virtual void invalidateWindow(const IntRect&, bool);
-    virtual void invalidateContentsAndWindow(const IntRect&, bool);
+    virtual void invalidateRootView(const IntRect&, bool);
+    virtual void invalidateContentsAndRootView(const IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
     virtual void scroll(const IntSize&, const IntRect&, const IntRect&);
     virtual void cancelGeolocationPermissionRequestForFrame(Frame*);
index f86daba..f99488d 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::invalidateRootView):
+        (WebKit::ChromeClient::invalidateContentsAndRootView):
+        (WebKit::ChromeClient::invalidateContentsForSlowScroll):
+        * WebCoreSupport/ChromeClientGtk.h:
+
 2011-11-15  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Implement download support in WebKit2
index 8d7518b..a2534c6 100644 (file)
@@ -570,11 +570,11 @@ void ChromeClient::paint(WebCore::Timer<ChromeClient>*)
     m_repaintSoonSourceId = 0;
 }
 
-void ChromeClient::invalidateWindow(const IntRect&, bool immediate)
+void ChromeClient::invalidateRootView(const IntRect&, bool immediate)
 {
 }
 
-void ChromeClient::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
+void ChromeClient::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate)
 {
     if (updateRect.isEmpty())
         return;
@@ -584,7 +584,7 @@ void ChromeClient::invalidateContentsAndWindow(const IntRect& updateRect, bool i
 
 void ChromeClient::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
 {
-    invalidateContentsAndWindow(updateRect, immediate);
+    invalidateContentsAndRootView(updateRect, immediate);
     m_adjustmentWatcher.updateAdjustmentsFromScrollbarsLater();
 }
 
index 250511e..21de491 100644 (file)
@@ -102,8 +102,8 @@ namespace WebKit {
 #if ENABLE(REGISTER_PROTOCOL_HANDLER) 
         virtual void registerProtocolHandler(const WTF::String&, const WTF::String&, const WTF::String&, const WTF::String&); 
 #endif 
-        virtual void invalidateWindow(const IntRect&, bool);
-        virtual void invalidateContentsAndWindow(const IntRect&, bool);
+        virtual void invalidateRootView(const IntRect&, bool);
+        virtual void invalidateContentsAndRootView(const IntRect&, bool);
         virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
         virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
 
index 126650c..4c7a19e 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::invalidateRootView):
+        (WebChromeClient::invalidateContentsAndRootView):
+        (WebChromeClient::invalidateContentsForSlowScroll):
+
 2011-11-14  Julien Chaffraix  <jchaffraix@webkit.org>
 
         Add --css-grid-layout to build-webkit and the build systems
index fe6fafa..b6a05d1 100644 (file)
@@ -88,8 +88,8 @@ public:
 
     virtual WebCore::IntRect windowResizerRect() const OVERRIDE;
 
-    virtual void invalidateWindow(const WebCore::IntRect&, bool) OVERRIDE;
-    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool) OVERRIDE;
+    virtual void invalidateRootView(const WebCore::IntRect&, bool) OVERRIDE;
+    virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool) OVERRIDE;
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool) OVERRIDE;
     virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect) OVERRIDE;
 
index 86b3679..07868c6 100644 (file)
@@ -541,7 +541,7 @@ IntRect WebChromeClient::windowResizerRect() const
     return enclosingIntRect([[m_webView window] _growBoxRect]);
 }
 
-void WebChromeClient::invalidateWindow(const IntRect&, bool immediate)
+void WebChromeClient::invalidateRootView(const IntRect&, bool immediate)
 {
     if (immediate) {
         [[m_webView window] displayIfNeeded];
@@ -549,13 +549,13 @@ void WebChromeClient::invalidateWindow(const IntRect&, bool immediate)
     }
 }
 
-void WebChromeClient::invalidateContentsAndWindow(const IntRect& rect, bool immediate)
+void WebChromeClient::invalidateContentsAndRootView(const IntRect& rect, bool immediate)
 {
 }
 
 void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool immediate)
 {
-    invalidateContentsAndWindow(rect, immediate);
+    invalidateContentsAndRootView(rect, immediate);
 }
 
 void WebChromeClient::scroll(const IntSize&, const IntRect&, const IntRect&)
index 95477d4..0ce380b 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::invalidateRootView):
+        (WebCore::ChromeClientQt::invalidateContentsAndRootView):
+        (WebCore::ChromeClientQt::invalidateContentsForSlowScroll):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2011-11-11  Pierre Rossi  <pierre.rossi@gmail.com>
 
         [Qt] Remove the QStyle dependency in Qt's mobile theme
index 95a407e..5785d0b 100644 (file)
@@ -398,7 +398,7 @@ IntRect ChromeClientQt::windowResizerRect() const
 #endif
 }
 
-void ChromeClientQt::invalidateWindow(const IntRect& windowRect, bool)
+void ChromeClientQt::invalidateRootView(const IntRect& windowRect, bool)
 {
 #if USE(TILED_BACKING_STORE)
     if (platformPageClient()) {
@@ -412,7 +412,7 @@ void ChromeClientQt::invalidateWindow(const IntRect& windowRect, bool)
 #endif
 }
 
-void ChromeClientQt::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate)
+void ChromeClientQt::invalidateContentsAndRootView(const IntRect& windowRect, bool immediate)
 {
     // No double buffer, so only update the QWidget if content changed.
     if (platformPageClient()) {
@@ -429,7 +429,7 @@ void ChromeClientQt::invalidateContentsAndWindow(const IntRect& windowRect, bool
 
 void ChromeClientQt::invalidateContentsForSlowScroll(const IntRect& windowRect, bool immediate)
 {
-    invalidateContentsAndWindow(windowRect, immediate);
+    invalidateContentsAndRootView(windowRect, immediate);
 }
 
 void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect&)
index 31d6b4b..0a79185 100644 (file)
@@ -114,8 +114,8 @@ public:
     virtual KeyboardUIMode keyboardUIMode();
     virtual IntRect windowResizerRect() const;
 
-    virtual void invalidateWindow(const IntRect&, bool);
-    virtual void invalidateContentsAndWindow(const IntRect&, bool);
+    virtual void invalidateRootView(const IntRect&, bool);
+    virtual void invalidateContentsAndRootView(const IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
     virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
 #if USE(TILED_BACKING_STORE)
index f8396dc..37d3737 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::invalidateRootView):
+        (WebChromeClient::invalidateContentsAndRootView):
+        * WebCoreSupport/WebChromeClient.h:
+
 2011-11-07  Adam Barth  <abarth@webkit.org>
 
         Move static "policy" state from SecurityOrigin.cpp to SecurityPolicy.cpp
index c28be20..bcd6c2c 100644 (file)
@@ -460,13 +460,13 @@ IntRect WebChromeClient::windowResizerRect() const
     return IntRect();
 }
 
-void WebChromeClient::invalidateWindow(const IntRect& windowRect, bool immediate)
+void WebChromeClient::invalidateRootView(const IntRect& windowRect, bool immediate)
 {
     ASSERT(core(m_webView->topLevelFrame()));
     m_webView->repaint(windowRect, false /*contentChanged*/, immediate, false /*repaintContentOnly*/);
 }
 
-void WebChromeClient::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate)
+void WebChromeClient::invalidateContentsAndRootView(const IntRect& windowRect, bool immediate)
 {
     ASSERT(core(m_webView->topLevelFrame()));
     m_webView->repaint(windowRect, true /*contentChanged*/, immediate /*immediate*/, false /*repaintContentOnly*/);
index 1593402..4f957c4 100644 (file)
@@ -94,8 +94,8 @@ public:
     virtual WebCore::KeyboardUIMode keyboardUIMode();
     virtual WebCore::IntRect windowResizerRect() const;
 
-    virtual void invalidateWindow(const WebCore::IntRect&, bool);
-    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
+    virtual void invalidateRootView(const WebCore::IntRect&, bool);
+    virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
     virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect);
 
index 7132209..dbc8d32 100644 (file)
@@ -1,3 +1,17 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/ChromeClientWinCE.cpp:
+        (WebKit::ChromeClientWinCE::invalidateRootView):
+        (WebKit::ChromeClientWinCE::invalidateContentsAndRootView):
+        (WebKit::ChromeClientWinCE::invalidateContentsForSlowScroll):
+        (WebKit::ChromeClientWinCE::scroll):
+        * WebCoreSupport/ChromeClientWinCE.h:
+
 2011-11-04  Patrick Gansterer  <paroga@webkit.org>
 
         [WINCE] Use default LocalizationStrategy
index ee550a4..eb7e317 100644 (file)
@@ -226,12 +226,12 @@ IntRect ChromeClientWinCE::windowResizerRect() const
     return IntRect();
 }
 
-void ChromeClientWinCE::invalidateWindow(const IntRect&, bool)
+void ChromeClientWinCE::invalidateRootView(const IntRect&, bool)
 {
     notImplemented();
 }
 
-void ChromeClientWinCE::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
+void ChromeClientWinCE::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate)
 {
     RECT rect = updateRect;
     InvalidateRect(m_webView->windowHandle(), &rect, FALSE);
@@ -242,12 +242,12 @@ void ChromeClientWinCE::invalidateContentsAndWindow(const IntRect& updateRect, b
 
 void ChromeClientWinCE::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
 {
-    invalidateContentsAndWindow(updateRect, immediate);
+    invalidateContentsAndRootView(updateRect, immediate);
 }
 
 void ChromeClientWinCE::scroll(const IntSize&, const IntRect& rectToScroll, const IntRect&)
 {
-    invalidateContentsAndWindow(rectToScroll, false);
+    invalidateContentsAndRootView(rectToScroll, false);
 }
 
 IntRect ChromeClientWinCE::windowToScreen(const IntRect& rect) const
index def2084..8207ee9 100644 (file)
@@ -93,8 +93,8 @@ public:
     virtual WebCore::IntRect windowResizerRect() const;
 
     // Methods used by HostWindow.
-    virtual void invalidateWindow(const WebCore::IntRect&, bool);
-    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
+    virtual void invalidateRootView(const WebCore::IntRect&, bool);
+    virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
     virtual void scroll(const WebCore::IntSize&, const WebCore::IntRect&, const WebCore::IntRect&);
     virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const;
index 0368630..8ac4a3d 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebKitSupport/ChromeClientWx.cpp:
+        (WebCore::ChromeClientWx::invalidateRootView):
+        (WebCore::ChromeClientWx::invalidateContentsForSlowScroll):
+        (WebCore::ChromeClientWx::invalidateContentsAndRootView):
+        * WebKitSupport/ChromeClientWx.h:
+
 2011-11-02  Tom Sepez  <tsepez@chromium.org>
 
         XSSAuditor is silent
index 9142f70..f9e3c7a 100644 (file)
@@ -340,7 +340,7 @@ IntRect ChromeClientWx::windowResizerRect() const
     return IntRect();
 }
 
-void ChromeClientWx::invalidateWindow(const IntRect& rect, bool immediate)
+void ChromeClientWx::invalidateRootView(const IntRect& rect, bool immediate)
 {
     if (immediate)
         m_webView->Update();
@@ -348,10 +348,10 @@ void ChromeClientWx::invalidateWindow(const IntRect& rect, bool immediate)
 
 void ChromeClientWx::invalidateContentsForSlowScroll(const IntRect& rect, bool immediate)
 {
-    invalidateContentsAndWindow(rect, immediate);
+    invalidateContentsAndRootView(rect, immediate);
 }
 
-void ChromeClientWx::invalidateContentsAndWindow(const IntRect& rect, bool immediate)
+void ChromeClientWx::invalidateContentsAndRootView(const IntRect& rect, bool immediate)
 {
     if (!m_webView)
         return;
index 101e09f..e4cb79a 100644 (file)
@@ -103,8 +103,8 @@ public:
     virtual void scrollBackingStore(int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect);
     virtual void updateBackingStore();
     
-    virtual void invalidateWindow(const IntRect&, bool);
-    virtual void invalidateContentsAndWindow(const IntRect&, bool);
+    virtual void invalidateRootView(const IntRect&, bool);
+    virtual void invalidateContentsAndRootView(const IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
     virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
 
index bc63543..b66b9d1 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-14  Anders Carlsson  <andersca@apple.com>
+
+        HostWindow invalidation functions should use root view coordinates
+        https://bugs.webkit.org/show_bug.cgi?id=72338
+
+        Reviewed by Dan Bernstein.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::invalidateRootView):
+        (WebKit::WebChromeClient::invalidateContentsAndRootView):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+
 2011-11-15  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Implement download support in WebKit2
index 117360e..9ce75b6 100644 (file)
@@ -370,12 +370,12 @@ IntRect WebChromeClient::windowResizerRect() const
     return m_page->windowResizerRect();
 }
 
-void WebChromeClient::invalidateWindow(const IntRect&, bool)
+void WebChromeClient::invalidateRootView(const IntRect&, bool)
 {
     // Do nothing here, there's no concept of invalidating the window in the web process.
 }
 
-void WebChromeClient::invalidateContentsAndWindow(const IntRect& rect, bool)
+void WebChromeClient::invalidateContentsAndRootView(const IntRect& rect, bool)
 {
     if (Document* document = m_page->corePage()->mainFrame()->document()) {
         if (document->printing())
index 82c432b..8c16544 100644 (file)
@@ -108,8 +108,8 @@ private:
     virtual WebCore::IntRect windowResizerRect() const OVERRIDE;
     
     // HostWindow member function overrides.
-    virtual void invalidateWindow(const WebCore::IntRect&, bool) OVERRIDE;
-    virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool) OVERRIDE;
+    virtual void invalidateRootView(const WebCore::IntRect&, bool) OVERRIDE;
+    virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool) OVERRIDE;
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool) OVERRIDE;
     virtual void scroll(const WebCore::IntSize& scrollOffset, const WebCore::IntRect& scrollRect, const WebCore::IntRect& clipRect) OVERRIDE;
 #if USE(TILED_BACKING_STORE)