mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
3d6d2d9586
We never removed the event listeners (the code was there, lol, but the function that was supposed to call into the tooltip listener returned NS_ERROR_NOT_IMPLEMENTED instead). Furthermore, we added an event listener each time we reframed an element, which is insane. Basically, each time an element with tooltip / tooltiptext gets its frame tree reconstructed, we add the even listener, again, and we never free it. Xidorn pointed out that this is not such a huge deal because we deduplicate event listeners per spec, but still... Move the code from the RestyleManager and the frame constructor to AfterSetAttr / BindToTree / UnbindFromTree in nsXULElement to hopefully make this saner. MozReview-Commit-ID: 6BQbIQJ87qt
38 lines
903 B
C++
38 lines
903 B
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
#ifndef nsIRootBox_h___
|
|
#define nsIRootBox_h___
|
|
|
|
#include "nsQueryFrame.h"
|
|
class nsPopupSetFrame;
|
|
class nsIPresShell;
|
|
class nsIContent;
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
class Element;
|
|
}
|
|
}
|
|
|
|
class nsIRootBox
|
|
{
|
|
public:
|
|
NS_DECL_QUERYFRAME_TARGET(nsIRootBox)
|
|
|
|
virtual nsPopupSetFrame* GetPopupSetFrame() = 0;
|
|
virtual void SetPopupSetFrame(nsPopupSetFrame* aPopupSet) = 0;
|
|
|
|
virtual mozilla::dom::Element* GetDefaultTooltip() = 0;
|
|
virtual void SetDefaultTooltip(mozilla::dom::Element* aTooltip) = 0;
|
|
|
|
static nsIRootBox* GetRootBox(nsIPresShell* aShell);
|
|
};
|
|
|
|
#endif
|
|
|