Index: third_party/WebKit/Source/core/layout/LayoutBox.h |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h |
index 1aa640e967d31c4f6b217095bf7f7266029a45d4..ca26cdbff78eeb24b3482ae0b87951d8a4fbbdd2 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h |
@@ -318,6 +318,7 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject { |
return LayoutSize(m_frameRect.x(), m_frameRect.y()); |
} |
LayoutSize size() const { return m_frameRect.size(); } |
+ LayoutSize previousSize() const { return m_previousSize; } |
IntSize pixelSnappedSize() const { return m_frameRect.pixelSnappedSize(); } |
void setLocation(const LayoutPoint& location) { |
@@ -1308,6 +1309,21 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject { |
virtual bool hasControlClip() const { return false; } |
+ class MutableForPainting : public LayoutObject::MutableForPainting { |
+ public: |
+ void setPreviousSize(const LayoutSize& size) { |
+ static_cast<LayoutBox&>(m_layoutObject).m_previousSize = size; |
+ } |
+ |
+ protected: |
+ friend class LayoutBox; |
+ MutableForPainting(const LayoutBox& box) |
+ : LayoutObject::MutableForPainting(box) {} |
+ }; |
+ MutableForPainting getMutableForPainting() const { |
+ return MutableForPainting(*this); |
+ } |
+ |
protected: |
virtual LayoutRect controlClipRect(const LayoutPoint&) const { |
return LayoutRect(); |
@@ -1507,6 +1523,19 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject { |
void updateBackgroundAttachmentFixedStatusAfterStyleChange(); |
+ void inflateVisualRectForFilter(LayoutRect&) const; |
+ void inflateVisualRectForFilterUnderContainer( |
+ LayoutRect&, |
+ const LayoutObject& container, |
+ const LayoutBoxModelObject* ancestorToStopAt) const; |
+ |
+ LayoutRectOutsets m_marginBoxOutsets; |
+ |
+ void addSnapArea(const LayoutBox&); |
+ void removeSnapArea(const LayoutBox&); |
+ |
+ LayoutRect debugRect() const override; |
+ |
// The CSS border box rect for this box. |
// |
// The rectangle is in this box's physical coordinates but with a |
@@ -1517,24 +1546,14 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject { |
// with this box's margins. |
LayoutRect m_frameRect; |
+ // Previous size of m_frameRect, updated after paint invalidation. |
+ LayoutSize m_previousSize; |
+ |
// Our intrinsic height, used for min-height: min-content etc. Maintained by |
// updateLogicalHeight. This is logicalHeight() before it is clamped to |
// min/max. |
mutable LayoutUnit m_intrinsicContentLogicalHeight; |
- void inflateVisualRectForFilter(LayoutRect&) const; |
- void inflateVisualRectForFilterUnderContainer( |
- LayoutRect&, |
- const LayoutObject& container, |
- const LayoutBoxModelObject* ancestorToStopAt) const; |
- |
- LayoutRectOutsets m_marginBoxOutsets; |
- |
- void addSnapArea(const LayoutBox&); |
- void removeSnapArea(const LayoutBox&); |
- |
- LayoutRect debugRect() const override; |
- |
protected: |
// The logical width of the element if it were to break its lines at every |
// possible opportunity. |