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

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

Issue 171383002: A thread-safe Media Query Parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moar rebase 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
Index: Source/core/css/MediaQuery.cpp
diff --git a/Source/core/css/MediaQuery.cpp b/Source/core/css/MediaQuery.cpp
index 54067aff931c1a0151fd78cb2516373a5d2e56b7..42a78849defa2c1a53f74a0f3418678f628bc64c 100644
--- a/Source/core/css/MediaQuery.cpp
+++ b/Source/core/css/MediaQuery.cpp
@@ -75,6 +75,11 @@ static bool expressionCompare(const OwnPtrWillBeMember<MediaQueryExp>& a, const
return codePointCompare(a->serialize(), b->serialize()) < 0;
}
+PassOwnPtrWillBeRawPtr<MediaQuery> MediaQuery::createNotAll()
+{
+ return adoptPtrWillBeNoop(new MediaQuery(MediaQuery::Not, "all", nullptr));
+}
+
MediaQuery::MediaQuery(Restrictor r, const String& mediaType, PassOwnPtrWillBeRawPtr<ExpressionHeapVector> expressions)
: m_restrictor(r)
, m_mediaType(attemptStaticStringCreation(mediaType.lower()))

Powered by Google App Engine
This is Rietveld 408576698