Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(57)

Unified Diff: Source/WebCore/rendering/RenderObject.h

Issue 342250043: Builds
Patch Set: FIx bug and clean up the should-apply-clip logic Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderInline.cpp ('k') | Source/WebCore/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderObject.h
diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h
index e88775b83540ba53dd168501411e493dc085cc4a..98c05ab99e019291f92ad047c1eef84c8c248aa9 100644
--- a/Source/WebCore/rendering/RenderObject.h
+++ b/Source/WebCore/rendering/RenderObject.h
@@ -671,23 +671,35 @@ public:
// Given a rect in the object's coordinate space, compute a rect suitable for repainting
// that rect in view coordinates.
- LayoutRect computeAbsoluteRepaintRect(const LayoutRect& r, bool fixed = false) const
+ LayoutRect computeAbsoluteRepaintRect(const LayoutRect& r) const
{
- return computeRectForRepaint(r, nullptr, { fixed, false });
+ return computeRectForRepaint(r, nullptr);
}
// Given a rect in the object's coordinate space, compute a rect suitable for repainting
// that rect in the coordinate space of repaintContainer.
- struct RepaintContext {
- RepaintContext(bool hasPositionFixedDescendant = false, bool dirtyRectIsFlipped = false)
+ LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer) const;
+ FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer) const;
+
+ // Given a rect in the object's coordinate space, compute the location in container space where this rect is visible,
+ // when clipping and scrolling as specified by the context. When using edge-inclusive intersection, return std::nullopt
+ // rather than an empty rect if the rect is completely clipped out in container space.
+ struct VisibleRectContext {
+ VisibleRectContext(bool hasPositionFixedDescendant = false, bool dirtyRectIsFlipped = false, bool useEdgeInclusiveIntersection = false, bool applyCompositedClips = true, bool applyCompositedContainerScrolls = true)
: m_hasPositionFixedDescendant(hasPositionFixedDescendant)
, m_dirtyRectIsFlipped(dirtyRectIsFlipped)
+ , m_useEdgeInclusiveIntersection(useEdgeInclusiveIntersection)
+ , m_applyCompositedClips(applyCompositedClips)
+ , m_applyCompositedContainerScrolls(applyCompositedContainerScrolls)
{
}
bool m_hasPositionFixedDescendant;
bool m_dirtyRectIsFlipped;
+ bool m_useEdgeInclusiveIntersection;
+ bool m_applyCompositedClips;
+ bool m_applyCompositedContainerScrolls;
};
- virtual LayoutRect computeRectForRepaint(const LayoutRect&, const RenderLayerModelObject* repaintContainer, RepaintContext = { }) const;
- virtual FloatRect computeFloatRectForRepaint(const FloatRect&, const RenderLayerModelObject* repaintContainer, bool fixed = false) const;
+ virtual std::optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const;
+ virtual std::optional<FloatRect> computeFloatVisibleRectInContainer(const FloatRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const;
virtual unsigned int length() const { return 1; }
@@ -805,6 +817,10 @@ protected:
static FragmentedFlowState computedFragmentedFlowState(const RenderObject&);
+ static bool shouldApplyCompositedContainerScrollsForRepaint();
+
+ static VisibleRectContext visibleRectContextForRepaint();
+
private:
#ifndef NDEBUG
bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; }
« no previous file with comments | « Source/WebCore/rendering/RenderInline.cpp ('k') | Source/WebCore/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b