Cleanup ReflowInput a bit
Categories
(Core :: Layout, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(6 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Some cleanup in ReflowInput
's constructor and the setup of containing block size.
Assignee | ||
Comment 1•6 years ago
|
||
There are some minor behavior changes.
-
Change the default containing block size from
Logical(mWritingMode, -1, -1) to
LogicalSize(mWritingMode, NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE). -
Move DISPLAY_INIT_CONSTRAINTS() to the very bottom of
ReflowInput::InitConstraints() to have it dumps containing block size
calculated by ComputeContainingBlockRectangle(). It's not very useful
to dump the default size if it were at the beginning of the method. -
mContainingBlockSize is starting to cache the value computed by
ComputeContainingBlockRectangle(). It is only used by
nsTableWrapperFrame::InitChildReflowInput(), but can be useful in
other places.
Assignee | ||
Comment 2•6 years ago
|
||
Depends on D28426
Assignee | ||
Comment 3•6 years ago
|
||
Depends on D28427
Assignee | ||
Comment 4•6 years ago
|
||
Depends on D28428
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
MOZ_INIT_OUTSIDE_CTOR just disables the static check that the member
variable must be initialized in the constructor. Giving the member
variable a default value would be clearer.
Depends on D28428
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
There are some minor behavior changes come with this.
-
Change the default containing block size to (NS_UNCONSTRAINEDSIZE,
NS_UNCONSTRAINEDSIZE). I think this is more reasonable than (-1, -1). -
Move DISPLAY_INIT_CONSTRAINTS() to the very bottom of
ReflowInput::InitConstraints() to have it dumps containing block size
calculated by ComputeContainingBlockRectangle(). It's not very useful
to dump the default size if it were at the beginning of the method. -
mContainingBlockSize is used to cache only the block size passing
though constructor, Init(), or the invalid (-1, -1). This patch makes
it cache the value computed by ComputeContainingBlockRectangle().Note that mContainingBlockSize is used only in
nsTableWrapperFrame::InitChildReflowInput() to set the inner table
frame's containing block to be the same as the outer table frame's.
We don't change this behavior by caching more. Because even if the
inner frame use the invalid cached (-1, -1) containing block size
from the outer reflow input, it still computes the block size again
in InitConstraints(). (Inner table's cb is the same as the outer
table's per InitCBReflowInput().)
Depends on D28426
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/18c6cc260c27
https://hg.mozilla.org/mozilla-central/rev/3cd891607bf6
https://hg.mozilla.org/mozilla-central/rev/7bfdaa5f19d8
https://hg.mozilla.org/mozilla-central/rev/d59741bdae0b
https://hg.mozilla.org/mozilla-central/rev/b23e64dd2c7b
https://hg.mozilla.org/mozilla-central/rev/e5029a42a612
Description
•