Title: [143819] trunk
Revision
143819
Author
[email protected]
Date
2013-02-22 17:15:14 -0800 (Fri, 22 Feb 2013)

Log Message

REGRESSION(r130089): Scrollbar thumb no longer re-rendered on hover
https://bugs.webkit.org/show_bug.cgi?id=109230

Source/WebCore:

In r130089, I accidentally removed the extra check that made scrollbar
parts styles sad. I put it back and made them happy.

Reviewed by Eric Seidel.

Test: fast/css/pseudo-element-selector-scrollbar-hover.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match): Added the check back.

LayoutTests:

Reviewed by Eric Seidel.

* fast/css/pseudo-element-selector-scrollbar-hover-expected.html: Added.
* fast/css/pseudo-element-selector-scrollbar-hover.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (143818 => 143819)


--- trunk/LayoutTests/ChangeLog	2013-02-23 01:10:31 UTC (rev 143818)
+++ trunk/LayoutTests/ChangeLog	2013-02-23 01:15:14 UTC (rev 143819)
@@ -1,3 +1,13 @@
+2013-02-22  Nils Barth  <[email protected]>
+
+        REGRESSION(r130089): Scrollbar thumb no longer re-rendered on hover
+        https://bugs.webkit.org/show_bug.cgi?id=109230
+
+        Reviewed by Eric Seidel.
+
+        * fast/css/pseudo-element-selector-scrollbar-hover-expected.html: Added.
+        * fast/css/pseudo-element-selector-scrollbar-hover.html: Added.
+
 2013-02-22  Levi Weintraub  <[email protected]>
 
         Unreviewed gardening, updating test expecations after r140374.

Added: trunk/LayoutTests/fast/css/pseudo-element-selector-scrollbar-hover-expected.html (0 => 143819)


--- trunk/LayoutTests/fast/css/pseudo-element-selector-scrollbar-hover-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/pseudo-element-selector-scrollbar-hover-expected.html	2013-02-23 01:15:14 UTC (rev 143819)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Scrollbar thumb re-rendering on hover</title>
+<style>
+    #scrollable {
+        height: 200px;
+        width: 200px;
+        overflow: auto;
+        background-color: green;
+        -webkit-appearance: none;
+    }
+
+    #scrollable::-webkit-scrollbar {
+        width: 10px;
+    }
+
+    #scrollable::-webkit-scrollbar-thumb {
+        background-color: green;
+    }
+
+    #content {
+        height: 400px;
+        width: 100px;
+    }
+</style>
+</head>
+<body>
+<p>Bug <a href="" REGRESSION(r130089): Scrollbar thumb no longer re-rendered on hover</p>
+<p>For this test to pass, the below box should be green (in DumpRenderTree).<br>
+Interactively, the whole box should turn green on mouseover, even if not over the scrollbar thumb.</p>
+<div id="scrollable">
+    <div id="content"></div>
+</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/css/pseudo-element-selector-scrollbar-hover.html (0 => 143819)


--- trunk/LayoutTests/fast/css/pseudo-element-selector-scrollbar-hover.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/pseudo-element-selector-scrollbar-hover.html	2013-02-23 01:15:14 UTC (rev 143819)
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Scrollbar thumb re-rendering on hover</title>
+<style>
+    #scrollable {
+        height: 200px;
+        width: 200px;
+        overflow: auto;
+        background-color: red;
+        -webkit-appearance: none;
+    }
+
+    #scrollable::-webkit-scrollbar {
+        width: 10px;
+        background-color: red;
+    }
+
+    #scrollable::-webkit-scrollbar-thumb {
+        background-color: red;
+    }
+
+    #scrollable:hover {
+        background-color: green;
+    }
+
+    #scrollable:hover::-webkit-scrollbar {
+        background-color: green;
+    }
+
+    #scrollable:hover::-webkit-scrollbar-thumb {
+        background-color: green;
+    }
+
+    #content {
+        height: 400px;
+        width: 100px;
+    }
+</style>
+</head>
+<body>
+<p>Bug <a href="" REGRESSION(r130089): Scrollbar thumb no longer re-rendered on hover</p>
+<p>For this test to pass, the below box should be green (in DumpRenderTree).<br>
+Interactively, the whole box should turn green on mouseover, even if not over the scrollbar thumb.</p>
+<div id="scrollable">
+    <div id="content"></div>
+</div>
+<script>
+    function hoverOverScrollable()
+    {
+        if (!window.testRunner)
+            return;
+
+        var scrollable = document.getElementById('scrollable');
+        var scrollBox = scrollable.getBoundingClientRect();
+        var scrollableCenterX = (scrollBox.left + scrollBox.right) / 2;
+        var scrollableCenterY = (scrollBox.top + scrollBox.bottom) / 2;
+
+        eventSender.mouseMoveTo(scrollableCenterX, scrollableCenterY);
+    }
+    window.addEventListener('load', hoverOverScrollable);
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (143818 => 143819)


--- trunk/Source/WebCore/ChangeLog	2013-02-23 01:10:31 UTC (rev 143818)
+++ trunk/Source/WebCore/ChangeLog	2013-02-23 01:15:14 UTC (rev 143819)
@@ -1,3 +1,18 @@
+2013-02-22  Dimitri Glazkov  <[email protected]>
+
+        REGRESSION(r130089): Scrollbar thumb no longer re-rendered on hover
+        https://bugs.webkit.org/show_bug.cgi?id=109230
+
+        In r130089, I accidentally removed the extra check that made scrollbar
+        parts styles sad. I put it back and made them happy.
+
+        Reviewed by Eric Seidel.
+
+        Test: fast/css/pseudo-element-selector-scrollbar-hover.html
+
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::match): Added the check back.
+
 2013-02-22  Tim Horton  <[email protected]>
 
         [WK2] The root and page overlay layers should be the size of the view, not the content

Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (143818 => 143819)


--- trunk/Source/WebCore/css/SelectorChecker.cpp	2013-02-23 01:10:31 UTC (rev 143818)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp	2013-02-23 01:15:14 UTC (rev 143819)
@@ -207,7 +207,7 @@
         // a selector is invalid if something follows a pseudo-element
         // We make an exception for scrollbar pseudo elements and allow a set of pseudo classes (but nothing else)
         // to follow the pseudo elements.
-        nextContext.hasScrollbarPseudo = RenderScrollbar::scrollbarForStyleResolve() || dynamicPseudo == SCROLLBAR_CORNER || dynamicPseudo == RESIZER;
+        nextContext.hasScrollbarPseudo = dynamicPseudo != NOPSEUDO && (RenderScrollbar::scrollbarForStyleResolve() || dynamicPseudo == SCROLLBAR_CORNER || dynamicPseudo == RESIZER);
         nextContext.hasSelectionPseudo = dynamicPseudo == SELECTION;
         if ((context.elementStyle || m_mode == CollectingRules || m_mode == QueryingRules) && dynamicPseudo != NOPSEUDO
             && !nextContext.hasSelectionPseudo
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to