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

Side by Side Diff: Source/core/css/RuleSet.cpp

Issue 23742003: Use css-device-adapt constraining for legacy viewport tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review issue: one assignent per line/statement Created 7 years, 3 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
« no previous file with comments | « Source/core/css/CSSParser-in.cpp ('k') | Source/core/css/StyleRule.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } else if (rule->isRegionRule() && resolver) { 386 } else if (rule->isRegionRule() && resolver) {
387 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped s tyle sheets for the moment. 387 // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped s tyle sheets for the moment.
388 addRegionRule(static_cast<StyleRuleRegion*>(rule), hasDocumentSecuri tyOrigin); 388 addRegionRule(static_cast<StyleRuleRegion*>(rule), hasDocumentSecuri tyOrigin);
389 } else if (rule->isHostRule() && resolver) { 389 } else if (rule->isHostRule() && resolver) {
390 if (!isScopingNodeInShadowTree(scope)) 390 if (!isScopingNodeInShadowTree(scope))
391 continue; 391 continue;
392 bool enabled = resolver->buildScopedStyleTreeInDocumentOrder(); 392 bool enabled = resolver->buildScopedStyleTreeInDocumentOrder();
393 resolver->setBuildScopedStyleTreeInDocumentOrder(false); 393 resolver->setBuildScopedStyleTreeInDocumentOrder(false);
394 resolver->ensureScopedStyleResolver(scope->shadowHost())->addHostRul e(static_cast<StyleRuleHost*>(rule), hasDocumentSecurityOrigin, scope); 394 resolver->ensureScopedStyleResolver(scope->shadowHost())->addHostRul e(static_cast<StyleRuleHost*>(rule), hasDocumentSecurityOrigin, scope);
395 resolver->setBuildScopedStyleTreeInDocumentOrder(enabled); 395 resolver->setBuildScopedStyleTreeInDocumentOrder(enabled);
396 } else if (RuntimeEnabledFeatures::cssViewportEnabled() && rule->isViewp ortRule()) { 396 } else if (rule->isViewportRule()) {
397 // @viewport should not be scoped. 397 // @viewport should not be scoped.
398 if (!isDocumentScope(scope)) 398 if (!isDocumentScope(scope))
399 continue; 399 continue;
400 addViewportRule(static_cast<StyleRuleViewport*>(rule)); 400 addViewportRule(static_cast<StyleRuleViewport*>(rule));
401 } 401 }
402 else if (rule->isSupportsRule() && static_cast<StyleRuleSupports*>(rule) ->conditionIsSupported()) 402 else if (rule->isSupportsRule() && static_cast<StyleRuleSupports*>(rule) ->conditionIsSupported())
403 addChildRules(static_cast<StyleRuleSupports*>(rule)->childRules(), m edium, resolver, scope, hasDocumentSecurityOrigin, addRuleFlags); 403 addChildRules(static_cast<StyleRuleSupports*>(rule)->childRules(), m edium, resolver, scope, hasDocumentSecurityOrigin, addRuleFlags);
404 } 404 }
405 } 405 }
406 406
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 compactPendingRules(pendingRules->shadowPseudoElementRules, m_shadowPseudoEl ementRules); 455 compactPendingRules(pendingRules->shadowPseudoElementRules, m_shadowPseudoEl ementRules);
456 m_linkPseudoClassRules.shrinkToFit(); 456 m_linkPseudoClassRules.shrinkToFit();
457 m_cuePseudoRules.shrinkToFit(); 457 m_cuePseudoRules.shrinkToFit();
458 m_focusPseudoClassRules.shrinkToFit(); 458 m_focusPseudoClassRules.shrinkToFit();
459 m_universalRules.shrinkToFit(); 459 m_universalRules.shrinkToFit();
460 m_pageRules.shrinkToFit(); 460 m_pageRules.shrinkToFit();
461 m_viewportRules.shrinkToFit(); 461 m_viewportRules.shrinkToFit();
462 } 462 }
463 463
464 } // namespace WebCore 464 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSParser-in.cpp ('k') | Source/core/css/StyleRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698