| Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
|
| index 05730ac27e8c2740caece6be811dd02bcbd1ba9f..8c32a294b5d23e8e3b878fc0198cb0e7455ea786 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
|
| @@ -26,6 +26,7 @@
|
|
|
| #include "core/CoreExport.h"
|
| #include "core/layout/LayoutObject.h"
|
| +#include "core/page/scrolling/StickyPositionScrollingConstraints.h"
|
| #include "core/style/ShadowData.h"
|
| #include "platform/geometry/LayoutRect.h"
|
|
|
| @@ -64,6 +65,15 @@ enum ContentChangeType {
|
|
|
| class InlineFlowBox;
|
|
|
| +struct LayoutBoxModelObjectRareData {
|
| + WTF_MAKE_NONCOPYABLE(LayoutBoxModelObjectRareData);
|
| + USING_FAST_MALLOC(LayoutBoxModelObjectRareData);
|
| +public:
|
| + LayoutBoxModelObjectRareData() {}
|
| +
|
| + StickyPositionScrollingConstraints m_stickyPositionScrollingConstraints;
|
| +};
|
| +
|
| // This class is the base class for all CSS objects.
|
| //
|
| // All CSS objects follow the box model object. See THE BOX MODEL section in
|
| @@ -141,6 +151,12 @@ public:
|
| LayoutSize relativePositionOffset() const;
|
| LayoutSize relativePositionLogicalOffset() const { return style()->isHorizontalWritingMode() ? relativePositionOffset() : relativePositionOffset().transposedSize(); }
|
|
|
| + // Populates StickyPositionConstraints, setting the sticky box rect, containing block rect and updating
|
| + // the constraint offsets according to the available space.
|
| + FloatRect computeStickyConstrainingRect(const PaintLayer* ancestorOverflowLayer) const;
|
| + void updateStickyPositionConstraints(PaintLayer* ancestorOverflowLayer) const;
|
| + LayoutSize stickyPositionOffset() const;
|
| +
|
| LayoutSize offsetForInFlowPosition() const;
|
|
|
| // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines (LayoutFlow)
|
| @@ -281,6 +297,8 @@ public:
|
| // The query rect is given in local coordinate system.
|
| virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const { return false; }
|
|
|
| + void invalidateScrollAncestorConstraints();
|
| +
|
| void invalidateTreeIfNeeded(PaintInvalidationState&) override;
|
|
|
| // Indicate that the contents of this layoutObject need to be repainted. Only has an effect if compositing is being used,
|
| @@ -362,9 +380,18 @@ private:
|
| LayoutUnit computedCSSPadding(const Length&) const;
|
| bool isBoxModelObject() const final { return true; }
|
|
|
| + LayoutBoxModelObjectRareData& ensureRareData()
|
| + {
|
| + if (!m_rareData)
|
| + m_rareData = adoptPtr(new LayoutBoxModelObjectRareData());
|
| + return *m_rareData.get();
|
| + }
|
| +
|
| // The PaintLayer associated with this object.
|
| // |m_layer| can be nullptr depending on the return value of layerTypeRequired().
|
| OwnPtr<PaintLayer> m_layer;
|
| +
|
| + OwnPtr<LayoutBoxModelObjectRareData> m_rareData;
|
| };
|
|
|
| DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject());
|
|
|