Zoomed, slow-scrolling pages keep recreating tiles when scrolled
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 00:48:45 +0000 (00:48 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Feb 2013 00:48:45 +0000 (00:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110379

Source/WebCore:

Reviewed by Tim Horton.

On slow-scrolling pages the TileCache makes the tiles the size of
the visible rect to minimize per-tile painting overhead. If the size
of that rect changes, the TileCache re-creates all the tiles.

This was a problem whem zoomed, because mapping the visible rect
through the scale transform and then rounding it would cause the
size to keep changing, causing lots of tile re-creation.

Fix by carrying the visibleRect around as a FloatRect, and doing
the same for the exposedRect. We then only expand to integers
when computing the tile size. This also fixes an issue where we could
sometimes make extra tiles because of fractional bits of tiles at the edges,
as shown by the test result change.

* platform/graphics/TiledBacking.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateVisibleRect):
* platform/graphics/ca/mac/TileCache.h:
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::setVisibleRect):
(WebCore::TileCache::setExposedRect):
(WebCore::TileCache::prepopulateRect):
(WebCore::TileCache::computeTileCoverageRect):
(WebCore::TileCache::tileSizeForCoverageRect):
(WebCore::TileCache::blankPixelCountForTiles):
(WebCore::TileCache::revalidateTiles):
(WebCore::TileCache::ensureTilesForRect):
* platform/graphics/ca/mac/WebTileLayer.mm:
(-[WebTileLayer logFilledFreshTile]):

Source/WebKit2:

Reviewed by Tim Horton.

Make the visible rect and exposed rects passed through
the drawing area to the tile cache FloatRects instead of IntRects.

* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):
(-[WKView _updateWindowAndViewFrames]):
(-[WKView enableFrameSizeUpdates]):
(-[WKView setMinimumWidthForAutoLayout:]):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::viewExposedRectChanged):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setExposedRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewExposedRectChanged):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setExposedRect):

LayoutTests:

Reviewed by Tim Horton.

This test now just has one tile, rather than four. There is an apparent issue
with the integral tile cache coverage rect being smaller than the visible rect.
This is caused by rounding when dumping the tile coverage rect.

* platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:

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

18 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/TiledBacking.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/mac/TileCache.h
Source/WebCore/platform/graphics/ca/mac/TileCache.mm
Source/WebCore/platform/graphics/ca/mac/WebTileLayer.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

index 713cdb9..bc4e5c5 100644 (file)
@@ -1,3 +1,16 @@
+2013-02-20  Simon Fraser  <simon.fraser@apple.com>
+
+        Zoomed, slow-scrolling pages keep recreating tiles when scrolled
+        https://bugs.webkit.org/show_bug.cgi?id=110379
+
+        Reviewed by Tim Horton.
+        
+        This test now just has one tile, rather than four. There is an apparent issue
+        with the integral tile cache coverage rect being smaller than the visible rect.
+        This is caused by rounding when dumping the tile coverage rect.
+
+        * platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:
+
 2013-02-20  Julien Chaffraix  <jchaffraix@webkit.org>
 
         [CSS Grid Layout] Implement the auto-placement algorithm without grid growth
index 766ccbc..3fe8a22 100644 (file)
@@ -10,9 +10,9 @@
       (backgroundColor #FFFFFF)
       (transform [1.70 0.00 0.00 0.00] [0.00 1.70 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
       (visible rect 0.00, 0.00 461.76 x 344.12)
-      (tile cache coverage 0, 0 784 x 584)
-      (tile size 785 x 586)
-      (top left tile 0, 0 tiles grid 2 x 2)
+      (tile cache coverage 0, 0 461 x 344)
+      (tile size 785 x 585)
+      (top left tile 0, 0 tiles grid 1 x 1)
       (children 1
         (GraphicsLayer
           (visible rect 0.00, 0.00 0.00 x 0.00)
index 4f285fc..70a2c58 100644 (file)
@@ -1,3 +1,40 @@
+2013-02-20  Simon Fraser  <simon.fraser@apple.com>
+
+        Zoomed, slow-scrolling pages keep recreating tiles when scrolled
+        https://bugs.webkit.org/show_bug.cgi?id=110379
+
+        Reviewed by Tim Horton.
+
+        On slow-scrolling pages the TileCache makes the tiles the size of
+        the visible rect to minimize per-tile painting overhead. If the size
+        of that rect changes, the TileCache re-creates all the tiles.
+        
+        This was a problem whem zoomed, because mapping the visible rect
+        through the scale transform and then rounding it would cause the
+        size to keep changing, causing lots of tile re-creation.
+        
+        Fix by carrying the visibleRect around as a FloatRect, and doing
+        the same for the exposedRect. We then only expand to integers
+        when computing the tile size. This also fixes an issue where we could
+        sometimes make extra tiles because of fractional bits of tiles at the edges,
+        as shown by the test result change.
+
+        * platform/graphics/TiledBacking.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::updateVisibleRect):
+        * platform/graphics/ca/mac/TileCache.h:
+        * platform/graphics/ca/mac/TileCache.mm:
+        (WebCore::TileCache::setVisibleRect):
+        (WebCore::TileCache::setExposedRect):
+        (WebCore::TileCache::prepopulateRect):
+        (WebCore::TileCache::computeTileCoverageRect):
+        (WebCore::TileCache::tileSizeForCoverageRect):
+        (WebCore::TileCache::blankPixelCountForTiles):
+        (WebCore::TileCache::revalidateTiles):
+        (WebCore::TileCache::ensureTilesForRect):
+        * platform/graphics/ca/mac/WebTileLayer.mm:
+        (-[WebTileLayer logFilledFreshTile]):
+
 2013-02-20  Julien Chaffraix  <jchaffraix@webkit.org>
 
         [CSS Grid Layout] Implement the auto-placement algorithm without grid growth
index a00d022..0ced4b4 100644 (file)
@@ -44,13 +44,13 @@ class TiledBacking {
 public:
     virtual ~TiledBacking() { }
 
-    virtual void setVisibleRect(const IntRect&) = 0;
-    virtual IntRect visibleRect() const = 0;
+    virtual void setVisibleRect(const FloatRect&) = 0;
+    virtual FloatRect visibleRect() const = 0;
 
-    virtual void setExposedRect(const IntRect&) = 0;
+    virtual void setExposedRect(const FloatRect&) = 0;
     virtual void setClipsToExposedRect(bool) = 0;
 
-    virtual void prepopulateRect(const IntRect&) = 0;
+    virtual void prepopulateRect(const FloatRect&) = 0;
 
     virtual void setIsInWindow(bool) = 0;
 
index 6c2c7b2..8d97498 100644 (file)
@@ -1621,7 +1621,7 @@ void GraphicsLayerCA::updateVisibleRect(const FloatRect& oldVisibleRect)
     if (m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer)
         tileArea = adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, m_sizeAtLastVisibleRectUpdate);
 
-    tiledBacking()->setVisibleRect(enclosingIntRect(tileArea));
+    tiledBacking()->setVisibleRect(tileArea);
 
     m_sizeAtLastVisibleRectUpdate = m_size;
 }
index 5989a3a..84aaed7 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef TileCache_h
 #define TileCache_h
 
+#include "FloatRect.h"
 #include "IntPointHash.h"
 #include "IntRect.h"
 #include "TiledBacking.h"
@@ -76,10 +77,10 @@ public:
     void setTileDebugBorderWidth(float);
     void setTileDebugBorderColor(CGColorRef);
 
-    virtual IntRect visibleRect() const OVERRIDE { return m_visibleRect; }
+    virtual FloatRect visibleRect() const OVERRIDE { return m_visibleRect; }
 
     unsigned blankPixelCount() const;
-    static unsigned blankPixelCountForTiles(const WebTileLayerList&, const IntRect&, const IntPoint&);
+    static unsigned blankPixelCountForTiles(const WebTileLayerList&, const FloatRect&, const IntPoint&);
 
     // Only public for the WebTileCacheMapLayer.
     void drawTileMapContents(CGContextRef, CGRect);
@@ -105,10 +106,10 @@ private:
     TileCache(WebTileCacheLayer*);
 
     // TiledBacking member functions.
-    virtual void setVisibleRect(const IntRect&) OVERRIDE;
-    virtual void setExposedRect(const IntRect&) OVERRIDE;
+    virtual void setVisibleRect(const FloatRect&) OVERRIDE;
+    virtual void setExposedRect(const FloatRect&) OVERRIDE;
     virtual void setClipsToExposedRect(bool) OVERRIDE;
-    virtual void prepopulateRect(const IntRect&) OVERRIDE;
+    virtual void prepopulateRect(const FloatRect&) OVERRIDE;
     virtual void setIsInWindow(bool) OVERRIDE;
     virtual void setTileCoverage(TileCoverage) OVERRIDE;
     virtual TileCoverage tileCoverage() const OVERRIDE { return m_tileCoverage; }
@@ -130,8 +131,8 @@ private:
     IntRect rectForTileIndex(const TileIndex&) const;
     void getTileIndexRangeForRect(const IntRect&, TileIndex& topLeft, TileIndex& bottomRight) const;
 
-    IntRect computeTileCoverageRect(const IntRect& previousVisibleRect) const;
-    IntSize tileSizeForCoverageRect(const IntRect&) const;
+    FloatRect computeTileCoverageRect(const FloatRect& previousVisibleRect) const;
+    IntSize tileSizeForCoverageRect(const FloatRect&) const;
 
     void scheduleTileRevalidation(double interval);
     void tileRevalidationTimerFired(Timer<TileCache>*);
@@ -142,7 +143,7 @@ private:
     typedef unsigned TileValidationPolicyFlags;
 
     void revalidateTiles(TileValidationPolicyFlags foregroundValidationPolicy = 0, TileValidationPolicyFlags backgroundValidationPolicy = 0);
-    void ensureTilesForRect(const IntRect&);
+    void ensureTilesForRect(const FloatRect&);
     void updateTileCoverageMap();
 
     void removeAllTiles();
@@ -168,9 +169,9 @@ private:
     RetainPtr<WebTiledScrollingIndicatorLayer> m_tiledScrollingIndicatorLayer; // Used for coverage visualization.
 
     IntSize m_tileSize;
-    IntRect m_visibleRect;
-    IntRect m_visibleRectAtLastRevalidate;
-    IntRect m_exposedRect; // The exposed area of containing platform views.
+    FloatRect m_visibleRect;
+    FloatRect m_visibleRectAtLastRevalidate;
+    FloatRect m_exposedRect; // The exposed area of containing platform views.
 
     typedef HashMap<TileIndex, TileInfo> TileMap;
     TileMap m_tiles;
index 6505be6..8971a82 100644 (file)
@@ -297,7 +297,7 @@ void TileCache::setTilesOpaque(bool opaque)
     }
 }
 
-void TileCache::setVisibleRect(const IntRect& visibleRect)
+void TileCache::setVisibleRect(const FloatRect& visibleRect)
 {
     if (m_visibleRect == visibleRect)
         return;
@@ -306,7 +306,7 @@ void TileCache::setVisibleRect(const IntRect& visibleRect)
     revalidateTiles();
 }
 
-void TileCache::setExposedRect(const IntRect& exposedRect)
+void TileCache::setExposedRect(const FloatRect& exposedRect)
 {
     if (m_exposedRect == exposedRect)
         return;
@@ -327,7 +327,7 @@ void TileCache::setClipsToExposedRect(bool clipsToExposedRect)
         revalidateTiles();
 }
 
-void TileCache::prepopulateRect(const IntRect& rect)
+void TileCache::prepopulateRect(const FloatRect& rect)
 {
     ensureTilesForRect(rect);
 }
@@ -417,9 +417,9 @@ void TileCache::getTileIndexRangeForRect(const IntRect& rect, TileIndex& topLeft
     bottomRight.setY(max(bottomYRatio - 1, 0));
 }
 
-IntRect TileCache::computeTileCoverageRect(const IntRect& previousVisibleRect) const
+FloatRect TileCache::computeTileCoverageRect(const FloatRect& previousVisibleRect) const
 {
-    IntRect visibleRect = m_visibleRect;
+    FloatRect visibleRect = m_visibleRect;
 
     if (m_clipsToExposedRect)
         visibleRect.intersect(m_exposedRect);
@@ -433,8 +433,8 @@ IntRect TileCache::computeTileCoverageRect(const IntRect& previousVisibleRect) c
     bool largeVisibleRectChange = !previousVisibleRect.isEmpty() && !visibleRect.intersects(previousVisibleRect);
     
     // FIXME: look at how far the document can scroll in each dimension.
-    int coverageHorizontalSize = visibleRect.width();
-    int coverageVerticalSize = visibleRect.height();
+    float coverageHorizontalSize = visibleRect.width();
+    float coverageVerticalSize = visibleRect.height();
     
     // Inflate the coverage rect so that it covers 2x of the visible width and 3x of the visible height.
     // These values were chosen because it's more common to have tall pages and to scroll vertically,
@@ -446,24 +446,24 @@ IntRect TileCache::computeTileCoverageRect(const IntRect& previousVisibleRect) c
         coverageVerticalSize *= 3;
 
     // Don't extend coverage before 0 or after the end.
-    IntRect coverageBounds = bounds();
-    int coverageLeft = visibleRect.x() - (coverageHorizontalSize - visibleRect.width()) / 2;
+    FloatRect coverageBounds = bounds();
+    float coverageLeft = visibleRect.x() - (coverageHorizontalSize - visibleRect.width()) / 2;
     coverageLeft = min(coverageLeft, coverageBounds.maxX() - coverageHorizontalSize);
     coverageLeft = max(coverageLeft, coverageBounds.x());
 
-    int coverageTop = visibleRect.y() - (coverageVerticalSize - visibleRect.height()) / 2;
+    float coverageTop = visibleRect.y() - (coverageVerticalSize - visibleRect.height()) / 2;
     coverageTop = min(coverageTop, coverageBounds.maxY() - coverageVerticalSize);
     coverageTop = max(coverageTop, coverageBounds.y());
 
-    return IntRect(coverageLeft, coverageTop, coverageHorizontalSize, coverageVerticalSize);
+    return FloatRect(coverageLeft, coverageTop, coverageHorizontalSize, coverageVerticalSize);
 }
 
-IntSize TileCache::tileSizeForCoverageRect(const IntRect& coverageRect) const
+IntSize TileCache::tileSizeForCoverageRect(const FloatRect& coverageRect) const
 {
     if (m_tileCoverage & CoverageForSlowScrolling) {
-        IntSize tileSize = coverageRect.size();
+        FloatSize tileSize = coverageRect.size();
         tileSize.scale(m_scale);
-        return tileSize;
+        return expandedIntSize(tileSize);
     }
 
     return IntSize(defaultTileCacheWidth, defaultTileCacheHeight);
@@ -495,21 +495,21 @@ unsigned TileCache::blankPixelCount() const
     return blankPixelCountForTiles(tiles, m_visibleRect, IntPoint(0,0));
 }
 
-unsigned TileCache::blankPixelCountForTiles(const WebTileLayerList& tiles, const IntRect& visibleRect, const IntPoint& tileTranslation)
+unsigned TileCache::blankPixelCountForTiles(const WebTileLayerList& tiles, const FloatRect& visibleRect, const IntPoint& tileTranslation)
 {
     Region paintedVisibleTiles;
 
     for (WebTileLayerList::const_iterator it = tiles.begin(), end = tiles.end(); it != end; ++it) {
         const WebTileLayer* tileLayer = it->get();
 
-        IntRect visiblePart(CGRectOffset([tileLayer frame], tileTranslation.x(), tileTranslation.y()));
+        FloatRect visiblePart(CGRectOffset([tileLayer frame], tileTranslation.x(), tileTranslation.y()));
         visiblePart.intersect(visibleRect);
 
         if (!visiblePart.isEmpty())
-            paintedVisibleTiles.unite(visiblePart);
+            paintedVisibleTiles.unite(enclosingIntRect(visiblePart));
     }
 
-    Region uncoveredRegion(visibleRect);
+    Region uncoveredRegion(enclosingIntRect(visibleRect));
     uncoveredRegion.subtract(paintedVisibleTiles);
 
     return uncoveredRegion.totalArea();
@@ -581,7 +581,7 @@ void TileCache::revalidateTiles(TileValidationPolicyFlags foregroundValidationPo
     if (!platformLayer)
         return;
 
-    IntRect visibleRect = m_visibleRect;
+    FloatRect visibleRect = m_visibleRect;
 
     if (m_clipsToExposedRect)
         visibleRect.intersect(m_exposedRect);
@@ -591,7 +591,7 @@ void TileCache::revalidateTiles(TileValidationPolicyFlags foregroundValidationPo
     
     TileValidationPolicyFlags validationPolicy = m_isInWindow ? foregroundValidationPolicy : backgroundValidationPolicy;
     
-    IntRect tileCoverageRect = computeTileCoverageRect(m_visibleRectAtLastRevalidate);
+    FloatRect tileCoverageRect = computeTileCoverageRect(m_visibleRectAtLastRevalidate);
     FloatRect scaledRect(tileCoverageRect);
     scaledRect.scale(m_scale);
     IntRect coverageRectInTileCoords(enclosingIntRect(scaledRect));
@@ -750,7 +750,7 @@ void TileCache::cohortRemovalTimerFired(Timer<TileCache>*)
         updateTileCoverageMap();
 }
 
-void TileCache::ensureTilesForRect(const IntRect& rect)
+void TileCache::ensureTilesForRect(const FloatRect& rect)
 {
     if (m_unparentsOffscreenTiles && !m_isInWindow)
         return;
index ac9c1f4..9593cb6 100644 (file)
@@ -78,7 +78,7 @@ using namespace WebCore;
 
 - (void)logFilledFreshTile
 {
-    IntRect visiblePart(enclosingIntRect([self frame]));
+    FloatRect visiblePart([self frame]);
     visiblePart.intersect(_tileCache->visibleRect());
 
     if ([self paintCount] == 1 && !visiblePart.isEmpty())
index a8763e3..663a17e 100644 (file)
@@ -1,3 +1,32 @@
+2013-02-20  Simon Fraser  <simon.fraser@apple.com>
+
+        Zoomed, slow-scrolling pages keep recreating tiles when scrolled
+        https://bugs.webkit.org/show_bug.cgi?id=110379
+
+        Reviewed by Tim Horton.
+
+        Make the visible rect and exposed rects passed through
+        the drawing area to the tile cache FloatRects instead of IntRects.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView setFrameSize:]):
+        (-[WKView _updateWindowAndViewFrames]):
+        (-[WKView enableFrameSizeUpdates]):
+        (-[WKView setMinimumWidthForAutoLayout:]):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::viewExposedRectChanged):
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::setExposedRect):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::viewExposedRectChanged):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        (TiledCoreAnimationDrawingArea):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
+
 2013-02-20  Dirk Schulze  <krit@webkit.org>
 
         Enable CANVAS_PATH flag
