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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2432153005: Always evaluate media features to true without MediaValues. (Closed)
Patch Set: DCHECK(view). Created 4 years, 2 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: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index ff54a4ed06a4a8d8abde74ca375ab3d3e60aa0ec..2b186c406d53a934de73cb1c8435e7a20e064c85 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -185,13 +185,10 @@ StyleResolver::StyleResolver(Document& document)
m_printMediaType(false),
m_styleSharingDepth(0) {
FrameView* view = document.view();
- if (view) {
- m_medium = new MediaQueryEvaluator(&view->frame());
- m_printMediaType =
- equalIgnoringCase(view->mediaType(), MediaTypeNames::print);
- } else {
- m_medium = new MediaQueryEvaluator("all");
- }
+ DCHECK(view);
+ m_medium = new MediaQueryEvaluator(&view->frame());
+ m_printMediaType =
+ equalIgnoringCase(view->mediaType(), MediaTypeNames::print);
initWatchedSelectorRules();
}
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp ('k') | third_party/WebKit/Source/core/dom/StyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698