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

Unified Diff: Source/core/css/parser/BisonCSSParser-in.cpp

Issue 252683011: Add support for case-insensitive attribute value selectors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add runtime flag; fix selector serializing Created 6 years, 7 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
Index: Source/core/css/parser/BisonCSSParser-in.cpp
diff --git a/Source/core/css/parser/BisonCSSParser-in.cpp b/Source/core/css/parser/BisonCSSParser-in.cpp
index c5d3995bedae3413b8666151a73a68eee8366bd6..b968cf59dc9da0ebe2120205992afdd2788b23c2 100644
--- a/Source/core/css/parser/BisonCSSParser-in.cpp
+++ b/Source/core/css/parser/BisonCSSParser-in.cpp
@@ -1287,6 +1287,17 @@ PassRefPtrWillBeRawPtr<MediaQuerySet> BisonCSSParser::parseMediaQueryList(const
return m_mediaList.release();
}
+bool BisonCSSParser::parseAttributeFlags(unsigned& flags, const String& string)
+{
+ if (!RuntimeEnabledFeatures::cssAttributeCaseSensitivityEnabled() && !isUASheetBehavior(m_context.mode()))
+ return false;
+ if (string == "i") {
+ flags = CSSSelector::CaseInsensitive;
+ return true;
+ }
+ return false;
+}
+
static inline void filterProperties(bool important, const WillBeHeapVector<CSSProperty, 256>& input, WillBeHeapVector<CSSProperty, 256>& output, size_t& unusedEntries, BitArray<numCSSProperties>& seenProperties)
{
// Add properties in reverse order so that highest priority definitions are reached first. Duplicate definitions can then be ignored when found.

Powered by Google App Engine
This is Rietveld 408576698