| Index: third_party/WebKit/Source/core/layout/LayoutObject.h
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| index 8614a89b100a0d259dabca599e1958db3b90da9f..bbc135b27aa54814aacd0dd203dca18ba20171e6 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| @@ -43,6 +43,7 @@
|
| #include "core/layout/api/SelectionState.h"
|
| #include "core/layout/compositing/CompositingState.h"
|
| #include "core/layout/compositing/CompositingTriggers.h"
|
| +#include "core/paint/ObjectPaintProperties.h"
|
| #include "core/style/ComputedStyle.h"
|
| #include "core/style/StyleInheritedData.h"
|
| #include "platform/geometry/FloatQuad.h"
|
| @@ -66,7 +67,6 @@ class LayoutFlowThread;
|
| class LayoutGeometryMap;
|
| class LayoutMultiColumnSpannerPlaceholder;
|
| class LayoutView;
|
| -class ObjectPaintProperties;
|
| class PaintLayer;
|
| class PseudoStyleRequest;
|
| class TransformState;
|
| @@ -1300,27 +1300,8 @@ public:
|
| void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scrollDelta);
|
|
|
| // The previous position of the top-left corner of the object in its previous paint backing.
|
| - const LayoutPoint& previousPositionFromPaintInvalidationBacking() const
|
| - {
|
| - ASSERT(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
|
| - return m_previousPositionFromPaintInvalidationBacking;
|
| - }
|
| - void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& positionFromPaintInvalidationBacking)
|
| - {
|
| - ASSERT(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
|
| - m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking;
|
| - }
|
| -
|
| - bool paintOffsetChanged(const LayoutPoint& newPaintOffset) const
|
| - {
|
| - ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
|
| - return m_previousPositionFromPaintInvalidationBacking != uninitializedPaintOffset() && m_previousPositionFromPaintInvalidationBacking != newPaintOffset;
|
| - }
|
| - void setPreviousPaintOffset(const LayoutPoint& paintOffset)
|
| - {
|
| - ASSERT(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
|
| - m_previousPositionFromPaintInvalidationBacking = paintOffset;
|
| - }
|
| + const LayoutPoint& previousPositionFromPaintInvalidationBacking() const { return m_previousPositionFromPaintInvalidationBacking; }
|
| + void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& positionFromPaintInvalidationBacking) { m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking; }
|
|
|
| PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfields.fullPaintInvalidationReason(); }
|
| bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; }
|
| @@ -1365,7 +1346,10 @@ public:
|
| // Painters can use const methods only, except for these explicitly declared methods.
|
| class MutableForPainting {
|
| public:
|
| - void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutObject.setPreviousPaintOffset(paintOffset); }
|
| + PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidationState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContainer) { return m_layoutObject.invalidatePaintIfNeeded(const_cast<PaintInvalidationState&>(paintInvalidationState), paintInvalidationContainer); }
|
| + void clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState) { m_layoutObject.clearPaintInvalidationState(paintInvalidationState); }
|
| + void setObjectPaintProperties(PassOwnPtr<ObjectPaintProperties> properties) { m_layoutObject.setObjectPaintProperties(properties); }
|
| + void clearObjectPaintProperties() { m_layoutObject.clearObjectPaintProperties(); }
|
|
|
| private:
|
| friend class LayoutObject;
|
| @@ -1634,7 +1618,7 @@ private:
|
| // The passed rect is mutated into the coordinate space of the paint invalidation container.
|
| const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRect&) const;
|
|
|
| - static LayoutPoint uninitializedPaintOffset() { return LayoutPoint(LayoutUnit::max(), LayoutUnit::max()); }
|
| + LayoutObject* parentCrossingFrameBoundaries() const;
|
|
|
| RefPtr<ComputedStyle> m_style;
|
|
|
| @@ -1780,11 +1764,11 @@ private:
|
| // widths.
|
| ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidthsDirty);
|
|
|
| - ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateOverflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2.
|
| + ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateOverflowForPaint);
|
| ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCheckForPaintInvalidation);
|
| ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation);
|
| - ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection); // TODO(wangxianzhu): Remove for slimming paint v2.
|
| - ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseOfChildren); // TODO(wangxianzhu): Remove for slimming paint v2.
|
| + ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection);
|
| + ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseOfChildren);
|
|
|
| // This boolean is the cached value of 'float'
|
| // (see ComputedStyle::isFloating).
|
| @@ -1921,8 +1905,6 @@ private:
|
| // This stores the position in the paint invalidation backing's coordinate.
|
| // It is used to detect layoutObject shifts that forces a full invalidation.
|
| // This point does *not* account for composited scrolling. See adjustInvalidationRectForCompositedScrolling().
|
| - // For slimmingPaintInvalidation, this stores the previous paint offset.
|
| - // TODO(wangxianzhu): Rename this to m_previousPaintOffset when we enable slimmingPaintInvalidation.
|
| LayoutPoint m_previousPositionFromPaintInvalidationBacking;
|
| };
|
|
|
|
|