Improve ReflowOutput a bit, and fix writing mode mismatch in ViewportFrame::Reflow()
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
Attachments
(2 files)
In this bug, I'd like to change mISize
and mBSize
stored in ReflowOutput
to LogicalSize
so that most of the ReflowOutput
's methods can delegate to LogicalSize
's methods.
With above, the CHECK_WRITING_MODE
assertion in LogicalSize
does discover a writing mode mismatch in ViewportFrame::Reflow
. I'll fix it in this bug as well.
Assignee | ||
Comment 1•4 years ago
|
||
After applying the next part, 1161752.html's runTest2() can trigger the
following assertion without this patch.
ASSERTION: writing-mode mismatch: 'aWritingMode.IgnoreSideways() == GetWritingMode().IgnoreSideways()'
kidDesiredSize
is initialized by ViewportFrame's reflow input, so it
stores the ViewportFrame's writing mode. But after calling
ReflowChild
, the old code is accessing the kid's block-size by using
kidDesiredSize.BSize(wm)
, where wm
is being shadowed within the
inner if and becomes the kid's writing mode. This patch fixed it by
changing the inner wm
to kidWM
for the clarity and avoiding the
variable shadowing.
In the next part, ReflowOutput's documentation is updated, hoping to
prevent the writing mode misusages in the future.
Assignee | ||
Comment 2•4 years ago
|
||
By using LogicalSize instead of a pair of mISize and mBSize, most of the
ReflowOutput's methods can delegate to LogicalSize's methods.
This change shouldn't change behavior.
Depends on D93868
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d9b31b7b645a
https://hg.mozilla.org/mozilla-central/rev/2e4c9e0bdba9
Description
•