| 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 c90996423c64ee535a9fbb6f0bc9b831a0b76b33..352afd94ce4a4ca3615b5760590c3013b68e92a5 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -39,6 +39,7 @@
|
| #include "core/animation/AnimationTimeline.h"
|
| #include "core/animation/css/CSSAnimations.h"
|
| #include "core/css/CSSImageValue.h"
|
| +#include "core/css/CSSFunctionValue.h"
|
| #include "core/css/CSSStyleSheet.h"
|
| #include "core/css/CSSValuePool.h"
|
| #include "core/css/PropertySetCSSStyleDeclaration.h"
|
| @@ -123,7 +124,9 @@
|
| #include "platform/EventDispatchForbiddenScope.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/UserGestureIndicator.h"
|
| +#include "platform/graphics/CompositorMutation.h"
|
| #include "platform/scroll/ScrollableArea.h"
|
| +#include "platform/transforms/MatrixTransformOperation.h"
|
| #include "wtf/BitVector.h"
|
| #include "wtf/HashFunctions.h"
|
| #include "wtf/text/CString.h"
|
| @@ -993,13 +996,36 @@ void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties)
|
| setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::CompositorProxy));
|
| }
|
|
|
| +void Element::updateFromMutation(const CompositorMutation& mutation)
|
| +{
|
| + ASSERT(isStyledElement());
|
| + bool needsStyleUpdate = mutation.isOpacityMutated() || mutation.isTransformMutated();
|
| + TRACE_EVENT0("compositor-worker", "Element::updateFromMutation");
|
| + if (needsStyleUpdate) {
|
| + if (mutation.isOpacityMutated())
|
| + setInlineStyleProperty(CSSPropertyOpacity, mutation.opacity(), CSSPrimitiveValue::UnitType::Number);
|
| + if (mutation.isTransformMutated()) {
|
| + RefPtrWillBeRawPtr<CSSValueList> valueList(CSSValueList::createSpaceSeparated());
|
| + RefPtrWillBeRawPtr<CSSFunctionValue> matrixValue(CSSFunctionValue::create(CSSValueMatrix3d));
|
| + for (int col = 0; col < 4; col++) {
|
| + for (int row = 0; row < 4; row++) {
|
| + matrixValue->append(cssValuePool().createValue(mutation.transform().get(row, col), CSSPrimitiveValue::UnitType::Pixels));
|
| + }
|
| + }
|
| + valueList->append(matrixValue.release());
|
| + ensureMutableInlineStyle().setProperty(CSSPropertyTransform, valueList.release());
|
| + inlineStyleChanged();
|
| + }
|
| + }
|
| +}
|
| +
|
| uint32_t Element::compositorMutableProperties() const
|
| {
|
| if (!hasRareData())
|
| - return WebCompositorMutablePropertyNone;
|
| + return CompositorMutablePropertyNone;
|
| if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCounts())
|
| return set->proxiedProperties();
|
| - return WebCompositorMutablePropertyNone;
|
| + return CompositorMutablePropertyNone;
|
| }
|
|
|
| bool Element::hasNonEmptyLayoutSize() const
|
|
|