Title: [217708] trunk/Source/WebCore
- Revision
- 217708
- Author
- [email protected]
- Date
- 2017-06-02 03:18:54 -0700 (Fri, 02 Jun 2017)
Log Message
Invalidate the shadow subtree style when slotted pseudo rules are present.
https://bugs.webkit.org/show_bug.cgi?id=172822
Patch by Emilio Cobos Álvarez <[email protected]> on 2017-06-02
Reviewed by Antti Koivisto.
No new tests, this is tested by
fast/shadow-dom/css-scoping-slot-with-id.html, once we don't force an
Inherit style change for slots. I could add some more tests for stuff
with descendant combinators and similar I guess, though.
* style/AttributeChangeInvalidation.cpp:
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
* style/ClassChangeInvalidation.cpp:
(WebCore::Style::ClassChangeInvalidation::invalidateStyle):
* style/IdChangeInvalidation.cpp:
(WebCore::Style::IdChangeInvalidation::invalidateStyle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (217707 => 217708)
--- trunk/Source/WebCore/ChangeLog 2017-06-02 09:57:54 UTC (rev 217707)
+++ trunk/Source/WebCore/ChangeLog 2017-06-02 10:18:54 UTC (rev 217708)
@@ -1,3 +1,22 @@
+2017-06-02 Emilio Cobos Álvarez <[email protected]>
+
+ Invalidate the shadow subtree style when slotted pseudo rules are present.
+ https://bugs.webkit.org/show_bug.cgi?id=172822
+
+ Reviewed by Antti Koivisto.
+
+ No new tests, this is tested by
+ fast/shadow-dom/css-scoping-slot-with-id.html, once we don't force an
+ Inherit style change for slots. I could add some more tests for stuff
+ with descendant combinators and similar I guess, though.
+
+ * style/AttributeChangeInvalidation.cpp:
+ (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
+ * style/ClassChangeInvalidation.cpp:
+ (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
+ * style/IdChangeInvalidation.cpp:
+ (WebCore::Style::IdChangeInvalidation::invalidateStyle):
+
2017-06-02 Miguel Gomez <[email protected]>
[GTK+][WPE] Allow TextureMapperShaderProgram to perform colorspace conversions with the source texture pixels
Modified: trunk/Source/WebCore/style/AttributeChangeInvalidation.cpp (217707 => 217708)
--- trunk/Source/WebCore/style/AttributeChangeInvalidation.cpp 2017-06-02 09:57:54 UTC (rev 217707)
+++ trunk/Source/WebCore/style/AttributeChangeInvalidation.cpp 2017-06-02 10:18:54 UTC (rev 217708)
@@ -28,6 +28,7 @@
#include "DocumentRuleSets.h"
#include "ElementIterator.h"
+#include "HTMLSlotElement.h"
#include "ShadowRoot.h"
#include "StyleInvalidator.h"
#include "StyleResolver.h"
@@ -97,6 +98,9 @@
if (m_element.shadowRoot() && ruleSets.authorStyle().hasShadowPseudoElementRules())
mayAffectShadowTree = true;
+ if (is<HTMLSlotElement>(m_element) && !ruleSets.authorStyle().slottedPseudoElementRules().isEmpty())
+ mayAffectShadowTree = true;
+
if (mayAffectShadowTree) {
m_element.invalidateStyleForSubtree();
return;
Modified: trunk/Source/WebCore/style/ClassChangeInvalidation.cpp (217707 => 217708)
--- trunk/Source/WebCore/style/ClassChangeInvalidation.cpp 2017-06-02 09:57:54 UTC (rev 217707)
+++ trunk/Source/WebCore/style/ClassChangeInvalidation.cpp 2017-06-02 10:18:54 UTC (rev 217708)
@@ -28,6 +28,7 @@
#include "DocumentRuleSets.h"
#include "ElementChildIterator.h"
+#include "HTMLSlotElement.h"
#include "ShadowRoot.h"
#include "SpaceSplitString.h"
#include "StyleInvalidator.h"
@@ -140,6 +141,9 @@
if (shadowRoot && ruleSets.authorStyle().hasShadowPseudoElementRules())
mayAffectShadowTree = true;
+ if (is<HTMLSlotElement>(m_element) && !ruleSets.authorStyle().slottedPseudoElementRules().isEmpty())
+ mayAffectShadowTree = true;
+
if (mayAffectShadowTree) {
// FIXME: We should do fine-grained invalidation for shadow tree.
m_element.invalidateStyleForSubtree();
Modified: trunk/Source/WebCore/style/IdChangeInvalidation.cpp (217707 => 217708)
--- trunk/Source/WebCore/style/IdChangeInvalidation.cpp 2017-06-02 09:57:54 UTC (rev 217707)
+++ trunk/Source/WebCore/style/IdChangeInvalidation.cpp 2017-06-02 10:18:54 UTC (rev 217708)
@@ -28,6 +28,7 @@
#include "DocumentRuleSets.h"
#include "ElementChildIterator.h"
+#include "HTMLSlotElement.h"
#include "ShadowRoot.h"
#include "StyleResolver.h"
#include "StyleScope.h"
@@ -83,6 +84,9 @@
if (m_element.shadowRoot() && ruleSets.authorStyle().hasShadowPseudoElementRules())
mayAffectShadowTree = true;
+ if (is<HTMLSlotElement>(m_element) && !ruleSets.authorStyle().slottedPseudoElementRules().isEmpty())
+ mayAffectShadowTree = true;
+
if (mayAffectShadowTree) {
m_element.invalidateStyleForSubtree();
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes