Bug 1899345 Part 1 - Convert PhysicalAxes to an EnumSet<PhysicalAxis>. r=layout-reviewers,emilio

This also makes `PhysicalAxis::{Horizontal,Vertical}` more useful when we
previous needed `PhysicalAxes::{Horizontal,Vertical}`.

Differential Revision: https://phabricator.services.mozilla.com/D211941
This commit is contained in:
Ting-Yu Lin
2024-05-29 05:10:38 +00:00
parent 4274eabfc8
commit 5644682c09
7 changed files with 48 additions and 54 deletions

View File

@@ -1817,7 +1817,7 @@ void nsTableFrame::Reflow(nsPresContext* aPresContext,
nsRect tableRect(0, 0, aDesiredSize.Width(), aDesiredSize.Height());
if (ShouldApplyOverflowClipping(aReflowInput.mStyleDisplay) !=
PhysicalAxes::Both) {
kPhysicalAxesBoth) {
// collapsed border may leak out
LogicalMargin bcMargin = GetExcludedOuterBCBorder(wm);
tableRect.Inflate(bcMargin.GetPhysicalMargin(wm));
@@ -1890,7 +1890,7 @@ void nsTableFrame::FixupPositionedTableParts(nsPresContext* aPresContext,
bool nsTableFrame::ComputeCustomOverflow(OverflowAreas& aOverflowAreas) {
// As above in Reflow, make sure the table overflow area includes the table
// rect, and check for collapsed borders leaking out.
if (ShouldApplyOverflowClipping(StyleDisplay()) != PhysicalAxes::Both) {
if (ShouldApplyOverflowClipping(StyleDisplay()) != kPhysicalAxesBoth) {
nsRect bounds(nsPoint(0, 0), GetSize());
WritingMode wm = GetWritingMode();
LogicalMargin bcMargin = GetExcludedOuterBCBorder(wm);