| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |