Closed
Bug 1387568
Opened 7 years ago
Closed 7 years ago
eColGroupAnonymousCol is unused
Categories
(Core :: Layout: Tables, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
(deleted),
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
There are supposed to be three types of colgroups, corresponding to the three values of nsTableColGroupType. But we never actually create any colgroups with type eColGroupAnonymousCol as far as I can tell.
We should either start doing that (i.e. flagging anonymous wrapper colgroups the frame constructor creates around non-anonymous cols not inside a colgroup with that type), or we should switch to only having two colgroup types.
I audited the code that checks colgroup types a bit, and at first glance either solution should be fine. Any opinions?
Comment 1•7 years ago
|
||
I'm not familiar with table column related frames to know, so all things being equal, if there isn't meant to be any kind of different behaviour between these two kinds of anonymous colgroup frames, then merging the two types sounds good.
Assignee | ||
Comment 2•7 years ago
|
||
Before this change, we used eColGroupContent for both colgroups created by table-column-group elements and anonymous colgroups wrapping table-column elements. eColGroupAnonymousCell was used for colgroups created to handle cells that are not in any other colgroup already. eColGroupAnonymousCol was unused.
Attachment #8903746 -
Flags: review?(mats)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 3•7 years ago
|
||
Comment on attachment 8903746 [details] [diff] [review]
Remove unused nsTableColGroupType value
> nsIFrame* newFrame = NS_NewTableColGroupFrame(shell, colGroupStyle);
>- ((nsTableColGroupFrame *)newFrame)->SetColType(aColGroupType);
>+ ((nsTableColGroupFrame *)newFrame)->SetIsSynthetic();
> newFrame->Init(colGroupContent, this, nullptr);
> return (nsTableColGroupFrame *)newFrame;
NS_NewTableColGroupFrame actually returns a nsTableColGroupFrame*
so you can just declare it so (or 'auto') and skip the casts.
As a bonus that should devirtualize the Init call and possibly
inline it.
Attachment #8903746 -
Flags: review?(mats) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8818b55592bf
Remove unused nsTableColGroupType value. r=mats
Comment 5•7 years ago
|
||
bugherder |
Status: ASSIGNED → 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
•