Title: [153016] branches/safari-537-branch

Diff

Modified: branches/safari-537-branch/LayoutTests/ChangeLog (153015 => 153016)


--- branches/safari-537-branch/LayoutTests/ChangeLog	2013-07-23 00:51:33 UTC (rev 153015)
+++ branches/safari-537-branch/LayoutTests/ChangeLog	2013-07-23 00:54:40 UTC (rev 153016)
@@ -1,5 +1,22 @@
 2013-07-22  Lucas Forschler  <[email protected]>
 
+        Merge r152907
+
+    2013-07-19  Radu Stavila  <[email protected]>
+
+            Hover doesn't work for block elements inside a href element
+            https://bugs.webkit.org/show_bug.cgi?id=118907
+
+            Reviewed by David Hyatt.
+
+            Don't skip all anonymous objects when searching for the hover ancestor, only the ones
+            directly flowed into a region.
+
+            * fast/css/hover-display-block-expected.txt: Added.
+            * fast/css/hover-display-block.html: Added.
+
+2013-07-22  Lucas Forschler  <[email protected]>
+
         Rollout r152703
 
 2013-07-22  Lucas Forschler  <[email protected]>

Copied: branches/safari-537-branch/LayoutTests/fast/css/hover-display-block-expected.txt (from rev 152907, trunk/LayoutTests/fast/css/hover-display-block-expected.txt) (0 => 153016)


--- branches/safari-537-branch/LayoutTests/fast/css/hover-display-block-expected.txt	                        (rev 0)
+++ branches/safari-537-branch/LayoutTests/fast/css/hover-display-block-expected.txt	2013-07-23 00:54:40 UTC (rev 153016)
@@ -0,0 +1,10 @@
+Hover should work for :display block elements
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getComputedStyle(test, null).color is "rgb(0, 255, 0)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/safari-537-branch/LayoutTests/fast/css/hover-display-block.html (from rev 152907, trunk/LayoutTests/fast/css/hover-display-block.html) (0 => 153016)


--- branches/safari-537-branch/LayoutTests/fast/css/hover-display-block.html	                        (rev 0)
+++ branches/safari-537-branch/LayoutTests/fast/css/hover-display-block.html	2013-07-23 00:54:40 UTC (rev 153016)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <style>
+  #test {
+    font: "ahem";
+    font-size: 50px;
+    display: block;
+    color: red;
+  }
+  a:hover #test {
+    color: rgb(0, 255, 0);
+  }
+  </style>
+</head>
+<body>
+  <div id="container">
+  <a href=""
+    <span id="test">This text should be green when hovered.</span>
+  </a>
+</div>
+</body>
+
+<script src=""
+<script>
+  if (window.testRunner) {
+    description("Hover should work for :display block elements")
+    var test = document.getElementById('test');
+    var container = document.getElementById('container');
+    test.offsetTop;
+    eventSender.mouseMoveTo(50, container.offsetTop + 25)
+    test.offsetTop;
+    shouldBeEqualToString("getComputedStyle(test, null).color", 'rgb(0, 255, 0)')
+    container.parentNode.removeChild(container); // clean up after ourselves.
+  }
+  successfullyParsed = true;
+</script>
+<script src=""

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153015 => 153016)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-23 00:51:33 UTC (rev 153015)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-07-23 00:54:40 UTC (rev 153016)
@@ -1,5 +1,23 @@
 2013-07-22  Lucas Forschler  <[email protected]>
 
+        Merge r152907
+
+    2013-07-19  Radu Stavila  <[email protected]>
+
+            Hover doesn't work for block elements inside a href element
+            https://bugs.webkit.org/show_bug.cgi?id=118907
+
+            Reviewed by David Hyatt.
+
+            Added test for hovering block elements inside a href element.
+
+            Test: fast/css/hover-display-block.html
+
+            * rendering/RenderObject.cpp:
+            (WebCore::RenderObject::hoverAncestor):
+
+2013-07-22  Lucas Forschler  <[email protected]>
+
         Merge r152858
 
     2013-07-18  Antoine Quint  <[email protected]>

Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderObject.cpp (153015 => 153016)


--- branches/safari-537-branch/Source/WebCore/rendering/RenderObject.cpp	2013-07-23 00:51:33 UTC (rev 153015)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderObject.cpp	2013-07-23 00:54:40 UTC (rev 153016)
@@ -3048,10 +3048,9 @@
     // See https://bugs.webkit.org/show_bug.cgi?id=111749
     RenderObject* hoverAncestor = parent();
     
-    // Skip anonymous blocks. There's no point in treating them as hover ancestors
-    // and it would also prevent us from continuing the search on the DOM tree
-    // when reaching the named flow thread.
-    if (hoverAncestor && hoverAncestor->isAnonymousBlock())
+    // Skip anonymous blocks directly flowed into flow threads as it would
+    // prevent us from continuing the search on the DOM tree when reaching the named flow thread.
+    if (hoverAncestor && hoverAncestor->isAnonymousBlock() && hoverAncestor->parent() && hoverAncestor->parent()->isRenderNamedFlowThread())
         hoverAncestor = hoverAncestor->parent();
 
     if (hoverAncestor && hoverAncestor->isRenderNamedFlowThread()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to