mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1032340: Make Has/SetMutationListeners available on the inner window only. r=smaug
This commit is contained in:
parent
d2738ad8c9
commit
e4cdfadef0
@ -8898,8 +8898,7 @@ nsDocument::MutationEventDispatched(nsINode* aTarget)
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> window;
|
||||
window = do_QueryInterface(GetWindow());
|
||||
nsPIDOMWindow* window = GetInnerWindow();
|
||||
if (window &&
|
||||
!window->HasMutationListeners(NS_EVENT_BITS_MUTATION_SUBTREEMODIFIED)) {
|
||||
mSubtreeModifiedTargets.Clear();
|
||||
|
@ -122,52 +122,28 @@ public:
|
||||
|
||||
bool HasMutationListeners(uint32_t aMutationEventType) const
|
||||
{
|
||||
const nsPIDOMWindow *win;
|
||||
MOZ_ASSERT(IsInnerWindow());
|
||||
|
||||
if (IsOuterWindow()) {
|
||||
win = GetCurrentInnerWindow();
|
||||
if (!mOuterWindow) {
|
||||
NS_ERROR("HasMutationListeners() called on orphan inner window!");
|
||||
|
||||
if (!win) {
|
||||
NS_ERROR("No current inner window available!");
|
||||
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!mOuterWindow) {
|
||||
NS_ERROR("HasMutationListeners() called on orphan inner window!");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
win = this;
|
||||
return false;
|
||||
}
|
||||
|
||||
return (win->mMutationBits & aMutationEventType) != 0;
|
||||
return (mMutationBits & aMutationEventType) != 0;
|
||||
}
|
||||
|
||||
void SetMutationListeners(uint32_t aType)
|
||||
{
|
||||
nsPIDOMWindow *win;
|
||||
MOZ_ASSERT(IsInnerWindow());
|
||||
|
||||
if (IsOuterWindow()) {
|
||||
win = GetCurrentInnerWindow();
|
||||
if (!mOuterWindow) {
|
||||
NS_ERROR("HasMutationListeners() called on orphan inner window!");
|
||||
|
||||
if (!win) {
|
||||
NS_ERROR("No inner window available to set mutation bits on!");
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!mOuterWindow) {
|
||||
NS_ERROR("HasMutationListeners() called on orphan inner window!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
win = this;
|
||||
return;
|
||||
}
|
||||
|
||||
win->mMutationBits |= aType;
|
||||
mMutationBits |= aType;
|
||||
}
|
||||
|
||||
virtual void MaybeUpdateTouchState() {}
|
||||
|
Loading…
Reference in New Issue
Block a user