Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index b0ec8b345e70694ba2c3e72c58e6442bd0d5f91e..b51c2c43f1eb8a03d91bc8195048bfe1932c0e65 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -974,18 +974,34 @@ void Element::scrollFrameTo(const ScrollToOptions& scrollToOptions) |
viewport->setScrollPosition(DoublePoint(scaledLeft, scaledTop), ProgrammaticScroll, scrollBehavior); |
} |
-void Element::incrementProxyCount() |
+bool Element::hasCompositorProxy() const |
{ |
- if (ensureElementRareData().incrementProxyCount() == 1) |
+ return hasRareData() && elementRareData()->proxiedPropertyCounts(); |
+} |
+ |
+void Element::incrementCompositorProxiedProperties(uint32_t mutableProperties) |
+{ |
+ ElementRareData& rareData = ensureElementRareData(); |
+ if (!rareData.proxiedPropertyCounts()) |
setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::CompositorProxy)); |
+ rareData.incrementCompositorProxiedProperties(mutableProperties); |
} |
-void Element::decrementProxyCount() |
+void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties) |
{ |
- if (ensureElementRareData().decrementProxyCount() == 0) |
+ ElementRareData& rareData = *elementRareData(); |
+ rareData.decrementCompositorProxiedProperties(mutableProperties); |
+ if (!rareData.proxiedPropertyCounts()) |
setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::CompositorProxy)); |
} |
+uint32_t Element::compositorMutableProperties() const |
+{ |
+ if (!hasCompositorProxy()) |
esprehn
2015/12/07 20:54:24
this technically is a few extra branches and funct
Ian Vollick
2015/12/08 00:16:44
I did it!
|
+ return WebCompositorMutablePropertyNone; |
+ return elementRareData()->proxiedPropertyCounts()->proxiedProperties(); |
+} |
+ |
bool Element::hasNonEmptyLayoutSize() const |
{ |
document().updateLayoutIgnorePendingStylesheets(); |
@@ -1687,9 +1703,6 @@ PassRefPtr<ComputedStyle> Element::styleForLayoutObject() |
style->setHasInlineTransform(inlineStyle->hasProperty(CSSPropertyTransform)); |
} |
- if (hasRareData() && elementRareData()->proxyCount() > 0) |
- style->setHasCompositorProxy(true); |
- |
document().didRecalculateStyleForElement(); |
return style.release(); |
} |