Implement "contain:size" property for ColumnSetWrapperFrame
Categories
(Core :: Layout: Columns, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
The functions move to ColumnUtils will be used by ColumnSetWrapperFrame
to implement GetPrefISize() and GetMinISize().
Also, I verify locally that non-unified build is still working by
s/UNIFIED_SOURCES/SOURCES/ in layout/generic/moz.build.
Assignee | ||
Comment 2•6 years ago
|
||
If column-span is enabled, nsColumnSetFrame becomes an inner frame under
ColumnSetWrapperFrame, so it cannot perceive the contain property.
This patch doesn't change the logic but make the logic easier to
simplify once we start eliminating column-span pref.
Depends on D29614
Assignee | ||
Comment 3•6 years ago
|
||
This patch replicates some of the logic that calculates intrinsic size
from nsColumnSetFrame because when column-width is non-auto or
"contain:size" is used, they have a priority, and no column box's
intrinsic size is required.
nsColumnSetFrame inherits all the column styles from
ColumnSetWrapperFrame (in ua.css), so when column box's intrinsic size
is required, we can still defer the calculation to nsColumnSetFrame.
Note it may be worth to reuse nsBlockFrame's mPrefWidth and mMinWidth to
cache intrinsic size for ColumnSetWrapperFrame, but this can be done
separately.
Depends on D29615
Assignee | ||
Comment 4•6 years ago
|
||
I morph this bug for implementing "contain:size" because I'm not sure what needs to be done to implement contain:layout
in ColumnSetWrapperFrame
, and I don't see any IsContainLayout()
in nsColumnSetFrame
.
Comment 5•6 years ago
|
||
(In reply to Ting-Yu Lin [:TYLin] (UTC-7) from comment #4)
I morph this bug for implementing "contain:size" because I'm not sure what needs to be done to implement
contain:layout
inColumnSetWrapperFrame
, and I don't see anyIsContainLayout()
innsColumnSetFrame
.
I think the main per-frame-class contain:layout
functionality is to behave as if you have no baseline. And ColumnSetWrapperFrame probably gets that for free by virtue of inheriting nsBlockFrame's Reflow method and baseline getters.
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e77c2a2c5d82
https://hg.mozilla.org/mozilla-central/rev/93fd1b5a5a02
https://hg.mozilla.org/mozilla-central/rev/6cc70607d8af
Description
•