Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp |
| index 8f2317a75fc1dba07ef262829306ce000d3fb0de..c20a0f0cfdafbb0b30d11b613b67d0758e711c92 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp |
| @@ -29,6 +29,19 @@ bool isAncestorOf(const PropertyNode* ancestor, const PropertyNode* child) { |
| return child == ancestor; |
| } |
| +const CompositorElementId PropertyTreeState::compositorElementId() const { |
| + // Zero or more of the scroll, effect or transform nodes could have a |
| + // compositor element id. The order doesn't matter as the element id should be |
| + // the same on all that have a non-default CompositorElementId. |
|
ajuma
2017/01/20 15:07:46
Is it worth DCHECK-ing that this holds?
wkorman
2017/01/20 22:13:56
Done.
|
| + if (effect()->compositorElementId()) |
| + return effect()->compositorElementId(); |
| + if (scroll()->compositorElementId()) |
| + return scroll()->compositorElementId(); |
| + if (transform()->compositorElementId()) |
| + return transform()->compositorElementId(); |
| + return CompositorElementId(); |
| +} |
| + |
| PropertyTreeState::InnermostNode PropertyTreeState::innermostNode() const { |
| // TODO(chrishtr): this is very inefficient when innermostNode() is called |
| // repeatedly. |