Title: [118612] trunk
- Revision
- 118612
- Author
- [email protected]
- Date
- 2012-05-26 13:15:56 -0700 (Sat, 26 May 2012)
Log Message
Clip rects assertion when hovering div with transform
https://bugs.webkit.org/show_bug.cgi?id=87580
Source/WebCore:
Reviewed by Eric Seidel.
Hit testing used to use temporary clip rects in composited documents,
until r118562. Now that we cache clip rects for hit testing, we need
to clear the cache on descendant layers when a layer gains or loses
a transform.
Test: fast/layers/clip-rects-assertion.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateTransform):
LayoutTests:
Reviewed by Eric Seidel.
Test that changes transform on hover style, testing for clipRect-related
assertions.
* fast/layers/clip-rects-assertion-expected.txt: Added.
* fast/layers/clip-rects-assertion.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (118611 => 118612)
--- trunk/LayoutTests/ChangeLog 2012-05-26 17:14:05 UTC (rev 118611)
+++ trunk/LayoutTests/ChangeLog 2012-05-26 20:15:56 UTC (rev 118612)
@@ -1,3 +1,16 @@
+2012-05-26 Simon Fraser <[email protected]>
+
+ Clip rects assertion when hovering div with transform
+ https://bugs.webkit.org/show_bug.cgi?id=87580
+
+ Reviewed by Eric Seidel.
+
+ Test that changes transform on hover style, testing for clipRect-related
+ assertions.
+
+ * fast/layers/clip-rects-assertion-expected.txt: Added.
+ * fast/layers/clip-rects-assertion.html: Added.
+
2012-05-26 Rob Buis <[email protected]>
Bug 15799: textPath element does not re-render when referenced path changes
Added: trunk/LayoutTests/fast/layers/clip-rects-assertion-expected.txt (0 => 118612)
--- trunk/LayoutTests/fast/layers/clip-rects-assertion-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/layers/clip-rects-assertion-expected.txt 2012-05-26 20:15:56 UTC (rev 118612)
@@ -0,0 +1,3 @@
+This test should not assert in debug builds.
+
+
Added: trunk/LayoutTests/fast/layers/clip-rects-assertion.html (0 => 118612)
--- trunk/LayoutTests/fast/layers/clip-rects-assertion.html (rev 0)
+++ trunk/LayoutTests/fast/layers/clip-rects-assertion.html 2012-05-26 20:15:56 UTC (rev 118612)
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ height: 200px;
+ width: 200px;
+ margin: 10px;
+ border: 1px solid black;
+ -webkit-perspective: 500px;
+ }
+
+ .container:hover {
+ -webkit-transform: translateX(0);
+ }
+
+ .box {
+ width: 100px;
+ height: 100px;
+ margin: 50px;
+ background-color: blue;
+ opacity: 0.5;
+ }
+ </style>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText(true);
+
+ function doTest()
+ {
+ if (!window.eventSender)
+ return;
+
+ eventSender.mouseMoveTo(5, 5);
+ document.body.offsetTop;
+ eventSender.mouseMoveTo(6, 6);
+
+ eventSender.mouseMoveTo(50, 50);
+ document.body.offsetTop;
+ eventSender.mouseMoveTo(51, 51);
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <p>This test should not assert in debug builds.</p>
+ <div class="container">
+ <div class="box"></div>
+ </div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (118611 => 118612)
--- trunk/Source/WebCore/ChangeLog 2012-05-26 17:14:05 UTC (rev 118611)
+++ trunk/Source/WebCore/ChangeLog 2012-05-26 20:15:56 UTC (rev 118612)
@@ -1,3 +1,20 @@
+2012-05-26 Simon Fraser <[email protected]>
+
+ Clip rects assertion when hovering div with transform
+ https://bugs.webkit.org/show_bug.cgi?id=87580
+
+ Reviewed by Eric Seidel.
+
+ Hit testing used to use temporary clip rects in composited documents,
+ until r118562. Now that we cache clip rects for hit testing, we need
+ to clear the cache on descendant layers when a layer gains or loses
+ a transform.
+
+ Test: fast/layers/clip-rects-assertion.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateTransform):
+
2012-05-25 Dan Bernstein <[email protected]>
<rdar://problem/11439771> WebProcess sends many synchronous messages to the UI process while scrolling beneath ScrollView::contentsToScreen()
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (118611 => 118612)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-05-26 17:14:05 UTC (rev 118611)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2012-05-26 20:15:56 UTC (rev 118612)
@@ -508,6 +508,9 @@
m_transform = adoptPtr(new TransformationMatrix);
else
m_transform.clear();
+
+ // Layers with transforms act as clip rects roots, so clear the cached clip rects here.
+ clearClipRectsIncludingDescendants();
}
if (hasTransform) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes