Closed Bug 1323356 Opened 8 years ago Closed 8 years ago

XBL bindings are not uninstalled when removed by restyle

Categories

(Core :: XBL, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 119078

People

(Reporter: bholley, Unassigned)

Details

I noticed this when looking at the code for stylo.

Basically, the code here:
http://searchfox.org/mozilla-central/rev/594937fec2e2fc45fa9308ba2fb964816631f017/layout/base/nsCSSFrameConstructor.cpp#9338
and here:
http://searchfox.org/mozilla-central/rev/594937fec2e2fc45fa9308ba2fb964816631f017/layout/base/nsCSSFrameConstructor.cpp#5720

only gets triggered when mBinding is non-null. This handles the noBinding->binding case, as well as the bindingX->bindingY case, but not the binding->noBinding case. I tested it, and the behaviors matches what we see in the code. To remove the binding, you need to replace it with something that parses as a URL (even an empty one), so that we end up in nsXBLService::LoadBindings, and consequently FlushStyleBindings.

I'm sort of surprised that nobody has noticed or complained about this before, but I certainly don't have any reason to fix it. If you do fix this, make sure to align it with the servo traversal as discussed in bug 1294572.
> I'm sort of surprised that nobody has noticed or complained about this before

Oh, people have.  ;)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
(In reply to Boris Zbarsky [:bz] (still a bit busy) from comment #1)
> > I'm sort of surprised that nobody has noticed or complained about this before
> 
> Oh, people have.  ;)

That's what I get for searching for open bugs only. ;-)
You need to log in before you can comment on or make changes to this bug.