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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 void StyleResolver::addTreeBoundaryCrossingRules(const Vector<MinimalRuleData>&
rules, ContainerNode* scope) | 249 void StyleResolver::addTreeBoundaryCrossingRules(const Vector<MinimalRuleData>&
rules, ContainerNode* scope) |
250 { | 250 { |
251 for (unsigned i = 0; i < rules.size(); ++i) { | 251 for (unsigned i = 0; i < rules.size(); ++i) { |
252 const MinimalRuleData& info = rules[i]; | 252 const MinimalRuleData& info = rules[i]; |
253 m_treeBoundaryCrossingRules.addRule(info.m_rule, info.m_selectorIndex, s
cope, info.m_flags); | 253 m_treeBoundaryCrossingRules.addRule(info.m_rule, info.m_selectorIndex, s
cope, info.m_flags); |
254 } | 254 } |
255 } | 255 } |
256 | 256 |
257 void StyleResolver::processScopedRules(const RuleSet& authorRules, const KURL& s
heetBaseURL, ContainerNode* scope) | 257 void StyleResolver::processScopedRules(const RuleSet& authorRules, const KURL& s
heetBaseURL, ContainerNode* scope) |
258 { | 258 { |
259 const Vector<StyleRuleKeyframes*> keyframesRules = authorRules.keyframesRule
s(); | 259 const WillBeHeapVector<RawPtrWillBeMember<StyleRuleKeyframes> > keyframesRul
es = authorRules.keyframesRules(); |
260 for (unsigned i = 0; i < keyframesRules.size(); ++i) | 260 for (unsigned i = 0; i < keyframesRules.size(); ++i) |
261 ensureScopedStyleResolver(scope)->addKeyframeStyle(keyframesRules[i]); | 261 ensureScopedStyleResolver(scope)->addKeyframeStyle(keyframesRules[i]); |
262 | 262 |
263 addTreeBoundaryCrossingRules(authorRules.treeBoundaryCrossingRules(), scope)
; | 263 addTreeBoundaryCrossingRules(authorRules.treeBoundaryCrossingRules(), scope)
; |
264 | 264 |
265 // FIXME(BUG 72461): We don't add @font-face rules of scoped style sheets fo
r the moment. | 265 // FIXME(BUG 72461): We don't add @font-face rules of scoped style sheets fo
r the moment. |
266 if (!scope || scope->isDocumentNode()) { | 266 if (!scope || scope->isDocumentNode()) { |
267 const Vector<StyleRuleFontFace*> fontFaceRules = authorRules.fontFaceRul
es(); | 267 const WillBeHeapVector<RawPtrWillBeMember<StyleRuleFontFace> > fontFaceR
ules = authorRules.fontFaceRules(); |
268 for (unsigned i = 0; i < fontFaceRules.size(); ++i) | 268 for (unsigned i = 0; i < fontFaceRules.size(); ++i) |
269 addFontFaceRule(&m_document, document().styleEngine()->fontSelector(
), fontFaceRules[i]); | 269 addFontFaceRule(&m_document, document().styleEngine()->fontSelector(
), fontFaceRules[i]); |
270 if (fontFaceRules.size()) | 270 if (fontFaceRules.size()) |
271 invalidateMatchedPropertiesCache(); | 271 invalidateMatchedPropertiesCache(); |
272 } else { | 272 } else { |
273 addTreeBoundaryCrossingRules(authorRules.shadowDistributedRules(), scope
); | 273 addTreeBoundaryCrossingRules(authorRules.shadowDistributedRules(), scope
); |
274 } | 274 } |
275 } | 275 } |
276 | 276 |
277 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode) | 277 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode) |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 bool StyleResolver::mediaQueryAffectedByViewportChange() const | 1411 bool StyleResolver::mediaQueryAffectedByViewportChange() const |
1412 { | 1412 { |
1413 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { | 1413 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { |
1414 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) | 1414 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) |
1415 return true; | 1415 return true; |
1416 } | 1416 } |
1417 return false; | 1417 return false; |
1418 } | 1418 } |
1419 | 1419 |
1420 } // namespace WebCore | 1420 } // namespace WebCore |
OLD | NEW |