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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 1405993008: compositor-worker: plumb element id and mutable properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed layout test (and logged bug) Created 5 years, 1 month 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
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();

Powered by Google App Engine
This is Rietveld 408576698