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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 143323014: *** DO NOT LAND *** Attempt to understand Regions complexity Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 eeaac0a9ae34a938d36d89f7e57ee922f0f1d550..962770115f477113339347a55cd3123245964782 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -506,7 +506,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();
}
@@ -632,7 +631,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());
@@ -655,7 +654,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.distributedToInsertionPoint() && state.parentStyle()) {
SharedStyleFinder styleFinder(state.elementContext(), m_features, m_siblingRuleSet.get(), m_uncommonAttributeRuleSet.get(), *this);
@@ -699,7 +698,6 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
{
ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
- collector.setRegionForStyling(regionForStyling);
if (matchingBehavior == MatchOnlyUserAgentRules)
matchUARules(collector);
@@ -1069,17 +1067,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());
@@ -1182,21 +1169,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) {
@@ -1274,7 +1246,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();
@@ -1291,8 +1262,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