index dc4fb3c..446eb31 100644 (file)
@@ -382,7 +382,7 @@ struct WKViewInterpretKeyEventsParameters {
 
     if (![self frameSizeUpdatesDisabled]) {
         if (_data->_expandsToFitContentViaAutoLayout)
-            _data->_page->viewExposedRectChanged(enclosingIntRect([self visibleRect]));
+            _data->_page->viewExposedRectChanged([self visibleRect]);
         [self _setDrawingAreaSize:size];
     }
 }
@@ -398,7 +398,7 @@ struct WKViewInterpretKeyEventsParameters {
     
     _data->_page->windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates), IntPoint(accessibilityPosition));
     if (_data->_expandsToFitContentViaAutoLayout)
-        _data->_page->viewExposedRectChanged(enclosingIntRect([self visibleRect]));
+        _data->_page->viewExposedRectChanged([self visibleRect]);
 }
 
 - (void)renewGState
@@ -3202,7 +3202,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
     
     if (!(--_data->_frameSizeUpdatesDisabledCount)) {
         if (_data->_expandsToFitContentViaAutoLayout)
-            _data->_page->viewExposedRectChanged(enclosingIntRect([self visibleRect]));
+            _data->_page->viewExposedRectChanged([self visibleRect]);
         [self _setDrawingAreaSize:[self frame].size];
     }
 }
