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); |