Title: [208681] trunk/Source/WebCore
Revision
208681
Author
[email protected]
Date
2016-11-14 07:39:27 -0800 (Mon, 14 Nov 2016)

Log Message

Fix the !ENABLE(VIDEO_TRACK) build
https://bugs.webkit.org/show_bug.cgi?id=164476

Reviewed by Darin Adler.

* css/RuleSet.cpp:
(WebCore::RuleSet::addRule):
* css/parser/CSSParserValues.h:
(WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
* css/parser/CSSSelectorParser.cpp:
(WebCore::isPseudoElementFunction):
(WebCore::CSSSelectorParser::consumePseudo):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208680 => 208681)


--- trunk/Source/WebCore/ChangeLog	2016-11-14 15:21:16 UTC (rev 208680)
+++ trunk/Source/WebCore/ChangeLog	2016-11-14 15:39:27 UTC (rev 208681)
@@ -1,3 +1,18 @@
+2016-11-14  Csaba Osztrogonác  <[email protected]>
+
+        Fix the !ENABLE(VIDEO_TRACK) build
+        https://bugs.webkit.org/show_bug.cgi?id=164476
+
+        Reviewed by Darin Adler.
+
+        * css/RuleSet.cpp:
+        (WebCore::RuleSet::addRule):
+        * css/parser/CSSParserValues.h:
+        (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
+        * css/parser/CSSSelectorParser.cpp:
+        (WebCore::isPseudoElementFunction):
+        (WebCore::CSSSelectorParser::consumePseudo):
+
 2016-11-14  Miguel Gomez  <[email protected]>
 
         [GTK] Do not use gstreamer-gl when accelerated compositing is disabled

Modified: trunk/Source/WebCore/css/RuleSet.cpp (208680 => 208681)


--- trunk/Source/WebCore/css/RuleSet.cpp	2016-11-14 15:21:16 UTC (rev 208680)
+++ trunk/Source/WebCore/css/RuleSet.cpp	2016-11-14 15:39:27 UTC (rev 208681)
@@ -207,7 +207,9 @@
     const CSSSelector* focusSelector = nullptr;
     const CSSSelector* customPseudoElementSelector = nullptr;
     const CSSSelector* slottedPseudoElementSelector = nullptr;
+#if ENABLE(VIDEO_TRACK)
     const CSSSelector* cuePseudoElementSelector = nullptr;
+#endif
     const CSSSelector* selector = ruleData.selector();
     do {
         switch (selector->match()) {
@@ -285,10 +287,12 @@
         selector = selector->tagHistory();
     } while (selector);
 
+#if ENABLE(VIDEO_TRACK)
     if (cuePseudoElementSelector) {
         m_cuePseudoRules.append(ruleData);
         return;
     }
+#endif
 
     if (slottedPseudoElementSelector) {
         // ::slotted pseudo elements work accross shadow boundary making filtering difficult.

Modified: trunk/Source/WebCore/css/parser/CSSParserValues.h (208680 => 208681)


--- trunk/Source/WebCore/css/parser/CSSParserValues.h	2016-11-14 15:21:16 UTC (rev 208680)
+++ trunk/Source/WebCore/css/parser/CSSParserValues.h	2016-11-14 15:39:27 UTC (rev 208681)
@@ -263,7 +263,7 @@
     // connection of ShadowDescendant, and the current shadow DOM code doesn't expect this. When
     // we do fix this issue, make sure to patch the namespace prependTag code to remove the slotted
     // special case, since it will be covered by this function once again.
-    bool needsImplicitShadowCombinatorForMatching() const { return match() == CSSSelector::PseudoElement && (pseudoElementType() == CSSSelector::PseudoElementWebKitCustom || pseudoElementType() == CSSSelector::PseudoElementUserAgentCustom || pseudoElementType() == CSSSelector::PseudoElementWebKitCustomLegacyPrefixed || pseudoElementType() == CSSSelector::PseudoElementCue); }
+    bool needsImplicitShadowCombinatorForMatching() const;
 
     CSSParserSelector* tagHistory() const { return m_tagHistory.get(); }
     void setTagHistory(std::unique_ptr<CSSParserSelector> selector) { m_tagHistory = WTFMove(selector); }
@@ -284,6 +284,17 @@
     return m_selector->relation() == CSSSelector::ShadowDescendant;
 }
 
+inline bool CSSParserSelector::needsImplicitShadowCombinatorForMatching() const
+{
+    return match() == CSSSelector::PseudoElement
+        && (pseudoElementType() == CSSSelector::PseudoElementWebKitCustom
+            || pseudoElementType() == CSSSelector::PseudoElementUserAgentCustom
+#if ENABLE(VIDEO_TRACK)
+            || pseudoElementType() == CSSSelector::PseudoElementCue
+#endif
+            || pseudoElementType() == CSSSelector::PseudoElementWebKitCustomLegacyPrefixed);
+}
+
 inline void CSSParserValue::setFromValueList(std::unique_ptr<CSSParserValueList> valueList)
 {
     id = CSSValueInvalid;

Modified: trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp (208680 => 208681)


--- trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp	2016-11-14 15:21:16 UTC (rev 208680)
+++ trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp	2016-11-14 15:39:27 UTC (rev 208681)
@@ -486,7 +486,9 @@
 static bool isPseudoElementFunction(CSSSelector::PseudoElementType pseudoElementType)
 {
     switch (pseudoElementType) {
+#if ENABLE(VIDEO_TRACK)
     case CSSSelector::PseudoElementCue:
+#endif
     case CSSSelector::PseudoElementSlotted:
         return true;
     default:
@@ -634,6 +636,7 @@
     
     if (selector->match() == CSSSelector::PseudoElement) {
         switch (selector->pseudoElementType()) {
+#if ENABLE(VIDEO_TRACK)
         case CSSSelector::PseudoElementCue: {
             DisallowPseudoElementsScope scope(this);
             std::unique_ptr<CSSSelectorList> selectorList = std::unique_ptr<CSSSelectorList>(new CSSSelectorList());
@@ -643,6 +646,7 @@
             selector->setSelectorList(WTFMove(selectorList));
             return selector;
         }
+#endif
         case CSSSelector::PseudoElementSlotted: {
             DisallowPseudoElementsScope scope(this);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to