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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@202517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed