| Index: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
|
| diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
|
| index a85f4ab2df70505ba856ed0b085898c24b1dfa0d..0ebda5153a25a396b311c3b3191a6db8b06ee482 100644
|
| --- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
|
| +++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
|
| @@ -124,25 +124,51 @@ class CORE_EXPORT ObjectPaintProperties {
|
| const PropertyTreeStateWithOffset* localBorderBoxProperties() const {
|
| return m_localBorderBoxProperties.get();
|
| }
|
| - void updateLocalBorderBoxProperties(
|
| + // True if local border box changes, false otherwise.
|
| + bool updateLocalBorderBoxProperties(
|
| LayoutPoint& paintOffset,
|
| const TransformPaintPropertyNode* transform,
|
| const ClipPaintPropertyNode* clip,
|
| const EffectPaintPropertyNode* effect,
|
| const ScrollPaintPropertyNode* scroll) {
|
| - if (m_localBorderBoxProperties) {
|
| + if (!m_localBorderBoxProperties) {
|
| + m_localBorderBoxProperties = WTF::wrapUnique(
|
| + new ObjectPaintProperties::PropertyTreeStateWithOffset(
|
| + paintOffset, PropertyTreeState(transform, clip, effect, scroll)));
|
| + return true;
|
| + }
|
| + bool changed = false;
|
| + if (m_localBorderBoxProperties->paintOffset != paintOffset) {
|
| m_localBorderBoxProperties->paintOffset = paintOffset;
|
| + changed = true;
|
| + }
|
| + const auto& borderBoxState = m_localBorderBoxProperties->propertyTreeState;
|
| + if (borderBoxState.transform() != transform) {
|
| m_localBorderBoxProperties->propertyTreeState.setTransform(transform);
|
| + changed = true;
|
| + }
|
| + if (borderBoxState.clip() != clip) {
|
| m_localBorderBoxProperties->propertyTreeState.setClip(clip);
|
| + changed = true;
|
| + }
|
| + if (borderBoxState.effect() != effect) {
|
| m_localBorderBoxProperties->propertyTreeState.setEffect(effect);
|
| + changed = true;
|
| + }
|
| + if (borderBoxState.scroll() != scroll) {
|
| m_localBorderBoxProperties->propertyTreeState.setScroll(scroll);
|
| - } else {
|
| - m_localBorderBoxProperties = WTF::wrapUnique(
|
| - new ObjectPaintProperties::PropertyTreeStateWithOffset(
|
| - paintOffset, PropertyTreeState(transform, clip, effect, scroll)));
|
| + changed = true;
|
| }
|
| + return changed;
|
| + }
|
| + // True if an existing property was deleted, false otherwise.
|
| + bool clearLocalBorderBoxProperties() {
|
| + if (m_localBorderBoxProperties) {
|
| + m_localBorderBoxProperties = nullptr;
|
| + return true;
|
| + }
|
| + return false;
|
| }
|
| - void clearLocalBorderBoxProperties() { m_localBorderBoxProperties = nullptr; }
|
|
|
| // This is the complete set of property nodes and paint offset that can be
|
| // used to paint the contents of this object. It is similar to
|
|
|