@@ -3263,7 +3263,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
     _data->_page->setMinimumLayoutWidth(minimumLayoutWidth);
 
     if (expandsToFit)
-        _data->_page->viewExposedRectChanged(enclosingIntRect([self visibleRect]));
+        _data->_page->viewExposedRectChanged([self visibleRect]);
 
     _data->_page->setMainFrameIsScrollable(!expandsToFit);
 }
index c806b9b..4a6e2c4 100644 (file)
@@ -382,7 +382,7 @@ public:
 #if PLATFORM(MAC)
     void updateWindowIsVisible(bool windowIsVisible);
     void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates, const WebCore::IntPoint& accessibilityViewCoordinates);
-    void viewExposedRectChanged(const WebCore::IntRect& exposedRect);
+    void viewExposedRectChanged(const WebCore::FloatRect& exposedRect);
     void setMainFrameIsScrollable(bool);
 
     void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
index af9368c..6057308 100644 (file)
@@ -137,7 +137,7 @@ void WebPageProxy::windowAndViewFramesChanged(const IntRect& windowFrameInScreen
     process()->send(Messages::WebPage::WindowAndViewFramesChanged(windowFrameInScreenCoordinates, viewFrameInWindowCoordinates, accessibilityViewCoordinates), m_pageID);
 }
 
