Title: [98022] trunk
- Revision
- 98022
- Author
- m...@apple.com
- Date
- 2011-10-20 14:27:54 -0700 (Thu, 20 Oct 2011)
Log Message
Flipped-blocks writing mode blocks do not hit test their overflow
https://bugs.webkit.org/show_bug.cgi?id=70546
Reviewed by Sam Weinig.
Source/WebCore:
Test: fast/writing-mode/flipped-blocks-hit-test-overflow.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint): Flip the overflow rect if necessary.
LayoutTests:
* fast/writing-mode/flipped-blocks-hit-test-overflow-expected.txt: Added.
* fast/writing-mode/flipped-blocks-hit-test-overflow.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (98021 => 98022)
--- trunk/LayoutTests/ChangeLog 2011-10-20 21:12:00 UTC (rev 98021)
+++ trunk/LayoutTests/ChangeLog 2011-10-20 21:27:54 UTC (rev 98022)
@@ -1,3 +1,13 @@
+2011-10-20 Dan Bernstein <m...@apple.com>
+
+ Flipped-blocks writing mode blocks do not hit test their overflow
+ https://bugs.webkit.org/show_bug.cgi?id=70546
+
+ Reviewed by Sam Weinig.
+
+ * fast/writing-mode/flipped-blocks-hit-test-overflow-expected.txt: Added.
+ * fast/writing-mode/flipped-blocks-hit-test-overflow.html: Added.
+
2011-10-20 David Hyatt <hy...@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=70539
Added: trunk/LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow-expected.txt (0 => 98022)
--- trunk/LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow-expected.txt 2011-10-20 21:27:54 UTC (rev 98022)
@@ -0,0 +1,5 @@
+This tests hit-testing in the overflow area of flipped-blocks writing mode blocks.
+
+The red rectangle should turn green when you hover over it.
+
+PASS
Added: trunk/LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow.html (0 => 98022)
--- trunk/LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow.html (rev 0)
+++ trunk/LayoutTests/fast/writing-mode/flipped-blocks-hit-test-overflow.html 2011-10-20 21:27:54 UTC (rev 98022)
@@ -0,0 +1,25 @@
+<style>
+ #target { background-color: red; }
+ #target:hover { background-color: green; }
+</style>
+<div style="margin: 100px 0 0 92px; -webkit-writing-mode: horizontal-bt; height: 100px; width: 100px;">
+ <div style="height: 100px;"></div>
+ <div id="target" style="height: 50px;"></div>
+</div>
+<p>
+ This tests hit-testing in the overflow area of flipped-blocks writing mode
+ blocks.
+</p>
+<p>
+ The red rectangle should turn green when you hover over it.
+</p>
+<p id="result">
+</p>
+<script>
+ var target = document.getElementById("target");
+ var result = document.elementFromPoint(150, 75);
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ document.getElementById("result").innerText = result === target ? "PASS" : "FAIL";
+</script>
Modified: trunk/Source/WebCore/ChangeLog (98021 => 98022)
--- trunk/Source/WebCore/ChangeLog 2011-10-20 21:12:00 UTC (rev 98021)
+++ trunk/Source/WebCore/ChangeLog 2011-10-20 21:27:54 UTC (rev 98022)
@@ -1,3 +1,15 @@
+2011-10-20 Dan Bernstein <m...@apple.com>
+
+ Flipped-blocks writing mode blocks do not hit test their overflow
+ https://bugs.webkit.org/show_bug.cgi?id=70546
+
+ Reviewed by Sam Weinig.
+
+ Test: fast/writing-mode/flipped-blocks-hit-test-overflow.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::nodeAtPoint): Flip the overflow rect if necessary.
+
2011-10-20 David Hyatt <hy...@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=70539
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (98021 => 98022)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-10-20 21:12:00 UTC (rev 98021)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-10-20 21:27:54 UTC (rev 98022)
@@ -4113,6 +4113,7 @@
if (!isRenderView()) {
// Check if we need to do anything at all.
LayoutRect overflowBox = visualOverflowRect();
+ flipForWritingMode(overflowBox);
overflowBox.moveBy(adjustedLocation);
if (!overflowBox.intersects(result.rectForPoint(pointInContainer)))
return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes