|
Lines 605-629
public:
a/Source/WebCore/rendering/RenderObject.h_sec1
|
| 605 |
// Repaint a slow repaint object, which, at this time, means we are repainting an object with background-attachment:fixed. |
605 |
// Repaint a slow repaint object, which, at this time, means we are repainting an object with background-attachment:fixed. |
| 606 |
void repaintSlowRepaintObject() const; |
606 |
void repaintSlowRepaintObject() const; |
| 607 |
|
607 |
|
| 608 |
// Returns the rect that should be repainted whenever this object changes. The rect is in the view's |
|
|
| 609 |
// coordinate space. This method deals with outlines and overflow. |
| 610 |
LayoutRect absoluteClippedOverflowRect() const { return clippedOverflowRectForRepaint(nullptr); } |
| 611 |
WEBCORE_EXPORT IntRect pixelSnappedAbsoluteClippedOverflowRect() const; |
| 612 |
virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const; |
| 613 |
virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const; |
| 614 |
virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*repaintContainer*/, const RenderGeometryMap* = nullptr) const { return LayoutRect(); } |
| 615 |
|
| 616 |
// Given a rect in the object's coordinate space, compute a rect suitable for repainting |
| 617 |
// that rect in view coordinates. |
| 618 |
LayoutRect computeAbsoluteRepaintRect(const LayoutRect& rect) const { return computeRectForRepaint(rect, nullptr); } |
| 619 |
// Given a rect in the object's coordinate space, compute a rect suitable for repainting |
| 620 |
// that rect in the coordinate space of repaintContainer. |
| 621 |
LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer) const; |
| 622 |
FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer) const; |
| 623 |
|
| 624 |
// Given a rect in the object's coordinate space, compute the location in container space where this rect is visible, |
| 625 |
// when clipping and scrolling as specified by the context. When using edge-inclusive intersection, return WTF::nullopt |
| 626 |
// rather than an empty rect if the rect is completely clipped out in container space. |
| 627 |
enum class VisibleRectContextOption { |
608 |
enum class VisibleRectContextOption { |
| 628 |
UseEdgeInclusiveIntersection = 1 << 0, |
609 |
UseEdgeInclusiveIntersection = 1 << 0, |
| 629 |
ApplyCompositedClips = 1 << 1, |
610 |
ApplyCompositedClips = 1 << 1, |
|
Lines 642-647
public:
a/Source/WebCore/rendering/RenderObject.h_sec2
|
| 642 |
bool descendantNeedsEnclosingIntRect { false }; |
623 |
bool descendantNeedsEnclosingIntRect { false }; |
| 643 |
OptionSet<VisibleRectContextOption> options; |
624 |
OptionSet<VisibleRectContextOption> options; |
| 644 |
}; |
625 |
}; |
|
|
626 |
|
| 627 |
// Returns the rect that should be repainted whenever this object changes. The rect is in the view's |
| 628 |
// coordinate space. This method deals with outlines and overflow. |
| 629 |
LayoutRect absoluteClippedOverflowRectForRepaint() const { return clippedOverflowRect(nullptr, visibleRectContextForRepaint()); } |
| 630 |
LayoutRect absoluteClippedOverflowRectForSpatialNavigation() const { return clippedOverflowRect(nullptr, visibleRectContextForSpatialNavigation()); } |
| 631 |
WEBCORE_EXPORT IntRect pixelSnappedAbsoluteClippedOverflowRect() const; |
| 632 |
virtual LayoutRect clippedOverflowRect(const RenderLayerModelObject* repaintContainer, VisibleRectContext) const; |
| 633 |
LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const { return clippedOverflowRect(repaintContainer, visibleRectContextForRepaint()); } |
| 634 |
virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const; |
| 635 |
virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*repaintContainer*/, const RenderGeometryMap* = nullptr) const { return LayoutRect(); } |
| 636 |
|
| 637 |
// Given a rect in the object's coordinate space, compute a rect suitable for repainting |
| 638 |
// that rect in view coordinates. |
| 639 |
LayoutRect computeAbsoluteRepaintRect(const LayoutRect& rect) const { return computeRect(rect, nullptr, visibleRectContextForRepaint()); } |
| 640 |
// Given a rect in the object's coordinate space, compute a rect in the coordinate space |
| 641 |
// of repaintContainer suitable for the given VisibleRectContext. |
| 642 |
LayoutRect computeRect(const LayoutRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const; |
| 643 |
LayoutRect computeRectForRepaint(const LayoutRect& rect, const RenderLayerModelObject* repaintContainer) const { return computeRect(rect, repaintContainer, visibleRectContextForRepaint()); } |
| 644 |
FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer) const; |
| 645 |
|
| 646 |
// Given a rect in the object's coordinate space, compute the location in container space where this rect is visible, |
| 647 |
// when clipping and scrolling as specified by the context. When using edge-inclusive intersection, return WTF::nullopt |
| 648 |
// rather than an empty rect if the rect is completely clipped out in container space. |
| 645 |
virtual Optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const; |
649 |
virtual Optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const; |
| 646 |
virtual Optional<FloatRect> computeFloatVisibleRectInContainer(const FloatRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const; |
650 |
virtual Optional<FloatRect> computeFloatVisibleRectInContainer(const FloatRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const; |
| 647 |
|
651 |
|
|
Lines 754-762
protected:
a/Source/WebCore/rendering/RenderObject.h_sec3
|
| 754 |
|
758 |
|
| 755 |
static FragmentedFlowState computedFragmentedFlowState(const RenderObject&); |
759 |
static FragmentedFlowState computedFragmentedFlowState(const RenderObject&); |
| 756 |
|
760 |
|
| 757 |
static bool shouldApplyCompositedContainerScrollsForRepaint(); |
|
|
| 758 |
|
| 759 |
static VisibleRectContext visibleRectContextForRepaint(); |
761 |
static VisibleRectContext visibleRectContextForRepaint(); |
|
|
762 |
static VisibleRectContext visibleRectContextForSpatialNavigation(); |
| 760 |
|
763 |
|
| 761 |
bool isSetNeedsLayoutForbidden() const; |
764 |
bool isSetNeedsLayoutForbidden() const; |
| 762 |
|
765 |
|
|
Lines 1135-1140
inline auto RenderObject::visibleRectContextForRepaint() -> VisibleRectContext
a/Source/WebCore/rendering/RenderObject.h_sec4
|
| 1135 |
return { false, false, { VisibleRectContextOption::ApplyContainerClip, VisibleRectContextOption::ApplyCompositedContainerScrolls } }; |
1138 |
return { false, false, { VisibleRectContextOption::ApplyContainerClip, VisibleRectContextOption::ApplyCompositedContainerScrolls } }; |
| 1136 |
} |
1139 |
} |
| 1137 |
|
1140 |
|
|
|
1141 |
inline auto RenderObject::visibleRectContextForSpatialNavigation() -> VisibleRectContext |
| 1142 |
{ |
| 1143 |
return { false, false, { VisibleRectContextOption::ApplyContainerClip, VisibleRectContextOption::ApplyCompositedContainerScrolls, VisibleRectContextOption::ApplyCompositedClips } }; |
| 1144 |
} |
| 1145 |
|
| 1138 |
inline bool RenderObject::isSetNeedsLayoutForbidden() const |
1146 |
inline bool RenderObject::isSetNeedsLayoutForbidden() const |
| 1139 |
{ |
1147 |
{ |
| 1140 |
#if ASSERT_ENABLED |
1148 |
#if ASSERT_ENABLED |