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

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

Issue 361173002: [wip] simplify -webkit-appearance adjust step (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update Created 6 years, 5 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/StyleAdjuster.cpp ('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 8fd045ef3711a43e5d7e64e6e9ff6d649ed43ec5..33a76811157a54228b639993b7121468748f2614 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -593,7 +593,8 @@ static void addContentAttrValuesToFeatures(const Vector<AtomicString>& contentAt
void StyleResolver::adjustRenderStyle(StyleResolverState& state, Element* element)
{
StyleAdjuster adjuster(m_document.inQuirksMode());
- adjuster.adjustRenderStyle(state.style(), state.parentStyle(), element, state.cachedUAStyle());
+ bool uaStyleHasWebkitAppearance = element && elementTypeHasAppearanceFromUAStyle(*element);
+ adjuster.adjustRenderStyle(state.style(), state.parentStyle(), element, uaStyleHasWebkitAppearance, state.valuesUnchangedForWebkitAppearance());
}
// Start loading resources referenced by this style.
@@ -1165,13 +1166,9 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
// This code supports -webkit-appearance, for which we are interested
// in whether the user has specified border or background properties.
- // FIXME: This is a bit of a mess, we should just compare CSSValues and
- // store a single bit for this.
if (elementTypeHasAppearanceFromUAStyle(*element)) {
- CascadedValues userAgentValues(state, matchResult, true);
- // We only actually care about border and background properties here
- userAgentValues.applyValues(firstCSSPropertyId<LowPriorityProperties>(), lastCSSPropertyId<LowPriorityProperties>(), applyInheritedOnly);
- state.cacheUserAgentBorderAndBackground();
+ if (cascadedValues.valuesUnchangedForWebkitAppearance(matchResult))
+ state.setValuesUnchangedForWebkitAppearance();
}
cascadedValues.applyValues(firstCSSPropertyId<LowPriorityProperties>(), lastCSSPropertyId<LowPriorityProperties>(), applyInheritedOnly);
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698