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

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

Issue 13646013: Enable support for CSS Conditional Rules (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/InspectorCSSOMWrappers.cpp ('k') | Source/core/css/StyleRule.h » ('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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 else if (rule->isHostRule()) 342 else if (rule->isHostRule())
343 resolver->addHostRule(static_cast<StyleRuleHost*>(rule), hasDocument SecurityOrigin, scope); 343 resolver->addHostRule(static_cast<StyleRuleHost*>(rule), hasDocument SecurityOrigin, scope);
344 #if ENABLE(CSS_DEVICE_ADAPTATION) 344 #if ENABLE(CSS_DEVICE_ADAPTATION)
345 else if (rule->isViewportRule() && resolver) { 345 else if (rule->isViewportRule() && resolver) {
346 // @viewport should not be scoped. 346 // @viewport should not be scoped.
347 if (scope) 347 if (scope)
348 continue; 348 continue;
349 resolver->viewportStyleResolver()->addViewportRule(static_cast<Style RuleViewport*>(rule)); 349 resolver->viewportStyleResolver()->addViewportRule(static_cast<Style RuleViewport*>(rule));
350 } 350 }
351 #endif 351 #endif
352 #if ENABLE(CSS3_CONDITIONAL_RULES)
353 else if (rule->isSupportsRule() && static_cast<StyleRuleSupports*>(rule) ->conditionIsSupported()) 352 else if (rule->isSupportsRule() && static_cast<StyleRuleSupports*>(rule) ->conditionIsSupported())
354 addChildRules(static_cast<StyleRuleSupports*>(rule)->childRules(), m edium, resolver, scope, hasDocumentSecurityOrigin, addRuleFlags); 353 addChildRules(static_cast<StyleRuleSupports*>(rule)->childRules(), m edium, resolver, scope, hasDocumentSecurityOrigin, addRuleFlags);
355 #endif
356 } 354 }
357 } 355 }
358 356
359 void RuleSet::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvalu ator& medium, StyleResolver* resolver, const ContainerNode* scope) 357 void RuleSet::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvalu ator& medium, StyleResolver* resolver, const ContainerNode* scope)
360 { 358 {
361 ASSERT(sheet); 359 ASSERT(sheet);
362 360
363 const Vector<RefPtr<StyleRuleImport> >& importRules = sheet->importRules(); 361 const Vector<RefPtr<StyleRuleImport> >& importRules = sheet->importRules();
364 for (unsigned i = 0; i < importRules.size(); ++i) { 362 for (unsigned i = 0; i < importRules.size(); ++i) {
365 StyleRuleImport* importRule = importRules[i].get(); 363 StyleRuleImport* importRule = importRules[i].get();
(...skipping 30 matching lines...) Expand all
396 shrinkMapVectorsToFit(m_tagRules); 394 shrinkMapVectorsToFit(m_tagRules);
397 shrinkMapVectorsToFit(m_shadowPseudoElementRules); 395 shrinkMapVectorsToFit(m_shadowPseudoElementRules);
398 m_linkPseudoClassRules.shrinkToFit(); 396 m_linkPseudoClassRules.shrinkToFit();
399 m_cuePseudoRules.shrinkToFit(); 397 m_cuePseudoRules.shrinkToFit();
400 m_focusPseudoClassRules.shrinkToFit(); 398 m_focusPseudoClassRules.shrinkToFit();
401 m_universalRules.shrinkToFit(); 399 m_universalRules.shrinkToFit();
402 m_pageRules.shrinkToFit(); 400 m_pageRules.shrinkToFit();
403 } 401 }
404 402
405 } // namespace WebCore 403 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/InspectorCSSOMWrappers.cpp ('k') | Source/core/css/StyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698