Closed
Bug 1394662
Opened 7 years ago
Closed 7 years ago
Consider making ::-moz-table-column a non-inheriting anon box
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
Per spec, the only styles that apply to table columns are border props, background props, 'width, and 'visibility'.
The only one of those that inherits is 'visibility'. And the only relevant value is "collapse". But an anonymous col can only be "visibility: collapse" in Gecko right now if its colgroup is, and then the colgroup will get collapsed away as a whole. So it doesn't matter whether the col inherits the visibility style.
Given that, I suspect it's safe to make ::-moz-table-column a non-inheriting anon box. This would help out stylo memory usage; right now in the common case of no colgroup/col tags we end up with lots of unshared anonymous col styles because the cols are inheriting from the colgroup anonymous box.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bzbarsky
Assignee | ||
Comment 1•7 years ago
|
||
In our UA sheet the only style we apply to ::-moz-table-column is "display: table-column".
Per spec, the only styles that apply to table columns are border props,
background props, 'width, and 'visibility'.
The only one of those that inherits is 'visibility'. And the only relevant
value per spec is "collapse". But an anonymous column can only be "visibility:
collapse" in Gecko right now if its colgroup is, and then the colgroup will get
collapsed away as a whole. So it doesn't matter whether the column inherits the
visibility style.
In practice, we do something special for "hidden" on a table-column as well,
during display list building, which affects hit-testing. Per
https://github.com/w3c/csswg-drafts/issues/1763 it's not clear that we should be
doing this at all, but for now we just keep our existing behavior and ensure
that the parent colgroup's visibility style is taken into account for anonymous
columns when building display lists.
Attachment #8902414 -
Flags: review?(cam)
Assignee | ||
Comment 2•7 years ago
|
||
In our UA sheet the only style we apply to ::-moz-table-column is "display: table-column".
Per spec, the only styles that apply to table columns are border props,
background props, 'width', and 'visibility'.
The only one of those that inherits is 'visibility'. And the only relevant
value per spec is "collapse". But an anonymous column can only be "visibility:
collapse" in Gecko right now if its colgroup is, and then the colgroup will get
collapsed away as a whole. So it doesn't matter whether the column inherits the
visibility style.
In practice, we do something special for "hidden" on a table-column as well,
during display list building, which affects hit-testing. Per
https://github.com/w3c/csswg-drafts/issues/1763 it's not clear that we should be
doing this at all, but for now we just keep our existing behavior and ensure
that the parent colgroup's visibility style is taken into account for anonymous
columns when building display lists.
Attachment #8902435 -
Flags: review?(cam)
Assignee | ||
Updated•7 years ago
|
Attachment #8902414 -
Attachment is obsolete: true
Attachment #8902414 -
Flags: review?(cam)
Comment 3•7 years ago
|
||
Comment on attachment 8902435 [details] [diff] [review]
Make ::-moz-table-column a non-inheriting anonymous box
Review of attachment 8902435 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/tables/nsTableFrame.cpp
@@ +1515,5 @@
> + // If we have an anonymous column in the AppendAnonymousColFrames sense, it
> + // might think it's visible for painting (due to not inheriting its colgroup's
> + // styles) while the colgroup as a whole is actually not visible for painting
> + // because it has hidden visibility. In that situation we should also treat
> + // the column as not visibile, because otherwise hit-testing can get a bit
visible
Attachment #8902435 -
Flags: review?(cam) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1e89ea2871e7
Make ::-moz-table-column a non-inheriting anonymous box. r=heycam
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•