Bug 1877850 Part 1 - Convert callers of ReflowInput physical size accessors to use logical ones. r=dholbert

ReflowInput's computed sizes and border&padding are stored in logical
coordinates, so accessing the physical version is slower [1]. This patch
converts as many callers as possible to use logical coordinates.

This patch doesn't change behavior.

[1] For example, accessing `ComputedWidth()` and `ComputedHeight()` needs two
`IsVertical()` check, but `GetPhysicalSize()` only needs one.

Differential Revision: https://phabricator.services.mozilla.com/D200237
This commit is contained in:
Ting-Yu Lin
2024-02-01 22:02:00 +00:00
parent 3b025b2cba
commit 4f26895e18
9 changed files with 17 additions and 28 deletions

View File

@@ -399,7 +399,7 @@ struct ReflowInput : public SizeComputationInput {
}
nsSize ComputedPhysicalSize() const {
return nsSize(ComputedWidth(), ComputedHeight());
return mComputedSize.GetPhysicalSize(mWritingMode);
}
nsMargin ComputedPhysicalOffsets() const {