| Index: Source/core/css/resolver/StyleResolver.cpp
|
| diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
|
| index 74e95c0012161a6cd45bf17cccd19020273e0eed..57f33842d5b36cd49c3ec1a293008548b1376e85 100644
|
| --- a/Source/core/css/resolver/StyleResolver.cpp
|
| +++ b/Source/core/css/resolver/StyleResolver.cpp
|
| @@ -478,10 +478,32 @@
|
| return documentStyle.release();
|
| }
|
|
|
| +AuthorStyleInfo StyleResolver::authorStyleInfo(StyleResolverState& state)
|
| +{
|
| + const CachedUAStyle* cachedUAStyle = state.cachedUAStyle();
|
| +
|
| + if (!cachedUAStyle)
|
| + return AuthorStyleInfo();
|
| +
|
| + // Exclude background-repeat from comparison by resetting it.
|
| + FillLayer backgroundCopy = cachedUAStyle->backgroundLayers;
|
| + FillLayer backgroundLayersCopy = state.style()->backgroundLayers();
|
| + backgroundCopy.setRepeatX(NoRepeatFill);
|
| + backgroundCopy.setRepeatY(NoRepeatFill);
|
| + backgroundLayersCopy.setRepeatX(NoRepeatFill);
|
| + backgroundLayersCopy.setRepeatY(NoRepeatFill);
|
| +
|
| + bool backgroundChanged = backgroundLayersCopy != backgroundCopy
|
| + || state.style()->backgroundColor() != cachedUAStyle->backgroundColor;
|
| + bool borderChanged = state.style()->border() != cachedUAStyle->border;
|
| +
|
| + return AuthorStyleInfo(backgroundChanged, borderChanged);
|
| +}
|
| +
|
| void StyleResolver::adjustComputedStyle(StyleResolverState& state, Element* element)
|
| {
|
| StyleAdjuster adjuster(document().inQuirksMode());
|
| - adjuster.adjustComputedStyle(state.mutableStyleRef(), *state.parentStyle(), element);
|
| + adjuster.adjustComputedStyle(state.mutableStyleRef(), *state.parentStyle(), element, authorStyleInfo(state));
|
| }
|
|
|
| // Start loading resources referenced by this style.
|
| @@ -1324,12 +1346,6 @@
|
| applyMatchedProperties<LowPropertyPriority>(state, matchResult, true, matchResult.beginAuthor(), matchResult.endAuthor(), applyInheritedOnly);
|
| applyMatchedProperties<LowPropertyPriority>(state, matchResult, true, matchResult.beginUA(), matchResult.endUA(), applyInheritedOnly);
|
|
|
| - if (state.style()->hasAppearance()) {
|
| - // Populate if the cached UA border and background has been changed.
|
| - state.style()->setHasAuthorBackground(hasAuthorBackground(state));
|
| - state.style()->setHasAuthorBorder(hasAuthorBorder(state));
|
| - }
|
| -
|
| loadPendingResources(state);
|
|
|
| if (!cachedMatchedProperties && cacheHash && MatchedPropertiesCache::isCacheable(element, *state.style(), *state.parentStyle())) {
|
| @@ -1338,29 +1354,6 @@
|
| }
|
|
|
| ASSERT(!state.fontBuilder().fontDirty());
|
| -}
|
| -
|
| -bool StyleResolver::hasAuthorBackground(const StyleResolverState& state)
|
| -{
|
| - const CachedUAStyle* cachedUAStyle = state.cachedUAStyle();
|
| - if (!cachedUAStyle)
|
| - return false;
|
| -
|
| - FillLayer oldFill = cachedUAStyle->backgroundLayers;
|
| - FillLayer newFill = state.style()->backgroundLayers();
|
| - // Exclude background-repeat from comparison by resetting it.
|
| - oldFill.setRepeatX(NoRepeatFill);
|
| - oldFill.setRepeatY(NoRepeatFill);
|
| - newFill.setRepeatX(NoRepeatFill);
|
| - newFill.setRepeatY(NoRepeatFill);
|
| -
|
| - return (oldFill != newFill || cachedUAStyle->backgroundColor != state.style()->backgroundColor());
|
| -}
|
| -
|
| -bool StyleResolver::hasAuthorBorder(const StyleResolverState& state)
|
| -{
|
| - const CachedUAStyle* cachedUAStyle = state.cachedUAStyle();
|
| - return cachedUAStyle && (cachedUAStyle->border != state.style()->border());
|
| }
|
|
|
| void StyleResolver::applyCallbackSelectors(StyleResolverState& state)
|
|
|