Title: [139669] trunk
- Revision
- 139669
- Author
- [email protected]
- Date
- 2013-01-14 14:44:02 -0800 (Mon, 14 Jan 2013)
Log Message
Positioned children of an overflow:visible container should ignore scroll offset when updating layer position
https://bugs.webkit.org/show_bug.cgi?id=106814
Source/WebCore:
Patch by Tien-Ren Chen <[email protected]> on 2013-01-14
Reviewed by Simon Fraser.
This patch fixes a bug in RenderLayer::updateLayerPosition that
scrollLeft / scrollTop of a block should only be effective when the
block has overflow clipping. The bug results in rendering artifacts
and triggers a RenderGeometryMap assertion falure.
Fixes http://crbug.com/167985
Test: fast/overflow/overflow-visible-should-ignore-scroll.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
LayoutTests:
This patch fixes a bug in RenderLayer::updateLayerPosition that
scrollLeft / scrollTop of a block should only be effective when the
block has overflow clipping. The bug results in rendering artifacts
and triggers a RenderGeometryMap assertion falure.
Fixes http://crbug.com/167985
Patch by Tien-Ren Chen <[email protected]> on 2013-01-14
Reviewed by Simon Fraser.
* fast/overflow/overflow-visible-should-ignore-scroll-expected.html: Added.
* fast/overflow/overflow-visible-should-ignore-scroll.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (139668 => 139669)
--- trunk/LayoutTests/ChangeLog 2013-01-14 22:41:44 UTC (rev 139668)
+++ trunk/LayoutTests/ChangeLog 2013-01-14 22:44:02 UTC (rev 139669)
@@ -1,3 +1,20 @@
+2013-01-14 Tien-Ren Chen <[email protected]>
+
+ Positioned children of an overflow:visible container should ignore scroll offset when updating layer position
+ https://bugs.webkit.org/show_bug.cgi?id=106814
+
+ This patch fixes a bug in RenderLayer::updateLayerPosition that
+ scrollLeft / scrollTop of a block should only be effective when the
+ block has overflow clipping. The bug results in rendering artifacts
+ and triggers a RenderGeometryMap assertion falure.
+
+ Fixes http://crbug.com/167985
+
+ Reviewed by Simon Fraser.
+
+ * fast/overflow/overflow-visible-should-ignore-scroll-expected.html: Added.
+ * fast/overflow/overflow-visible-should-ignore-scroll.html: Added.
+
2013-01-14 Emil A Eklund <[email protected]>
Unreviewed chromium mac rebaseline for r139659.
Added: trunk/LayoutTests/fast/overflow/overflow-visible-should-ignore-scroll-expected.html (0 => 139669)
--- trunk/LayoutTests/fast/overflow/overflow-visible-should-ignore-scroll-expected.html (rev 0)
+++ trunk/LayoutTests/fast/overflow/overflow-visible-should-ignore-scroll-expected.html 2013-01-14 22:44:02 UTC (rev 139669)
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+<body>
+<span style="position:absolute;">Absolute</span><span style="position:relative;left:100px;">Relative</span><br/>
+This test is successful if both words in the above line are displayed properly.
+</body>
+</html>
Added: trunk/LayoutTests/fast/overflow/overflow-visible-should-ignore-scroll.html (0 => 139669)
--- trunk/LayoutTests/fast/overflow/overflow-visible-should-ignore-scroll.html (rev 0)
+++ trunk/LayoutTests/fast/overflow/overflow-visible-should-ignore-scroll.html 2013-01-14 22:44:02 UTC (rev 139669)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+#outerbox {
+ height:0;
+ position:absolute;
+ overflow:hidden;
+}
+</style>
+<script type="text/_javascript_">
+function test () {
+ document.getElementById('outerbox').scrollTop=1000;
+ document.getElementById('outerbox').style.overflow='visible';
+}
+</script>
+</head>
+<body _onload_="test();">
+<div id="outerbox">
+<span style="position:absolute;">Absolute</span><span style="position:relative;left:100px;">Relative</span><br/>
+This test is successful if both words in the above line are displayed properly.
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (139668 => 139669)
--- trunk/Source/WebCore/ChangeLog 2013-01-14 22:41:44 UTC (rev 139668)
+++ trunk/Source/WebCore/ChangeLog 2013-01-14 22:44:02 UTC (rev 139669)
@@ -1,3 +1,22 @@
+2013-01-14 Tien-Ren Chen <[email protected]>
+
+ Positioned children of an overflow:visible container should ignore scroll offset when updating layer position
+ https://bugs.webkit.org/show_bug.cgi?id=106814
+
+ Reviewed by Simon Fraser.
+
+ This patch fixes a bug in RenderLayer::updateLayerPosition that
+ scrollLeft / scrollTop of a block should only be effective when the
+ block has overflow clipping. The bug results in rendering artifacts
+ and triggers a RenderGeometryMap assertion falure.
+
+ Fixes http://crbug.com/167985
+
+ Test: fast/overflow/overflow-visible-should-ignore-scroll.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateLayerPosition):
+
2013-01-14 Alec Flett <[email protected]>
IndexedDB: Remove IDBObjectStore/IndexBackendImpl and support functions
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (139668 => 139669)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-14 22:41:44 UTC (rev 139668)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-14 22:44:02 UTC (rev 139669)
@@ -1153,8 +1153,10 @@
RenderLayer* positionedParent = enclosingPositionedAncestor();
// For positioned layers, we subtract out the enclosing positioned layer's scroll offset.
- LayoutSize offset = positionedParent->scrolledContentOffset();
- localPoint -= offset;
+ if (positionedParent->renderer()->hasOverflowClip()) {
+ LayoutSize offset = positionedParent->scrolledContentOffset();
+ localPoint -= offset;
+ }
if (renderer()->isOutOfFlowPositioned() && positionedParent->renderer()->isInFlowPositioned() && positionedParent->renderer()->isRenderInline()) {
LayoutSize offset = toRenderInline(positionedParent->renderer())->offsetForInFlowPositionedInline(toRenderBox(renderer()));
@@ -1173,8 +1175,10 @@
localPoint += columnOffset;
}
- IntSize scrollOffset = parent()->scrolledContentOffset();
- localPoint -= scrollOffset;
+ if (parent()->renderer()->hasOverflowClip()) {
+ IntSize scrollOffset = parent()->scrolledContentOffset();
+ localPoint -= scrollOffset;
+ }
}
bool positionOrOffsetChanged = false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes