Closed Bug 1136323 Opened 9 years ago Closed 8 years ago

ComputeInvalidationRegion overrides in nsDisplayItem subclasses should call superclass versions

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kats, Unassigned, Mentored)

Details

There's a fair number of ComputeInvalidationRegion overrides in the various display items, and none of them seem to call the superclass's ComputeInvalidationRegion - instead, they just duplicate the code inline. For example see [1] which does a bounds check, when it could just be reusing the superclass code that does that at [2]. The same pattern occurs in a number of places.

[1] http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsTextFrame.cpp?rev=f4b96c24fece#4628
[2] http://mxr.mozilla.org/mozilla-central/source/layout/base/nsDisplayList.h?rev=5ef8e549a1d9#1131
Matt, is there any reason we're not doing this already?
Flags: needinfo?(matt.woodrow)
Summary: ComputeInvalidationRegion overrides in nsDisplayItem subclasses should superclass versions → ComputeInvalidationRegion overrides in nsDisplayItem subclasses should call superclass versions
No reason, no. Feel free to fix this if it annoys you :)
Flags: needinfo?(matt.woodrow)
Mentor: bugmail.mozilla
@Kartikaya: Is the bug still open? I think the file nsTextFrame.cpp, has been modified since then.
Ah, sorry. It does look like this bug is no longer really relevant. I went through the current ComputeInvalidationRegion functions and none of them seem like they can be folded into the superclasses version. I'm going to close this bug since there's nothing more to do here.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.