Bug 1728497 - Remove nsColumnSetFrame::CalculateColumnRuleBounds and just return InkOverflowRect() instead. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D124202
This commit is contained in:
@@ -31,13 +31,13 @@ class nsDisplayColumnRule : public nsPaintedDisplayItem {
|
||||
}
|
||||
MOZ_COUNTED_DTOR_OVERRIDE(nsDisplayColumnRule)
|
||||
|
||||
/**
|
||||
* Returns the frame's ink overflow rect instead of the frame's bounds.
|
||||
*/
|
||||
nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) const override {
|
||||
*aSnap = false;
|
||||
return static_cast<nsColumnSetFrame*>(mFrame)->CalculateColumnRuleBounds(
|
||||
ToReferenceFrame());
|
||||
// We just return the frame's ink-overflow rect, which is guaranteed to
|
||||
// contain all the column-rule areas. It's not worth calculating the exact
|
||||
// union of those areas since it would only lead to performance improvements
|
||||
// during painting in rare edge cases.
|
||||
return mFrame->InkOverflowRect() + ToReferenceFrame();
|
||||
}
|
||||
|
||||
bool CreateWebRenderCommands(
|
||||
@@ -164,17 +164,6 @@ void nsColumnSetFrame::ForEachColumnRule(
|
||||
}
|
||||
}
|
||||
|
||||
nsRect nsColumnSetFrame::CalculateColumnRuleBounds(
|
||||
const nsPoint& aOffset) const {
|
||||
nsRect combined;
|
||||
ForEachColumnRule(
|
||||
[&combined](const nsRect& aLineRect) {
|
||||
combined = combined.Union(aLineRect);
|
||||
},
|
||||
aOffset);
|
||||
return combined;
|
||||
}
|
||||
|
||||
void nsColumnSetFrame::CreateBorderRenderers(
|
||||
nsTArray<nsCSSBorderRenderer>& aBorderRenderers, gfxContext* aCtx,
|
||||
const nsRect& aDirtyRect, const nsPoint& aPt) {
|
||||
|
||||
@@ -68,7 +68,6 @@ class nsColumnSetFrame final : public nsContainerFrame {
|
||||
}
|
||||
#endif
|
||||
|
||||
nsRect CalculateColumnRuleBounds(const nsPoint& aOffset) const;
|
||||
void CreateBorderRenderers(nsTArray<nsCSSBorderRenderer>& aBorderRenderers,
|
||||
gfxContext* aCtx, const nsRect& aDirtyRect,
|
||||
const nsPoint& aPt);
|
||||
|
||||
Reference in New Issue
Block a user