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

Unified Diff: Source/core/css/resolver/StyleResolver.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/resolver/StyleResolver.h ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 5e0d500af8532485ba56777b62ac5462d8ef9e75..7daa31eed5d4704b7d9d9d78d5079c3da9d225c0 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -516,7 +516,6 @@ void StyleResolver::matchWatchSelectorRules(ElementRuleCollector& collector)
MatchRequest matchRequest(m_watchedSelectorsRules.get());
RuleRange ruleRange = collector.matchedResult().ranges.userRuleRange();
collector.collectMatchingRules(matchRequest, ruleRange);
- collector.collectMatchingRulesForRegion(matchRequest, ruleRange);
collector.sortAndTransferMatchedRules();
}
@@ -630,7 +629,7 @@ static void addContentAttrValuesToFeatures(const Vector<AtomicString>& contentAt
}
PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderStyle* defaultParent, StyleSharingBehavior sharingBehavior,
- RuleMatchingBehavior matchingBehavior, RenderRegion* regionForStyling)
+ RuleMatchingBehavior matchingBehavior)
{
ASSERT(document().frame());
ASSERT(documentSettings());
@@ -653,7 +652,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
if (element == document().documentElement())
resetDirectionAndWritingModeOnDocument(document());
- StyleResolverState state(document(), element, defaultParent, regionForStyling);
+ StyleResolverState state(document(), element, defaultParent);
if (sharingBehavior == AllowStyleSharing && state.parentStyle()) {
SharedStyleFinder styleFinder(state.elementContext(), m_features, m_siblingRuleSet.get(), m_uncommonAttributeRuleSet.get(), *this);
@@ -697,7 +696,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
{
ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
- collector.setRegionForStyling(regionForStyling);
if (matchingBehavior == MatchOnlyUserAgentRules)
matchUARules(collector);
@@ -1010,17 +1008,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForText(Text* textNode)
return parentNode->renderStyle();
}
-bool StyleResolver::checkRegionStyle(Element* regionElement)
-{
- // FIXME (BUG 72472): We don't add @-webkit-region rules of scoped style sheets for the moment,
- // so all region rules are global by default. Verify whether that can stand or needs changing.
- if (ScopedStyleResolver* scopedResolver = m_styleTree.scopedStyleResolverForDocument()) {
- if (scopedResolver->checkRegionStyle(regionElement))
- return true;
- }
- return false;
-}
-
void StyleResolver::updateFont(StyleResolverState& state)
{
state.fontBuilder().createFont(document().styleEngine()->fontSelector(), state.parentStyle(), state.style());
@@ -1118,21 +1105,6 @@ void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Ani
}
}
-// http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule
-// FIXME: add incremental support for other region styling properties.
-static inline bool isValidRegionStyleProperty(CSSPropertyID id)
-{
- switch (id) {
- case CSSPropertyBackgroundColor:
- case CSSPropertyColor:
- return true;
- default:
- break;
- }
-
- return false;
-}
-
static inline bool isValidCueStyleProperty(CSSPropertyID id)
{
switch (id) {
@@ -1207,7 +1179,6 @@ bool StyleResolver::isPropertyForPass(CSSPropertyID property)
template <StyleResolver::StyleApplicationPass pass>
void StyleResolver::applyProperties(StyleResolverState& state, const StylePropertySet* properties, StyleRule* rule, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType)
{
- ASSERT((propertyWhitelistType != PropertyWhitelistRegion) || state.regionForStyling());
state.setCurrentRule(rule);
unsigned propertyCount = properties->propertyCount();
@@ -1224,8 +1195,6 @@ void StyleResolver::applyProperties(StyleResolverState& state, const StyleProper
}
CSSPropertyID property = current.id();
- if (propertyWhitelistType == PropertyWhitelistRegion && !isValidRegionStyleProperty(property))
- continue;
if (propertyWhitelistType == PropertyWhitelistCue && !isValidCueStyleProperty(property))
continue;
if (!isPropertyForPass<pass>(property))
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698