Closed Bug 916972 Opened 6 years ago Closed Last year

NS_FRAME_SPLITTABLE_NON_RECTANGULAR is unused (which means GetSplittableType could be consolidated into IsFrameOfType?)

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: dholbert, Assigned: TYLin)

References

Details

Attachments

(2 files)

NS_FRAME_SPLITTABLE_NON_RECTANGULAR is currently unused, in that we don't have any code that cares about it specifically.

This MXR search just shows two hits for the token -- one for the nsBlockFrame::GetSplittableType return value, and one for the #define...
http://mxr.mozilla.org/mozilla-central/search?string=NS_FRAME_SPLITTABLE_NON_RECTANGULAR
...but no hits for anybody checking for this value.

Unless we have plans to add code that requires NS_FRAME_SPLITTABLE_NON_RECTANGULAR, perhaps we should just merge it with NS_FRAME_SPLITTABLE?  Even better, perhaps we can remove GetSplittableType and just replace it with a single IsFrameOfType() bit?



(side-note: we actually only ever call GetSplittableType in one place, which is in a assertion that's somewhat redundant anyway, given a NS_RUNTIMEABORT slightly later in the code that will basically fire anytime the assertion would fire.)
Summary: NS_FRAME_SPLITTABLE_NON_RECTANGULAR is unused → NS_FRAME_SPLITTABLE_NON_RECTANGULAR is unused (which means GetSplittableType could be consolidated into IsFrameOfType?)
[historical note: the last check for NS_FRAME_SPLITTABLE_NON_RECTANGULAR was removed here:
  https://hg.mozilla.org/mozilla-central/rev/a19dfdbf7fee#l3.16
]
Currently, GetSplittableType() is called only in
nsCSSFrameConstructor::CreateContinuingFrame(). The splittable concrete frames
should inherit from nsSplittableFrame, and must explicitly create continuing
frame in CreateContinuingFrame(). Thus, no need to maintain GetSplittableType().
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/09df5390e2fb
Eliminate nsIFrame::GetSplittableType() completely. r=mats,dholbert
https://hg.mozilla.org/integration/autoland/rev/723af5c4a100
Remove unused nsSpread and carried-out margin flags in nsIFrame.h. r=dholbert
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/09df5390e2fb
https://hg.mozilla.org/mozilla-central/rev/723af5c4a100
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.