Provide a const GetClosestFrameOfType() overload to ensure const correctness
Categories
(Core :: Layout, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox145 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(1 file)
nsLayoutUtils::GetClosestFrameOfType() doesn't modify the parameters, and it would be nice for its parameter to accept const nsIFrame* for aFrame and aStopBy, and to return const nsIFrame*.
However, changing it directly would require massive API updates (sprinkling const across many callers, especially in SVG code). A less disruptive
approach is to add a const overload, similar to nsLayoutUtils::GetStyleFrame(). That avoids the needs to const_cast for callers already having const nsIFrame*, e.g. https://phabricator.services.mozilla.com/D265113.
| Assignee | ||
Comment 1•2 months ago
|
||
Make GetClosestFrameOfType() const and add back a non-const wrapper for
existing callers. Also make aStopAt const (it's currently unused, but seems
useful to keep), which improves const-correctness for future use.
Updated•2 months ago
|
Comment 3•2 months ago
|
||
| bugherder | ||
Updated•1 month ago
|
Description
•