haikuwebkit/LayoutTests/fast/css/pseudo-active-style-sharing...

23 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

Fix style invalidation for :active when the activated node has no renderer https://bugs.webkit.org/show_bug.cgi?id=159125 Reviewed by Antti Koivisto. Source/WebCore: Same old bug: a style invalidation path was depending on the style. Here we really need both flags. An element can have childrenAffectedByActive() false and renderStyle->affectedByActive() true if it was subject to style sharing. The element state "childrenAffectedByActive" should be renamed "styleAffectedByActive" since it is not a parent invalidation flag. That will be done separately. Tests: fast/css/pseudo-active-on-labeled-control-without-renderer.html fast/css/pseudo-active-style-sharing-1.html fast/css/pseudo-active-style-sharing-2.html fast/css/pseudo-active-style-sharing-3.html fast/css/pseudo-active-style-sharing-4.html fast/css/pseudo-active-style-sharing-5.html fast/css/pseudo-active-style-sharing-6.html * dom/Element.cpp: (WebCore::Element::setActive): * style/StyleRelations.cpp: (WebCore::Style::commitRelationsToRenderStyle): LayoutTests: There was no bug with style sharing but I wanted that covered anyway. Style sharing depends on 2 flags which is uncommon. There was no test coverage whatsoever, breaking it did not fail any test. * fast/css/pseudo-active-on-labeled-control-without-renderer-expected.txt: Added. * fast/css/pseudo-active-on-labeled-control-without-renderer.html: Added. * fast/css/pseudo-active-style-sharing-1-expected.txt: Added. * fast/css/pseudo-active-style-sharing-1.html: Added. * fast/css/pseudo-active-style-sharing-2-expected.txt: Added. * fast/css/pseudo-active-style-sharing-2.html: Added. * fast/css/pseudo-active-style-sharing-3-expected.txt: Added. * fast/css/pseudo-active-style-sharing-3.html: Added. * fast/css/pseudo-active-style-sharing-4-expected.txt: Added. * fast/css/pseudo-active-style-sharing-4.html: Added. * fast/css/pseudo-active-style-sharing-5-expected.txt: Added. * fast/css/pseudo-active-style-sharing-5.html: Added. * fast/css/pseudo-active-style-sharing-6-expected.txt: Added. * fast/css/pseudo-active-style-sharing-6.html: Added. Canonical link: https://commits.webkit.org/177268@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-06-27 22:20:17 +00:00
Verify that a labeled elemed gets the :active state even if it has no renderer.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Initial state
PASS elementsWithActiveStyle() is []
PASS elementsMatchingActiveSelector() is []
On Mouse Down
PASS elementsWithActiveStyle() is ["#labelable-parent >> label:nth-child(2)", "#next-group >> input:nth-child(1)"]
PASS elementsMatchingActiveSelector() is ["html", "body", "webkit-test", "labelable-ancestor", "labelable-parent", "#labelable-parent >> label:nth-child(2)", "#next-group >> input:nth-child(1)"]
After Mouse Down
PASS elementsWithActiveStyle() is ["#labelable-parent >> label:nth-child(2)", "#next-group >> input:nth-child(1)"]
PASS elementsMatchingActiveSelector() is ["html", "body", "webkit-test", "labelable-ancestor", "labelable-parent", "#labelable-parent >> label:nth-child(2)", "#next-group >> input:nth-child(1)"]
On Mouse Up
PASS elementsWithActiveStyle() is []
PASS elementsMatchingActiveSelector() is []
PASS successfullyParsed is true
TEST COMPLETE