-void WebPageProxy::viewExposedRectChanged(const IntRect& exposedRect)
+void WebPageProxy::viewExposedRectChanged(const FloatRect& exposedRect)
 {
     if (!isValid())
         return;
index 1771c22..9c76c82 100644 (file)
@@ -84,7 +84,7 @@ public:
     virtual void updatePreferences(const WebPreferencesStore&) { }
     virtual void mainFrameContentSizeChanged(const WebCore::IntSize&) { }
 
-    virtual void setExposedRect(const WebCore::IntRect&) { }
+    virtual void setExposedRect(const WebCore::FloatRect&) { }
     virtual void mainFrameScrollabilityChanged(bool) { }
 
 #if USE(ACCELERATED_COMPOSITING)
index 85e9c9c..b036ed5 100644 (file)
@@ -2911,7 +2911,7 @@ void WebPage::windowAndViewFramesChanged(const IntRect& windowFrameInScreenCoord
 }
 #endif
 
-void WebPage::viewExposedRectChanged(const IntRect& exposedRect)
+void WebPage::viewExposedRectChanged(const FloatRect& exposedRect)
 {
     m_drawingArea->setExposedRect(exposedRect);
 }
index b3ab93b..97f46db 100644 (file)
@@ -721,7 +721,7 @@ private:
     void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
 #endif
 
-    void viewExposedRectChanged(const WebCore::IntRect& exposedRect);
+    void viewExposedRectChanged(const WebCore::FloatRect& exposedRect);
     void setMainFrameIsScrollable(bool);
 
     void unapplyEditCommand(uint64_t commandID);
index 7d9d378..33ae3db 100644 (file)
@@ -256,7 +256,7 @@ messages -> WebPage LegacyReceiver {
 
     SetWindowIsVisible(bool windowIsVisible)
     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
-    ViewExposedRectChanged(WebCore::IntRect exposedRect)
+    ViewExposedRectChanged(WebCore::FloatRect exposedRect)
     SetMainFrameIsScrollable(bool isScrollable)
     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
     GetStringSelectionForPasteboard() -> (WTF::String stringValue)
index 0446215..5b6d366 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "DrawingArea.h"
 #include "LayerTreeContext.h"
+#include <WebCore/FloatRect.h>
 #include <WebCore/GraphicsLayerClient.h>
 #include <WebCore/LayerFlushScheduler.h>
 #include <WebCore/LayerFlushSchedulerClient.h>
@@ -72,7 +73,7 @@ private:
     virtual void updatePreferences(const WebPreferencesStore&) OVERRIDE;
     virtual void mainFrameContentSizeChanged(const WebCore::IntSize&) OVERRIDE;
 
-    virtual void setExposedRect(const WebCore::IntRect&) OVERRIDE;
+    virtual void setExposedRect(const WebCore::FloatRect&) OVERRIDE;
     virtual void mainFrameScrollabilityChanged(bool) OVERRIDE;
 
     virtual void dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>&) OVERRIDE;
@@ -120,7 +121,7 @@ private:
     bool m_isPaintingSuspended;
     bool m_hasRootCompositingLayer;
 
-    WebCore::IntRect m_exposedRect;
+    WebCore::FloatRect m_exposedRect;
 
     WebCore::IntSize m_lastSentIntrinsicContentSize;
     bool m_inUpdateGeometry;
index d45769f..eab0dfe 100644 (file)
@@ -339,7 +339,7 @@ void TiledCoreAnimationDrawingArea::resumePainting()
         m_webPage->corePage()->resumeScriptedAnimations();
 }
 
-void TiledCoreAnimationDrawingArea::setExposedRect(const IntRect& exposedRect)
+void TiledCoreAnimationDrawingArea::setExposedRect(const FloatRect& exposedRect)
 {
     // FIXME: This should be mapped through the scroll offset, but we need to keep it up to date.
     m_exposedRect = exposedRect;