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

Unified Diff: Source/core/css/RuleSet.cpp

Issue 134473008: Remove CSS regions support, keeping a bare minimum to support "region-based" multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/RuleSet.h ('k') | Source/core/css/RuntimeCSSEnabled.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleSet.cpp
diff --git a/Source/core/css/RuleSet.cpp b/Source/core/css/RuleSet.cpp
index 1d7a33413505e1ee2c626654230b05d09dde7f88..7e048b86cfcd5d0273db8ea7212725b1d35dfda1 100644
--- a/Source/core/css/RuleSet.cpp
+++ b/Source/core/css/RuleSet.cpp
@@ -112,8 +112,6 @@ static inline bool containsUncommonAttributeSelector(const CSSSelector& selector
static inline PropertyWhitelistType determinePropertyWhitelistType(const AddRuleFlags addRuleFlags, const CSSSelector& selector)
{
- if (addRuleFlags & RuleIsInRegionRule)
- return PropertyWhitelistRegion;
for (const CSSSelector* component = &selector; component; component = component->tagHistory()) {
if (component->pseudoType() == CSSSelector::PseudoCue || (component->m_match == CSSSelector::PseudoElement && component->value() == TextTrackCue::cueShadowPseudoId()))
return PropertyWhitelistCue;
@@ -335,31 +333,6 @@ void RuleSet::addKeyframesRule(StyleRuleKeyframes* rule)
m_keyframesRules.append(rule);
}
-void RuleSet::addRegionRule(StyleRuleRegion* regionRule, bool hasDocumentSecurityOrigin)
-{
- ensurePendingRules(); // So that m_regionSelectorsAndRuleSets.shrinkToFit() gets called.
- OwnPtr<RuleSet> regionRuleSet = RuleSet::create();
- // The region rule set should take into account the position inside the parent rule set.
- // Otherwise, the rules inside region block might be incorrectly positioned before other similar rules from
- // the stylesheet that contains the region block.
- regionRuleSet->m_ruleCount = m_ruleCount;
-
- // Collect the region rules into a rule set
- // FIXME: Should this add other types of rules? (i.e. use addChildRules() directly?)
- const Vector<RefPtr<StyleRuleBase> >& childRules = regionRule->childRules();
- AddRuleFlags addRuleFlags = hasDocumentSecurityOrigin ? RuleHasDocumentSecurityOrigin : RuleHasNoSpecialState;
- addRuleFlags = static_cast<AddRuleFlags>(addRuleFlags | RuleIsInRegionRule | RuleCanUseFastCheckSelector);
- for (unsigned i = 0; i < childRules.size(); ++i) {
- StyleRuleBase* regionStylingRule = childRules[i].get();
- if (regionStylingRule->isStyleRule())
- regionRuleSet->addStyleRule(toStyleRule(regionStylingRule), addRuleFlags);
- }
- // Update the "global" rule count so that proper order is maintained
- m_ruleCount = regionRuleSet->m_ruleCount;
-
- m_regionSelectorsAndRuleSets.append(RuleSetSelectorPair(regionRule->selectorList().first(), regionRuleSet.release()));
-}
-
void RuleSet::addChildRules(const Vector<RefPtr<StyleRuleBase> >& rules, const MediaQueryEvaluator& medium, AddRuleFlags addRuleFlags)
{
for (unsigned i = 0; i < rules.size(); ++i) {
@@ -388,8 +361,6 @@ void RuleSet::addChildRules(const Vector<RefPtr<StyleRuleBase> >& rules, const M
addFontFaceRule(toStyleRuleFontFace(rule));
} else if (rule->isKeyframesRule()) {
addKeyframesRule(toStyleRuleKeyframes(rule));
- } else if (rule->isRegionRule()) {
- addRegionRule(toStyleRuleRegion(rule), addRuleFlags & RuleHasDocumentSecurityOrigin);
} else if (rule->isViewportRule()) {
addViewportRule(toStyleRuleViewport(rule));
} else if (rule->isSupportsRule() && toStyleRuleSupports(rule)->conditionIsSupported()) {
« no previous file with comments | « Source/core/css/RuleSet.h ('k') | Source/core/css/RuntimeCSSEnabled.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698