Closed Bug 1571249 Opened 6 years ago Closed 6 years ago

remove BCTableCell as a distinct LayoutFrameType

Categories

(Core :: Layout: Tables, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

Attachments

(2 files)

I'd like to remove BCTableCell as a distinct LayoutFrameType. I did this as part of work on bug 1547759, but since (a) I'd like to keep the stuff on that bug not too huge and (b) this change probably fixes some existing bugs on its own, I'd like to move it to a separate bug.

OS: Unspecified → All
Hardware: Unspecified → All

Try runs for this are linked in bug 1547759.

There are two existing callers of IsTableCellFrame that both appear to want to
include BCTableCell frames, but don't. A patch in bug 1547759 will add a
third that wants the same.

The existing users of frame types all have to work around it being a distinct
type, and none appear to want the distinction. This removes that complexity.

If any callers want to make the distinction, they could implement QueryFrame
for BCTableCellFrame and use it. (It's not implemented now, though!)

In a little more detail, prior to this patch (in my debug build, at least):

  • nsQueryFrame::ClassID::nsMathMLmtdFrame_id was 46
  • nsQueryFrame::ClassID::nsTableCellFrame_id was 47
  • nsQueryFrame::ClassID::nsBCTableCellFrame_id was 65
    and entries 46 and 47 in sLayoutFrameTypes were
    mozilla::LayoutFrameType::TableCell while entry 65 was
    mozilla::LayoutFrameType::BCTableCell.

With this patch:

  • nsQueryFrame::ClassID::nsBCTableCellFrame_id is 40
  • nsQueryFrame::ClassID::nsMathMLmtdFrame_id is 41
  • nsQueryFrame::ClassID::nsTableCellFrame_id is 42
    and entries 40 through 42 in sLayoutFrameTypes are
    mozilla::LayoutFrameType::TableCell.

It was made pointless by the previous patch.

This replaces callers that had a frame type for another reason with the
frame type check that IsTableCell did, and callers that needed to call
Type() with an IsTableCellFrame call.

Pushed by dbaron@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/44bfb4911daf Remove BCTableCell as a distinct frame type. r=TYLin https://hg.mozilla.org/integration/autoland/rev/6fd3876db7c6 Remove the IsTableCell() function. r=TYLin
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: