Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: Source/core/css/CSSSelector.cpp

Issue 210763002: Remove Runtime ShadowDOM flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSelector.cpp
diff --git a/Source/core/css/CSSSelector.cpp b/Source/core/css/CSSSelector.cpp
index b02150d117e219f51761c14f931a6c5bcb8e92b8..9c892c31652ccc5f74c82b6ac07ae69d12b378a5 100644
--- a/Source/core/css/CSSSelector.cpp
+++ b/Source/core/css/CSSSelector.cpp
@@ -274,90 +274,89 @@ PseudoId CSSSelector::pseudoId(PseudoType type)
struct NameToPseudoStruct {
const char* string;
unsigned type:8;
- unsigned requirement:8;
};
const static NameToPseudoStruct pseudoTypeMap[] = {
-{"active", CSSSelector::PseudoActive, 0},
-{"after", CSSSelector::PseudoAfter, 0},
-{"-webkit-any(", CSSSelector::PseudoAny, 0},
-{"-webkit-any-link", CSSSelector::PseudoAnyLink, 0},
-{"-webkit-autofill", CSSSelector::PseudoAutofill, 0},
-{"backdrop", CSSSelector::PseudoBackdrop, 0},
-{"before", CSSSelector::PseudoBefore, 0},
-{"checked", CSSSelector::PseudoChecked, 0},
-{"default", CSSSelector::PseudoDefault, 0},
-{"disabled", CSSSelector::PseudoDisabled, 0},
-{"read-only", CSSSelector::PseudoReadOnly, 0},
-{"read-write", CSSSelector::PseudoReadWrite, 0},
-{"valid", CSSSelector::PseudoValid, 0},
-{"invalid", CSSSelector::PseudoInvalid, 0},
-{"-webkit-drag", CSSSelector::PseudoDrag, 0},
-{"empty", CSSSelector::PseudoEmpty, 0},
-{"enabled", CSSSelector::PseudoEnabled, 0},
-{"first-child", CSSSelector::PseudoFirstChild, 0},
-{"first-letter", CSSSelector::PseudoFirstLetter, 0},
-{"first-line", CSSSelector::PseudoFirstLine, 0},
-{"first-of-type", CSSSelector::PseudoFirstOfType, 0},
-{"-webkit-full-page-media", CSSSelector::PseudoFullPageMedia, 0},
-{"nth-child(", CSSSelector::PseudoNthChild, 0},
-{"nth-of-type(", CSSSelector::PseudoNthOfType, 0},
-{"nth-last-child(", CSSSelector::PseudoNthLastChild, 0},
-{"nth-last-of-type(", CSSSelector::PseudoNthLastOfType, 0},
-{"focus", CSSSelector::PseudoFocus, 0},
-{"hover", CSSSelector::PseudoHover, 0},
-{"indeterminate", CSSSelector::PseudoIndeterminate, 0},
-{"last-child", CSSSelector::PseudoLastChild, 0},
-{"last-of-type", CSSSelector::PseudoLastOfType, 0},
-{"link", CSSSelector::PseudoLink, 0},
-{"lang(", CSSSelector::PseudoLang, 0},
-{"not(", CSSSelector::PseudoNot, 0},
-{"only-child", CSSSelector::PseudoOnlyChild, 0},
-{"only-of-type", CSSSelector::PseudoOnlyOfType, 0},
-{"optional", CSSSelector::PseudoOptional, 0},
-{"required", CSSSelector::PseudoRequired, 0},
-{"-webkit-resizer", CSSSelector::PseudoResizer, 0},
-{"root", CSSSelector::PseudoRoot, 0},
-{"-webkit-scrollbar", CSSSelector::PseudoScrollbar, 0},
-{"-webkit-scrollbar-button", CSSSelector::PseudoScrollbarButton, 0},
-{"-webkit-scrollbar-corner", CSSSelector::PseudoScrollbarCorner, 0},
-{"-webkit-scrollbar-thumb", CSSSelector::PseudoScrollbarThumb, 0},
-{"-webkit-scrollbar-track", CSSSelector::PseudoScrollbarTrack, 0},
-{"-webkit-scrollbar-track-piece", CSSSelector::PseudoScrollbarTrackPiece, 0},
-{"selection", CSSSelector::PseudoSelection, 0},
-{"target", CSSSelector::PseudoTarget, 0},
-{"visited", CSSSelector::PseudoVisited, 0},
-{"window-inactive", CSSSelector::PseudoWindowInactive, 0},
-{"decrement", CSSSelector::PseudoDecrement, 0},
-{"increment", CSSSelector::PseudoIncrement, 0},
-{"start", CSSSelector::PseudoStart, 0},
-{"end", CSSSelector::PseudoEnd, 0},
-{"horizontal", CSSSelector::PseudoHorizontal, 0},
-{"vertical", CSSSelector::PseudoVertical, 0},
-{"double-button", CSSSelector::PseudoDoubleButton, 0},
-{"single-button", CSSSelector::PseudoSingleButton, 0},
-{"no-button", CSSSelector::PseudoNoButton, 0},
-{"corner-present", CSSSelector::PseudoCornerPresent, 0},
-{"first", CSSSelector::PseudoFirstPage, 0},
-{"left", CSSSelector::PseudoLeftPage, 0},
-{"right", CSSSelector::PseudoRightPage, 0},
-{"-webkit-full-screen", CSSSelector::PseudoFullScreen, 0},
-{"-webkit-full-screen-document", CSSSelector::PseudoFullScreenDocument, 0},
-{"-webkit-full-screen-ancestor", CSSSelector::PseudoFullScreenAncestor, 0},
-{"cue(", CSSSelector::PseudoCue, 0},
-{"cue", CSSSelector::PseudoWebKitCustomElement, 0},
-{"future", CSSSelector::PseudoFutureCue, 0},
-{"past", CSSSelector::PseudoPastCue, 0},
-{"-webkit-distributed(", CSSSelector::PseudoDistributed, 0},
-{"in-range", CSSSelector::PseudoInRange, 0},
-{"out-of-range", CSSSelector::PseudoOutOfRange, 0},
-{"scope", CSSSelector::PseudoScope, 0},
-{"unresolved", CSSSelector::PseudoUnresolved, 0},
-{"host", CSSSelector::PseudoHost, CSSSelector::RequiresShadowDOM},
-{"host(", CSSSelector::PseudoHost, CSSSelector::RequiresShadowDOM},
-{"ancestor", CSSSelector::PseudoAncestor, CSSSelector::RequiresShadowDOM},
-{"ancestor(", CSSSelector::PseudoAncestor, CSSSelector::RequiresShadowDOM},
-{"content", CSSSelector::PseudoContent, CSSSelector::RequiresShadowDOM},
+{"active", CSSSelector::PseudoActive},
+{"after", CSSSelector::PseudoAfter},
+{"-webkit-any(", CSSSelector::PseudoAny},
+{"-webkit-any-link", CSSSelector::PseudoAnyLink},
+{"-webkit-autofill", CSSSelector::PseudoAutofill},
+{"backdrop", CSSSelector::PseudoBackdrop},
+{"before", CSSSelector::PseudoBefore},
+{"checked", CSSSelector::PseudoChecked},
+{"default", CSSSelector::PseudoDefault},
+{"disabled", CSSSelector::PseudoDisabled},
+{"read-only", CSSSelector::PseudoReadOnly},
+{"read-write", CSSSelector::PseudoReadWrite},
+{"valid", CSSSelector::PseudoValid},
+{"invalid", CSSSelector::PseudoInvalid},
+{"-webkit-drag", CSSSelector::PseudoDrag},
+{"empty", CSSSelector::PseudoEmpty},
+{"enabled", CSSSelector::PseudoEnabled},
+{"first-child", CSSSelector::PseudoFirstChild},
+{"first-letter", CSSSelector::PseudoFirstLetter},
+{"first-line", CSSSelector::PseudoFirstLine},
+{"first-of-type", CSSSelector::PseudoFirstOfType},
+{"-webkit-full-page-media", CSSSelector::PseudoFullPageMedia},
+{"nth-child(", CSSSelector::PseudoNthChild},
+{"nth-of-type(", CSSSelector::PseudoNthOfType},
+{"nth-last-child(", CSSSelector::PseudoNthLastChild},
+{"nth-last-of-type(", CSSSelector::PseudoNthLastOfType},
+{"focus", CSSSelector::PseudoFocus},
+{"hover", CSSSelector::PseudoHover},
+{"indeterminate", CSSSelector::PseudoIndeterminate},
+{"last-child", CSSSelector::PseudoLastChild},
+{"last-of-type", CSSSelector::PseudoLastOfType},
+{"link", CSSSelector::PseudoLink},
+{"lang(", CSSSelector::PseudoLang},
+{"not(", CSSSelector::PseudoNot},
+{"only-child", CSSSelector::PseudoOnlyChild},
+{"only-of-type", CSSSelector::PseudoOnlyOfType},
+{"optional", CSSSelector::PseudoOptional},
+{"required", CSSSelector::PseudoRequired},
+{"-webkit-resizer", CSSSelector::PseudoResizer},
+{"root", CSSSelector::PseudoRoot},
+{"-webkit-scrollbar", CSSSelector::PseudoScrollbar},
+{"-webkit-scrollbar-button", CSSSelector::PseudoScrollbarButton},
+{"-webkit-scrollbar-corner", CSSSelector::PseudoScrollbarCorner},
+{"-webkit-scrollbar-thumb", CSSSelector::PseudoScrollbarThumb},
+{"-webkit-scrollbar-track", CSSSelector::PseudoScrollbarTrack},
+{"-webkit-scrollbar-track-piece", CSSSelector::PseudoScrollbarTrackPiece},
+{"selection", CSSSelector::PseudoSelection},
+{"target", CSSSelector::PseudoTarget},
+{"visited", CSSSelector::PseudoVisited},
+{"window-inactive", CSSSelector::PseudoWindowInactive},
+{"decrement", CSSSelector::PseudoDecrement},
+{"increment", CSSSelector::PseudoIncrement},
+{"start", CSSSelector::PseudoStart},
+{"end", CSSSelector::PseudoEnd},
+{"horizontal", CSSSelector::PseudoHorizontal},
+{"vertical", CSSSelector::PseudoVertical},
+{"double-button", CSSSelector::PseudoDoubleButton},
+{"single-button", CSSSelector::PseudoSingleButton},
+{"no-button", CSSSelector::PseudoNoButton},
+{"corner-present", CSSSelector::PseudoCornerPresent},
+{"first", CSSSelector::PseudoFirstPage},
+{"left", CSSSelector::PseudoLeftPage},
+{"right", CSSSelector::PseudoRightPage},
+{"-webkit-full-screen", CSSSelector::PseudoFullScreen},
+{"-webkit-full-screen-document", CSSSelector::PseudoFullScreenDocument},
+{"-webkit-full-screen-ancestor", CSSSelector::PseudoFullScreenAncestor},
+{"cue(", CSSSelector::PseudoCue},
+{"cue", CSSSelector::PseudoWebKitCustomElement},
+{"future", CSSSelector::PseudoFutureCue},
+{"past", CSSSelector::PseudoPastCue},
+{"-webkit-distributed(", CSSSelector::PseudoDistributed},
+{"in-range", CSSSelector::PseudoInRange},
+{"out-of-range", CSSSelector::PseudoOutOfRange},
+{"scope", CSSSelector::PseudoScope},
+{"unresolved", CSSSelector::PseudoUnresolved},
+{"host", CSSSelector::PseudoHost},
+{"host(", CSSSelector::PseudoHost},
+{"ancestor", CSSSelector::PseudoAncestor},
+{"ancestor(", CSSSelector::PseudoAncestor},
+{"content", CSSSelector::PseudoContent},
};
static HashMap<StringImpl*, CSSSelector::PseudoType>* nameToPseudoTypeMap()
@@ -368,10 +367,6 @@ static HashMap<StringImpl*, CSSSelector::PseudoType>* nameToPseudoTypeMap()
size_t pseudoCount = WTF_ARRAY_LENGTH(pseudoTypeMap);
for (size_t i = 0; i < pseudoCount; i++) {
- if (pseudoTypeMap[i].requirement == CSSSelector::RequiresShadowDOM) {
- if (!RuntimeEnabledFeatures::shadowDOMEnabled())
- continue;
- }
const char* str = pseudoTypeMap[i].string;
CSSSelector::PseudoType type;
type = static_cast<CSSSelector::PseudoType>(pseudoTypeMap[i].type);
« no previous file with comments | « no previous file | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698