| 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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } else if (rule->isRegionRule() && resolver) { | 384 } else if (rule->isRegionRule() && resolver) { |
| 385 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped s
tyle sheets for the moment. | 385 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped s
tyle sheets for the moment. |
| 386 addRegionRule(static_cast<StyleRuleRegion*>(rule), hasDocumentSecuri
tyOrigin); | 386 addRegionRule(static_cast<StyleRuleRegion*>(rule), hasDocumentSecuri
tyOrigin); |
| 387 } else if (rule->isHostRule() && resolver) { | 387 } else if (rule->isHostRule() && resolver) { |
| 388 if (!isScopingNodeInShadowTree(scope)) | 388 if (!isScopingNodeInShadowTree(scope)) |
| 389 continue; | 389 continue; |
| 390 bool enabled = resolver->buildScopedStyleTreeInDocumentOrder(); | 390 bool enabled = resolver->buildScopedStyleTreeInDocumentOrder(); |
| 391 resolver->setBuildScopedStyleTreeInDocumentOrder(false); | 391 resolver->setBuildScopedStyleTreeInDocumentOrder(false); |
| 392 resolver->ensureScopedStyleResolver(scope->shadowHost())->addHostRul
e(static_cast<StyleRuleHost*>(rule), hasDocumentSecurityOrigin, scope); | 392 resolver->ensureScopedStyleResolver(scope->shadowHost())->addHostRul
e(static_cast<StyleRuleHost*>(rule), hasDocumentSecurityOrigin, scope); |
| 393 resolver->setBuildScopedStyleTreeInDocumentOrder(enabled); | 393 resolver->setBuildScopedStyleTreeInDocumentOrder(enabled); |
| 394 } else if (RuntimeEnabledFeatures::cssViewportEnabled() && rule->isViewp
ortRule()) { | 394 } else if (rule->isViewportRule()) { |
| 395 // @viewport should not be scoped. | |
| 396 if (!isDocumentScope(scope)) | 395 if (!isDocumentScope(scope)) |
| 397 continue; | 396 continue; |
| 398 addViewportRule(static_cast<StyleRuleViewport*>(rule)); | 397 addViewportRule(static_cast<StyleRuleViewport*>(rule)); |
| 399 } | 398 } |
| 400 else if (rule->isSupportsRule() && static_cast<StyleRuleSupports*>(rule)
->conditionIsSupported()) | 399 else if (rule->isSupportsRule() && static_cast<StyleRuleSupports*>(rule)
->conditionIsSupported()) |
| 401 addChildRules(static_cast<StyleRuleSupports*>(rule)->childRules(), m
edium, resolver, scope, hasDocumentSecurityOrigin, addRuleFlags); | 400 addChildRules(static_cast<StyleRuleSupports*>(rule)->childRules(), m
edium, resolver, scope, hasDocumentSecurityOrigin, addRuleFlags); |
| 402 } | 401 } |
| 403 } | 402 } |
| 404 | 403 |
| 405 void RuleSet::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvalu
ator& medium, StyleResolver* resolver, const ContainerNode* scope) | 404 void RuleSet::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvalu
ator& medium, StyleResolver* resolver, const ContainerNode* scope) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 compactPendingRules(pendingRules->shadowPseudoElementRules, m_shadowPseudoEl
ementRules); | 452 compactPendingRules(pendingRules->shadowPseudoElementRules, m_shadowPseudoEl
ementRules); |
| 454 m_linkPseudoClassRules.shrinkToFit(); | 453 m_linkPseudoClassRules.shrinkToFit(); |
| 455 m_cuePseudoRules.shrinkToFit(); | 454 m_cuePseudoRules.shrinkToFit(); |
| 456 m_focusPseudoClassRules.shrinkToFit(); | 455 m_focusPseudoClassRules.shrinkToFit(); |
| 457 m_universalRules.shrinkToFit(); | 456 m_universalRules.shrinkToFit(); |
| 458 m_pageRules.shrinkToFit(); | 457 m_pageRules.shrinkToFit(); |
| 459 m_viewportRules.shrinkToFit(); | 458 m_viewportRules.shrinkToFit(); |
| 460 } | 459 } |
| 461 | 460 |
| 462 } // namespace WebCore | 461 } // namespace WebCore |
| OLD | NEW |