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

Side by Side Diff: sky/engine/core/css/resolver/StyleResolver.cpp

Issue 839473005: Simplify ScopedStyleResolver keyframe handling. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 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. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 void StyleResolver::finishAppendAuthorStyleSheets() 190 void StyleResolver::finishAppendAuthorStyleSheets()
191 { 191 {
192 if (document().renderView() && document().renderView()->style()) 192 if (document().renderView() && document().renderView()->style())
193 document().renderView()->style()->font().update(document().styleEngine() ->fontSelector()); 193 document().renderView()->style()->font().update(document().styleEngine() ->fontSelector());
194 } 194 }
195 195
196 void StyleResolver::processScopedRules(const RuleSet& authorRules, CSSStyleSheet * parentStyleSheet, unsigned parentIndex, ContainerNode& scope) 196 void StyleResolver::processScopedRules(const RuleSet& authorRules, CSSStyleSheet * parentStyleSheet, unsigned parentIndex, ContainerNode& scope)
197 { 197 {
198 const Vector<RawPtr<StyleRuleKeyframes> > keyframesRules = authorRules.keyfr amesRules();
199 ScopedStyleResolver* resolver = &scope.treeScope().scopedStyleResolver();
200 for (unsigned i = 0; i < keyframesRules.size(); ++i)
201 resolver->addKeyframeStyle(keyframesRules[i]);
202
203 // FIXME(BUG 72461): We don't add @font-face rules of scoped style sheets fo r the moment. 198 // FIXME(BUG 72461): We don't add @font-face rules of scoped style sheets fo r the moment.
204 if (scope.isDocumentNode()) { 199 if (scope.isDocumentNode()) {
205 const Vector<RawPtr<StyleRuleFontFace> > fontFaceRules = authorRules.fon tFaceRules(); 200 const Vector<RawPtr<StyleRuleFontFace> > fontFaceRules = authorRules.fon tFaceRules();
206 for (unsigned i = 0; i < fontFaceRules.size(); ++i) 201 for (unsigned i = 0; i < fontFaceRules.size(); ++i)
207 addFontFaceRule(m_document, document().styleEngine()->fontSelector() , fontFaceRules[i]); 202 addFontFaceRule(m_document, document().styleEngine()->fontSelector() , fontFaceRules[i]);
208 if (fontFaceRules.size()) 203 if (fontFaceRules.size())
209 invalidateMatchedPropertiesCache(); 204 invalidateMatchedPropertiesCache();
210 } 205 }
211 } 206 }
212 207
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 bool StyleResolver::mediaQueryAffectedByViewportChange() const 874 bool StyleResolver::mediaQueryAffectedByViewportChange() const
880 { 875 {
881 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { 876 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) {
882 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression() ) != m_viewportDependentMediaQueryResults[i]->result()) 877 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression() ) != m_viewportDependentMediaQueryResults[i]->result())
883 return true; 878 return true;
884 } 879 }
885 return false; 880 return false;
886 } 881 }
887 882
888 } // namespace blink 883 } // namespace blink
OLDNEW
« sky/engine/core/css/resolver/StyleResolver.h ('K') | « sky/engine/core/css/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698