Index: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
index ff610fc7505eb5cb88eae2596ef7f27a8ba0df42..05a473c58849e5b9c271faf54e97078d0545ce31 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp |
@@ -181,6 +181,24 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl |
adjustStyleForFirstLetter(style); |
} |
+ if (element && element->hasCompositorProxy()) { |
+ TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "StyleAdjuster::adjustComputedStyle hasCompositorProxy"); |
+ |
+ style.setHasCompositorProxy(true); |
+ // We could check which properties are actually proxied and only set |
+ // will change on those, but there is currently little value as these |
+ // have the same effect. It will also require providing a way for |
+ // elements to access their associated proxies on the main thread (there |
+ // is no other reason for doing this, presently). |
+ style.setWillChangeScrollPosition(true); |
+ Vector<CSSPropertyID> properties = style.willChangeProperties(); |
+ if (!properties.contains(CSSPropertyOpacity)) |
+ properties.append(CSSPropertyOpacity); |
+ if (!properties.contains(CSSPropertyTransform)) |
+ properties.append(CSSPropertyTransform); |
+ style.setWillChangeProperties(properties); |
enne (OOO)
2015/11/10 00:11:41
This is what guarantees that having a compositor p
Ian Vollick
2015/11/10 20:30:14
Yep, that's right.
|
+ } |
+ |
// Make sure our z-index value is only applied if the object is positioned. |
if (style.position() == StaticPosition && !parentStyleForcesZIndexToCreateStackingContext(parentStyle)) |
style.setHasAutoZIndex(); |