TiledBackingStore: Fix test regressions that appeared with r111560.
authorjocelyn.turcotte@nokia.com <jocelyn.turcotte@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 18:32:49 +0000 (18:32 +0000)
committerjocelyn.turcotte@nokia.com <jocelyn.turcotte@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 18:32:49 +0000 (18:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81519

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

The visible rect wasn't intersected with the contents rect anymore which
could lead to an astronomical layer size to check for intersecting tiles.

Add a visibleContentsRect that doesn't do the conversion and use it
in visibleAreaIsCovered.

* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::visibleContentsRect):
(WebCore):
(WebCore::TiledBackingStore::visibleRect):
(WebCore::TiledBackingStore::visibleAreaIsCovered):
* platform/graphics/TiledBackingStore.h:
(TiledBackingStore):

LayoutTests:

* platform/qt-5.0-wk2/Skipped:

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

LayoutTests/ChangeLog
LayoutTests/platform/qt-5.0-wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/TiledBackingStore.cpp
Source/WebCore/platform/graphics/TiledBackingStore.h

index e409a30753a831d6f9b948bcbbff8b9687d599ff..3da218cd3109d4488aa48cd6dbe48e2abb7329f4 100644 (file)
@@ -1,3 +1,12 @@
+2012-03-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
+
+        TiledBackingStore: Fix test regressions that appeared with r111560.
+        https://bugs.webkit.org/show_bug.cgi?id=81519
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * platform/qt-5.0-wk2/Skipped:
+
 2012-03-22  Dan Bernstein  <mitz@apple.com>
 
         Added fast/events/drag-link.html to the Mac WebKit2 skip list, because running it has
index 4bebc4f3bf88b548259ae5c200a92dae272f5b50..1b28066f5d4f75c5c0d2af41fa290e2c03ba5716 100644 (file)
@@ -530,14 +530,6 @@ compositing/visibility/visibility-simple-video-layer.html
 compositing/geometry/ancestor-overflow-change.html
 compositing/geometry/tall-page-composited.html
 
-# REGRESSION(r111560): compositing/geometry/preserve-3d-switching.html timeout.
-# https://bugs.webkit.org/show_bug.cgi?id=81519
-compositing/geometry/preserve-3d-switching.html
-# REGRESSION(r111560): The following tests are crashing.
-# https://bugs.webkit.org/show_bug.cgi?id=81519
-compositing/geometry/layer-due-to-layer-children.html
-compositing/geometry/repaint-foreground-layer.html
-
 # Boxes are not showing the correct perspective.
 transforms/3d/general/perspective-units.html
 
index 59c8b58dc7cf31a235e2cae1d5b92483bba9a45c..9fde225b1d297355f81fa72560534860e79f9631 100644 (file)
@@ -1,3 +1,24 @@
+2012-03-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
+
+        TiledBackingStore: Fix test regressions that appeared with r111560.
+        https://bugs.webkit.org/show_bug.cgi?id=81519
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        The visible rect wasn't intersected with the contents rect anymore which
+        could lead to an astronomical layer size to check for intersecting tiles.
+
+        Add a visibleContentsRect that doesn't do the conversion and use it
+        in visibleAreaIsCovered.
+
+        * platform/graphics/TiledBackingStore.cpp:
+        (WebCore::TiledBackingStore::visibleContentsRect):
+        (WebCore):
+        (WebCore::TiledBackingStore::visibleRect):
+        (WebCore::TiledBackingStore::visibleAreaIsCovered):
+        * platform/graphics/TiledBackingStore.h:
+        (TiledBackingStore):
+
 2012-03-22  Joe Thomas  <joethomas@motorola.com>
 
         Make Length Calculation functions non-inline
index b4f203a2085ed256fc538d3bce8829f64ef617b1..58432ceae3dfacc1decf66f31593e92685f6d35f 100644 (file)
@@ -166,9 +166,14 @@ void TiledBackingStore::paint(GraphicsContext* context, const IntRect& rect)
     context->restore();
 }
 
+IntRect TiledBackingStore::visibleContentsRect() const
+{
+    return intersection(m_client->tiledBackingStoreVisibleRect(), m_client->tiledBackingStoreContentsRect());
+}
+
 IntRect TiledBackingStore::visibleRect() const
 {
-    return mapFromContents(intersection(m_client->tiledBackingStoreVisibleRect(), m_client->tiledBackingStoreContentsRect()));
+    return mapFromContents(visibleContentsRect());
 }
 
 void TiledBackingStore::setContentsScale(float scale)
@@ -227,7 +232,7 @@ float TiledBackingStore::coverageRatio(const WebCore::IntRect& contentsRect) con
 
 bool TiledBackingStore::visibleAreaIsCovered() const
 {
-    return coverageRatio(m_client->tiledBackingStoreVisibleRect()) == 1.0f;
+    return coverageRatio(visibleContentsRect()) == 1.0f;
 }
 
 void TiledBackingStore::createTiles()
index 3c6ac93508ddb7eab172f51ad20d7420a347f942..8d662e4c4b2da654e1622af294431bd927fc80fa 100644 (file)
@@ -100,6 +100,7 @@ private:
     void setTile(const Tile::Coordinate& coordinate, PassRefPtr<Tile> tile);
     void removeTile(const Tile::Coordinate& coordinate);
 
+    IntRect visibleContentsRect() const;
     IntRect visibleRect() const;
 
     float coverageRatio(const IntRect&) const;