Diff
Modified: trunk/LayoutTests/ChangeLog (193510 => 193511)
--- trunk/LayoutTests/ChangeLog 2015-12-05 05:25:11 UTC (rev 193510)
+++ trunk/LayoutTests/ChangeLog 2015-12-05 07:11:16 UTC (rev 193511)
@@ -1,3 +1,15 @@
+2015-12-04 Zalan Bujtas <za...@apple.com>
+
+ Garbage in page tiles when document is too long.
+ https://bugs.webkit.org/show_bug.cgi?id=151906
+ rdar://problem/23695858
+
+ Reviewed by Simon Fraser.
+
+ * platform/ios-simulator/fast/block/float/overhanging-tall-block-expected.txt:
+ * platform/mac-mavericks/fast/block/float/overhanging-tall-block-expected.txt:
+ * platform/mac/fast/block/float/overhanging-tall-block-expected.txt:
+
2015-12-04 Brady Eidson <beid...@apple.com>
Modern IDB: Add some more custom exception messages, passing some more tests.
Modified: trunk/LayoutTests/platform/ios-simulator/fast/block/float/overhanging-tall-block-expected.txt (193510 => 193511)
--- trunk/LayoutTests/platform/ios-simulator/fast/block/float/overhanging-tall-block-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
+++ trunk/LayoutTests/platform/ios-simulator/fast/block/float/overhanging-tall-block-expected.txt 2015-12-05 07:11:16 UTC (rev 193511)
@@ -1,11 +1,11 @@
layer at (0,0) size 800x33554431
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x33554431 backgroundClip at (0,0) size 800x16777216 clip at (0,0) size 800x16777216 outlineClip at (0,0) size 800x16777216
+layer at (0,0) size 800x33554431
RenderBlock {HTML} at (0,0) size 800x33554431
RenderBody {BODY} at (8,8) size 784x33554423
RenderBlock {DIV} at (0,0) size 784x33554431
RenderBlock {DIV} at (0,33554431) size 784x0
RenderBlock {DIV} at (0,33554431) size 784x0
-layer at (10,11) size 135x33554431 backgroundClip at (10,11) size 135x16777205 clip at (11,12) size 133x16777204 outlineClip at (0,0) size 800x16777216
+layer at (10,11) size 135x33554431 backgroundClip at (10,11) size 135x33554421 clip at (11,12) size 133x33554420 outlineClip at (0,0) size 800x33554431
RenderTextControl {TEXTAREA} at (2,3) size 135x33554428 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
RenderBlock {DIV} at (3,3) size 129x14
Modified: trunk/LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.txt (193510 => 193511)
--- trunk/LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
+++ trunk/LayoutTests/platform/mac/fast/block/float/overhanging-tall-block-expected.txt 2015-12-05 07:11:16 UTC (rev 193511)
@@ -1,11 +1,11 @@
layer at (0,0) size 800x33554431
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x33554431 backgroundClip at (0,0) size 800x16777216 clip at (0,0) size 800x16777216 outlineClip at (0,0) size 800x16777216
+layer at (0,0) size 800x33554431
RenderBlock {HTML} at (0,0) size 800x33554431
RenderBody {BODY} at (8,8) size 784x33554423
RenderBlock {DIV} at (0,0) size 784x33554431
RenderBlock {DIV} at (0,33554431) size 784x0
RenderBlock {DIV} at (0,33554431) size 784x0
-layer at (10,11) size 152x33554431 backgroundClip at (10,11) size 152x16777205 clip at (11,12) size 150x16777204 outlineClip at (0,0) size 800x16777216
+layer at (10,11) size 152x33554431 backgroundClip at (10,11) size 152x33554421 clip at (11,12) size 150x33554420 outlineClip at (0,0) size 800x33554431
RenderTextControl {TEXTAREA} at (2,3) size 152x33554428 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
RenderBlock {DIV} at (3,3) size 146x13
Modified: trunk/LayoutTests/platform/mac-mavericks/fast/block/float/overhanging-tall-block-expected.txt (193510 => 193511)
--- trunk/LayoutTests/platform/mac-mavericks/fast/block/float/overhanging-tall-block-expected.txt 2015-12-05 05:25:11 UTC (rev 193510)
+++ trunk/LayoutTests/platform/mac-mavericks/fast/block/float/overhanging-tall-block-expected.txt 2015-12-05 07:11:16 UTC (rev 193511)
@@ -1,11 +1,11 @@
layer at (0,0) size 800x33554431
RenderView at (0,0) size 800x600
-layer at (0,0) size 800x33554431 backgroundClip at (0,0) size 800x16777216 clip at (0,0) size 800x16777216 outlineClip at (0,0) size 800x16777216
+layer at (0,0) size 800x33554431
RenderBlock {HTML} at (0,0) size 800x33554431
RenderBody {BODY} at (8,8) size 784x33554423
RenderBlock {DIV} at (0,0) size 784x33554431
RenderBlock {DIV} at (0,33554431) size 784x0
RenderBlock {DIV} at (0,33554431) size 784x0
-layer at (10,11) size 161x33554431 backgroundClip at (10,11) size 161x16777205 clip at (11,12) size 159x16777204 outlineClip at (0,0) size 800x16777216
+layer at (10,11) size 161x33554431 backgroundClip at (10,11) size 161x33554421 clip at (11,12) size 159x33554420 outlineClip at (0,0) size 800x33554431
RenderTextControl {TEXTAREA} at (2,3) size 161x33554428 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
RenderBlock {DIV} at (3,3) size 155x13
Modified: trunk/Source/WebCore/ChangeLog (193510 => 193511)
--- trunk/Source/WebCore/ChangeLog 2015-12-05 05:25:11 UTC (rev 193510)
+++ trunk/Source/WebCore/ChangeLog 2015-12-05 07:11:16 UTC (rev 193511)
@@ -1,3 +1,24 @@
+2015-12-04 Zalan Bujtas <za...@apple.com>
+
+ Garbage in page tiles when document is too long.
+ https://bugs.webkit.org/show_bug.cgi?id=151906
+ rdar://problem/23695858
+
+ Reviewed by Simon Fraser.
+
+ This patch partially fixes the broken concept(webkit.org/b/151908) of having a nearlyMax/2 sized rectangle to define infiniteness.
+ (see LayoutRect::infiniteRect() and ClipRect::isInfinite())
+
+ Covered by existing test.
+
+ * rendering/ClipRect.h: Branch for infinite clipping.
+ (WebCore::ClipRect::intersect):
+ (WebCore::ClipRect::intersects):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::clipToRect): Do not clip when clipping is infinite.
+ (WebCore::RenderLayer::restoreClip):
+ (WebCore::RenderLayer::calculateClipRects):
+
2015-12-04 Brady Eidson <beid...@apple.com>
Modern IDB: Add some more custom exception messages, passing some more tests.
Modified: trunk/Source/WebCore/rendering/ClipRect.h (193510 => 193511)
--- trunk/Source/WebCore/rendering/ClipRect.h 2015-12-05 05:25:11 UTC (rev 193510)
+++ trunk/Source/WebCore/rendering/ClipRect.h 2015-12-05 07:11:16 UTC (rev 193511)
@@ -52,13 +52,13 @@
bool operator!=(const ClipRect& other) const { return rect() != other.rect() || affectedByRadius() != other.affectedByRadius(); }
bool operator!=(const LayoutRect& otherRect) const { return rect() != otherRect; }
- void intersect(const LayoutRect& other) { m_rect.intersect(other); }
+ void intersect(const LayoutRect& other);
void intersect(const ClipRect& other);
void move(LayoutUnit x, LayoutUnit y) { m_rect.move(x, y); }
void move(const LayoutSize& size) { m_rect.move(size); }
void moveBy(const LayoutPoint& point) { m_rect.moveBy(point); }
- bool intersects(const LayoutRect& rect) const { return m_rect.intersects(rect); }
+ bool intersects(const LayoutRect&) const;
bool intersects(const HitTestLocation&) const;
bool isEmpty() const { return m_rect.isEmpty(); }
@@ -73,13 +73,30 @@
bool m_affectedByRadius = false;
};
+inline void ClipRect::intersect(const LayoutRect& other)
+{
+ if (other.isInfinite())
+ return;
+ if (isInfinite())
+ m_rect = other;
+ else
+ m_rect.intersect(other);
+}
+
inline void ClipRect::intersect(const ClipRect& other)
{
- m_rect.intersect(other.rect());
+ intersect(other.rect());
if (other.affectedByRadius())
m_affectedByRadius = true;
}
+inline bool ClipRect::intersects(const LayoutRect& rect) const
+{
+ if (isInfinite() || rect.isInfinite())
+ return true;
+ return m_rect.intersects(rect);
+}
+
inline ClipRect intersection(const ClipRect& a, const ClipRect& b)
{
ClipRect c = a;
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (193510 => 193511)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-12-05 05:25:11 UTC (rev 193510)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-12-05 07:11:16 UTC (rev 193511)
@@ -3802,8 +3802,7 @@
void RenderLayer::clipToRect(const LayerPaintingInfo& paintingInfo, GraphicsContext& context, const ClipRect& clipRect, BorderRadiusClippingRule rule)
{
float deviceScaleFactor = renderer().document().deviceScaleFactor();
-
- bool needsClipping = clipRect.rect() != paintingInfo.paintDirtyRect;
+ bool needsClipping = !clipRect.isInfinite() && clipRect.rect() != paintingInfo.paintDirtyRect;
if (needsClipping || clipRect.affectedByRadius())
context.save();
@@ -3832,7 +3831,7 @@
void RenderLayer::restoreClip(GraphicsContext& context, const LayoutRect& paintDirtyRect, const ClipRect& clipRect)
{
- if (clipRect.rect() != paintDirtyRect || clipRect.affectedByRadius())
+ if ((!clipRect.isInfinite() && clipRect.rect() != paintDirtyRect) || clipRect.affectedByRadius())
context.restore();
}
@@ -5762,6 +5761,9 @@
if (isRootLayer() || renderer().isDocumentElementRenderer())
return true;
+ if (damageRect.isInfinite())
+ return true;
+
if (damageRect.isEmpty())
return false;