Title: [171835] trunk/Source/WebCore
- Revision
- 171835
- Author
- [email protected]
- Date
- 2014-07-30 20:18:40 -0700 (Wed, 30 Jul 2014)
Log Message
ElementRuleCollector: group the shadow tree code
https://bugs.webkit.org/show_bug.cgi?id=135410
Reviewed by Andreas Kling.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
Little cleanup: group the shadow tree rule collection in the same block.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171834 => 171835)
--- trunk/Source/WebCore/ChangeLog 2014-07-31 03:17:39 UTC (rev 171834)
+++ trunk/Source/WebCore/ChangeLog 2014-07-31 03:18:40 UTC (rev 171835)
@@ -1,5 +1,16 @@
2014-07-30 Benjamin Poulain <[email protected]>
+ ElementRuleCollector: group the shadow tree code
+ https://bugs.webkit.org/show_bug.cgi?id=135410
+
+ Reviewed by Andreas Kling.
+
+ * css/ElementRuleCollector.cpp:
+ (WebCore::ElementRuleCollector::collectMatchingRules):
+ Little cleanup: group the shadow tree rule collection in the same block.
+
+2014-07-30 Benjamin Poulain <[email protected]>
+
Cleanup DetailsMarkerControl
https://bugs.webkit.org/show_bug.cgi?id=135429
Modified: trunk/Source/WebCore/css/ElementRuleCollector.cpp (171834 => 171835)
--- trunk/Source/WebCore/css/ElementRuleCollector.cpp 2014-07-31 03:17:39 UTC (rev 171834)
+++ trunk/Source/WebCore/css/ElementRuleCollector.cpp 2014-07-31 03:18:40 UTC (rev 171835)
@@ -146,18 +146,21 @@
ASSERT(matchRequest.ruleSet);
ASSERT_WITH_MESSAGE(!(m_mode == SelectorChecker::Mode::ResolvingStyle && !m_style), "When resolving style, the SelectorChecker must have a style to set the pseudo elements and/or to do marking. The SelectorCompiler also rely on that behavior.");
- const AtomicString& pseudoId = m_element.shadowPseudoId();
- if (!pseudoId.isEmpty())
- collectMatchingRulesForList(matchRequest.ruleSet->shadowPseudoElementRules(pseudoId.impl()), matchRequest, ruleRange);
-
#if ENABLE(VIDEO_TRACK)
if (m_element.isWebVTTElement())
collectMatchingRulesForList(matchRequest.ruleSet->cuePseudoRules(), matchRequest, ruleRange);
#endif
- // Only match UA rules in shadow tree.
- if (!MatchingUARulesScope::isMatchingUARules() && m_element.treeScope().rootNode().isShadowRoot())
- return;
+ if (m_element.isInShadowTree()) {
+ const AtomicString& pseudoId = m_element.shadowPseudoId();
+ if (!pseudoId.isEmpty())
+ collectMatchingRulesForList(matchRequest.ruleSet->shadowPseudoElementRules(pseudoId.impl()), matchRequest, ruleRange);
+
+ // Only match UA rules in shadow tree.
+ if (!MatchingUARulesScope::isMatchingUARules())
+ return;
+ }
+
// We need to collect the rules for id, class, tag, and everything else into a buffer and
// then sort the buffer.
if (m_element.hasID())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes