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

Side by Side 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, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 } 179 }
180 } 180 }
181 181
182 StyleResolver::StyleResolver(Document& document) 182 StyleResolver::StyleResolver(Document& document)
183 : m_document(document), 183 : m_document(document),
184 m_needCollectFeatures(false), 184 m_needCollectFeatures(false),
185 m_printMediaType(false), 185 m_printMediaType(false),
186 m_styleSharingDepth(0) { 186 m_styleSharingDepth(0) {
187 FrameView* view = document.view(); 187 FrameView* view = document.view();
188 if (view) { 188 DCHECK(view);
189 m_medium = new MediaQueryEvaluator(&view->frame()); 189 m_medium = new MediaQueryEvaluator(&view->frame());
190 m_printMediaType = 190 m_printMediaType =
191 equalIgnoringCase(view->mediaType(), MediaTypeNames::print); 191 equalIgnoringCase(view->mediaType(), MediaTypeNames::print);
192 } else {
193 m_medium = new MediaQueryEvaluator("all");
194 }
195 192
196 initWatchedSelectorRules(); 193 initWatchedSelectorRules();
197 } 194 }
198 195
199 StyleResolver::~StyleResolver() {} 196 StyleResolver::~StyleResolver() {}
200 197
201 void StyleResolver::dispose() { 198 void StyleResolver::dispose() {
202 m_matchedPropertiesCache.clear(); 199 m_matchedPropertiesCache.clear();
203 } 200 }
204 201
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 visitor->trace(m_siblingRuleSet); 1940 visitor->trace(m_siblingRuleSet);
1944 visitor->trace(m_uncommonAttributeRuleSet); 1941 visitor->trace(m_uncommonAttributeRuleSet);
1945 visitor->trace(m_watchedSelectorsRules); 1942 visitor->trace(m_watchedSelectorsRules);
1946 visitor->trace(m_treeBoundaryCrossingScopes); 1943 visitor->trace(m_treeBoundaryCrossingScopes);
1947 visitor->trace(m_styleSharingLists); 1944 visitor->trace(m_styleSharingLists);
1948 visitor->trace(m_pendingStyleSheets); 1945 visitor->trace(m_pendingStyleSheets);
1949 visitor->trace(m_document); 1946 visitor->trace(m_document);
1950 } 1947 }
1951 1948
1952 } // namespace blink 1949 } // namespace blink
OLDNEW
« 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