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

Side by Side Diff: Source/core/css/resolver/StyleResolver.h

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rebased.. Created 7 years 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 // |properties| is an array with |count| elements. 186 // |properties| is an array with |count| elements.
187 void applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count , RenderStyle*); 187 void applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count , RenderStyle*);
188 188
189 CSSFontSelector* fontSelector() const { return m_fontSelector.get(); } 189 CSSFontSelector* fontSelector() const { return m_fontSelector.get(); }
190 ViewportStyleResolver* viewportStyleResolver() { return m_viewportStyleResol ver.get(); } 190 ViewportStyleResolver* viewportStyleResolver() { return m_viewportStyleResol ver.get(); }
191 191
192 void addMediaQueryResults(const MediaQueryResultList&); 192 void addMediaQueryResults(const MediaQueryResultList&);
193 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp ortDependentMediaQueryResults; } 193 MediaQueryResultList* viewportDependentMediaQueryResults() { return &m_viewp ortDependentMediaQueryResults; }
194 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM ediaQueryResults.isEmpty(); } 194 bool hasViewportDependentMediaQueries() const { return !m_viewportDependentM ediaQueryResults.isEmpty(); }
195 bool affectedByViewportChange() const; 195 bool mediaQueryAffectedByViewportChange() const;
196 196
197 // FIXME: Regions should not require special logic in StyleResolver. 197 // FIXME: Regions should not require special logic in StyleResolver.
198 bool checkRegionStyle(Element* regionElement); 198 bool checkRegionStyle(Element* regionElement);
199 199
200 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something . 200 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something .
201 void invalidateMatchedPropertiesCache(); 201 void invalidateMatchedPropertiesCache();
202 202
203 void invalidateViewportDependentMatchedProperties() { m_matchedPropertiesCac he.clearViewportDependent(); }
204
203 // Exposed for RenderStyle::isStyleAvilable(). 205 // Exposed for RenderStyle::isStyleAvilable().
204 static RenderStyle* styleNotYetAvailable() { return s_styleNotYetAvailable; } 206 static RenderStyle* styleNotYetAvailable() { return s_styleNotYetAvailable; }
205 207
206 // FIXME: StyleResolver should not have this member or method. 208 // FIXME: StyleResolver should not have this member or method.
207 InspectorCSSOMWrappers& inspectorCSSOMWrappers() { return m_inspectorCSSOMWr appers; } 209 InspectorCSSOMWrappers& inspectorCSSOMWrappers() { return m_inspectorCSSOMWr appers; }
208 210
209 const RuleFeatureSet& ensureRuleFeatureSet() 211 const RuleFeatureSet& ensureRuleFeatureSet()
210 { 212 {
211 if (hasPendingAuthorStyleSheets()) 213 if (hasPendingAuthorStyleSheets())
212 appendPendingAuthorStyleSheets(); 214 appendPendingAuthorStyleSheets();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 SelectorChecker::SelectorCheckingContext selectorCheckingContext(s, regi onElement, SelectorChecker::VisitedMatchDisabled); 348 SelectorChecker::SelectorCheckingContext selectorCheckingContext(s, regi onElement, SelectorChecker::VisitedMatchDisabled);
347 if (selectorChecker.match(selectorCheckingContext, DOMSiblingTraversalSt rategy()) == SelectorChecker::SelectorMatches) 349 if (selectorChecker.match(selectorCheckingContext, DOMSiblingTraversalSt rategy()) == SelectorChecker::SelectorMatches)
348 return true; 350 return true;
349 } 351 }
350 return false; 352 return false;
351 } 353 }
352 354
353 } // namespace WebCore 355 } // namespace WebCore
354 356
355 #endif // StyleResolver_h 357 #endif // StyleResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698