summaryrefslogtreecommitdiffstats
path: root/dom/xul
diff options
context:
space:
mode:
Diffstat (limited to 'dom/xul')
-rw-r--r--dom/xul/XULDocument.cpp21
-rw-r--r--dom/xul/XULDocument.h5
-rw-r--r--dom/xul/moz.build1
-rw-r--r--dom/xul/nsXULCommandDispatcher.cpp1
-rw-r--r--dom/xul/nsXULContentSink.cpp1
-rw-r--r--dom/xul/nsXULElement.cpp202
-rw-r--r--dom/xul/nsXULElement.h33
-rw-r--r--dom/xul/nsXULPrototypeCache.cpp1
-rw-r--r--dom/xul/templates/moz.build1
9 files changed, 123 insertions, 143 deletions
diff --git a/dom/xul/XULDocument.cpp b/dom/xul/XULDocument.cpp
index 36481f989..72a62b6e0 100644
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim: set ts=4 sw=4 et 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/. */
@@ -66,7 +65,6 @@
#include "nsContentUtils.h"
#include "nsIParser.h"
#include "nsCharsetSource.h"
-#include "nsIParserService.h"
#include "mozilla/StyleSheetInlines.h"
#include "mozilla/css/Loader.h"
#include "nsIScriptError.h"
@@ -1579,24 +1577,13 @@ XULDocument::GetCommandDispatcher(nsIDOMXULCommandDispatcher** aTracker)
}
Element*
-XULDocument::GetElementById(const nsAString& aId)
+XULDocument::GetRefById(const nsAString& aID)
{
- if (!CheckGetElementByIdArg(aId))
- return nullptr;
-
- nsIdentifierMapEntry *entry = mIdentifierMap.GetEntry(aId);
- if (entry) {
- Element* element = entry->GetIdElement();
- if (element)
- return element;
- }
-
- nsRefMapEntry* refEntry = mRefMap.GetEntry(aId);
- if (refEntry) {
- NS_ASSERTION(refEntry->GetFirstElement(),
- "nsRefMapEntries should have nonempty content lists");
+ if (nsRefMapEntry* refEntry = mRefMap.GetEntry(aID)) {
+ MOZ_ASSERT(refEntry->GetFirstElement());
return refEntry->GetFirstElement();
}
+
return nullptr;
}
diff --git a/dom/xul/XULDocument.h b/dom/xul/XULDocument.h
index e72edfeed..5c4dad42e 100644
--- a/dom/xul/XULDocument.h
+++ b/dom/xul/XULDocument.h
@@ -148,6 +148,7 @@ public:
using nsDocument::CreateElementNS;
NS_FORWARD_NSIDOMDOCUMENT(XMLDocument::)
// And explicitly import the things from nsDocument that we just shadowed
+ using mozilla::dom::DocumentOrShadowRoot::GetElementById;
using nsDocument::GetImplementation;
using nsDocument::GetTitle;
using nsDocument::SetTitle;
@@ -156,8 +157,8 @@ public:
using nsDocument::GetMozFullScreenElement;
using nsIDocument::GetLocation;
- // nsDocument interface overrides
- virtual Element* GetElementById(const nsAString & elementId) override;
+ // Helper for StyleScope::GetElementById.
+ Element* GetRefById(const nsAString & elementId);
// nsIDOMXULDocument interface
NS_DECL_NSIDOMXULDOCUMENT
diff --git a/dom/xul/moz.build b/dom/xul/moz.build
index dad38a2c4..50742f924 100644
--- a/dom/xul/moz.build
+++ b/dom/xul/moz.build
@@ -1,5 +1,4 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
# 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/.
diff --git a/dom/xul/nsXULCommandDispatcher.cpp b/dom/xul/nsXULCommandDispatcher.cpp
index 2d222c240..d8053efdf 100644
--- a/dom/xul/nsXULCommandDispatcher.cpp
+++ b/dom/xul/nsXULCommandDispatcher.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 sw=2 et 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/. */
diff --git a/dom/xul/nsXULContentSink.cpp b/dom/xul/nsXULContentSink.cpp
index 94560e70d..c631e0424 100644
--- a/dom/xul/nsXULContentSink.cpp
+++ b/dom/xul/nsXULContentSink.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim: set ts=8 sts=4 et sw=4 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/. */
diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp
index e351a46eb..2ae03e0b1 100644
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -126,6 +126,8 @@ uint32_t nsXULPrototypeAttribute::gNumCacheSets;
uint32_t nsXULPrototypeAttribute::gNumCacheFills;
#endif
+#define NS_DISPATCH_XUL_COMMAND (1 << 0)
+
class nsXULElementTearoff final : public nsIFrameLoaderOwner
{
~nsXULElementTearoff() {}
@@ -174,33 +176,6 @@ nsXULElement::~nsXULElement()
{
}
-nsXULElement::nsXULSlots::nsXULSlots()
- : nsXULElement::nsDOMSlots()
-{
-}
-
-nsXULElement::nsXULSlots::~nsXULSlots()
-{
- NS_IF_RELEASE(mControllers); // Forces release
- nsCOMPtr<nsIFrameLoader> frameLoader = do_QueryInterface(mFrameLoaderOrOpener);
- if (frameLoader) {
- static_cast<nsFrameLoader*>(frameLoader.get())->Destroy();
- }
-}
-
-void
-nsXULElement::nsXULSlots::Traverse(nsCycleCollectionTraversalCallback &cb)
-{
- NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mFrameLoaderOrOpener");
- cb.NoteXPCOMChild(mFrameLoaderOrOpener);
-}
-
-nsINode::nsSlots*
-nsXULElement::CreateSlots()
-{
- return new nsXULSlots();
-}
-
void
nsXULElement::MaybeUpdatePrivateLifetime()
{
@@ -229,7 +204,7 @@ nsXULElement::Create(nsXULPrototypeElement* aPrototype, mozilla::dom::NodeInfo *
element->SetHasID();
}
if (aPrototype->mHasClassAttribute) {
- element->SetFlags(NODE_MAY_HAVE_CLASS);
+ element->SetMayHaveClass();
}
if (aPrototype->mHasStyleAttribute) {
element->SetMayHaveStyle();
@@ -326,12 +301,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(nsXULElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXULElement,
nsStyledElement)
- {
- nsXULSlots* slots = static_cast<nsXULSlots*>(tmp->GetExistingSlots());
- if (slots) {
- slots->Traverse(cb);
- }
- }
+
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsXULElement,
@@ -390,12 +360,15 @@ nsXULElement::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const
attrValue.SetTo(*originalValue);
}
+ bool oldValueSet;
if (originalName->IsAtom()) {
rv = element->mAttrsAndChildren.SetAndSwapAttr(originalName->Atom(),
- attrValue);
+ attrValue,
+ &oldValueSet);
} else {
rv = element->mAttrsAndChildren.SetAndSwapAttr(originalName->NodeInfo(),
- attrValue);
+ attrValue,
+ &oldValueSet);
}
NS_ENSURE_SUCCESS(rv, rv);
element->AddListenerFor(*originalName, true);
@@ -404,7 +377,7 @@ nsXULElement::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const
element->SetHasID();
}
if (originalName->Equals(nsGkAtoms::_class)) {
- element->SetFlags(NODE_MAY_HAVE_CLASS);
+ element->SetMayHaveClass();
}
if (originalName->Equals(nsGkAtoms::style)) {
element->SetMayHaveStyle();
@@ -895,9 +868,9 @@ nsXULElement::UnbindFromTree(bool aDeep, bool aNullParent)
// mDocument in nsGlobalWindow::SetDocShell, but I'm not
// sure whether that would fix all possible cycles through
// mControllers.)
- nsXULSlots* slots = static_cast<nsXULSlots*>(GetExistingDOMSlots());
+ nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
if (slots) {
- NS_IF_RELEASE(slots->mControllers);
+ slots->mControllers = nullptr;
RefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
if (frameLoader) {
frameLoader->Destroy();
@@ -1037,7 +1010,7 @@ nsXULElement::UnregisterAccessKey(const nsAString& aOldValue)
nsresult
nsXULElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
- nsAttrValueOrString* aValue, bool aNotify)
+ const nsAttrValueOrString* aValue, bool aNotify)
{
if (aNamespaceID == kNameSpaceID_None && aName == nsGkAtoms::accesskey &&
IsInUncomposedDoc()) {
@@ -1083,7 +1056,8 @@ nsXULElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
nsresult
nsXULElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
- const nsAttrValue* aValue, bool aNotify)
+ const nsAttrValue* aValue,
+ const nsAttrValue* aOldValue, bool aNotify)
{
if (aNamespaceID == kNameSpaceID_None) {
if (aValue) {
@@ -1204,7 +1178,7 @@ nsXULElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
}
return nsStyledElement::AfterSetAttr(aNamespaceID, aName,
- aValue, aNotify);
+ aValue, aOldValue, aNotify);
}
bool
@@ -1241,9 +1215,9 @@ nsXULElement::RemoveBroadcaster(const nsAString & broadcasterId)
void
nsXULElement::DestroyContent()
{
- nsXULSlots* slots = static_cast<nsXULSlots*>(GetExistingDOMSlots());
+ nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
if (slots) {
- NS_IF_RELEASE(slots->mControllers);
+ slots->mControllers = nullptr;
RefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
if (frameLoader) {
frameLoader->Destroy();
@@ -1268,20 +1242,68 @@ nsXULElement::List(FILE* out, int32_t aIndent) const
}
#endif
+bool
+nsXULElement::IsEventStoppedFromAnonymousScrollbar(EventMessage aMessage)
+{
+ return (IsRootOfNativeAnonymousSubtree() &&
+ IsAnyOfXULElements(nsGkAtoms::scrollbar, nsGkAtoms::scrollcorner) &&
+ (aMessage == eMouseClick || aMessage == eMouseDoubleClick ||
+ aMessage == eXULCommand || aMessage == eContextMenu ||
+ aMessage == eDragStart));
+}
+
nsresult
-nsXULElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
+nsXULElement::DispatchXULCommand(const EventChainVisitor& aVisitor,
+ nsAutoString& aCommand)
+{
+ // XXX sXBL/XBL2 issue! Owner or current document?
+ nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(GetUncomposedDoc()));
+ NS_ENSURE_STATE(domDoc);
+ nsCOMPtr<nsIDOMElement> commandElt;
+ domDoc->GetElementById(aCommand, getter_AddRefs(commandElt));
+ nsCOMPtr<nsIContent> commandContent(do_QueryInterface(commandElt));
+ if (commandContent) {
+ // Create a new command event to dispatch to the element
+ // pointed to by the command attribute. The new event's
+ // sourceEvent will be the original command event that we're
+ // handling.
+ nsCOMPtr<nsIDOMEvent> domEvent = aVisitor.mDOMEvent;
+ while (domEvent) {
+ Event* event = domEvent->InternalDOMEvent();
+ NS_ENSURE_STATE(!SameCOMIdentity(event->GetOriginalTarget(),
+ commandContent));
+ nsCOMPtr<nsIDOMXULCommandEvent> commandEvent =
+ do_QueryInterface(domEvent);
+ if (commandEvent) {
+ commandEvent->GetSourceEvent(getter_AddRefs(domEvent));
+ } else {
+ domEvent = nullptr;
+ }
+ }
+ WidgetInputEvent* orig = aVisitor.mEvent->AsInputEvent();
+ nsContentUtils::DispatchXULCommand(
+ commandContent,
+ orig->IsTrusted(),
+ aVisitor.mDOMEvent,
+ nullptr,
+ orig->IsControl(),
+ orig->IsAlt(),
+ orig->IsShift(),
+ orig->IsMeta());
+ } else {
+ NS_WARNING("A XUL element is attached to a command that doesn't exist!\n");
+ }
+ return NS_OK;
+}
+
+nsresult
+nsXULElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
{
aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119
- if (IsRootOfNativeAnonymousSubtree() &&
- (IsAnyOfXULElements(nsGkAtoms::scrollbar, nsGkAtoms::scrollcorner)) &&
- (aVisitor.mEvent->mMessage == eMouseClick ||
- aVisitor.mEvent->mMessage == eMouseDoubleClick ||
- aVisitor.mEvent->mMessage == eXULCommand ||
- aVisitor.mEvent->mMessage == eContextMenu ||
- aVisitor.mEvent->mMessage == eDragStart)) {
+ if (IsEventStoppedFromAnonymousScrollbar(aVisitor.mEvent->mMessage)) {
// Don't propagate these events from native anonymous scrollbar.
aVisitor.mCanHandle = true;
- aVisitor.mParentTarget = nullptr;
+ aVisitor.SetParentTarget(nullptr, false);
return NS_OK;
}
if (aVisitor.mEvent->mMessage == eXULCommand &&
@@ -1295,55 +1317,33 @@ nsXULElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
// See if we have a command elt. If so, we execute on the command
// instead of on our content element.
nsAutoString command;
- if (xulEvent && GetAttr(kNameSpaceID_None, nsGkAtoms::command, command) &&
+ if (xulEvent &&
+ GetAttr(kNameSpaceID_None, nsGkAtoms::command, command) &&
!command.IsEmpty()) {
// Stop building the event target chain for the original event.
// We don't want it to propagate to any DOM nodes.
aVisitor.mCanHandle = false;
aVisitor.mAutomaticChromeDispatch = false;
-
- // XXX sXBL/XBL2 issue! Owner or current document?
- nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(GetUncomposedDoc()));
- NS_ENSURE_STATE(domDoc);
- nsCOMPtr<nsIDOMElement> commandElt;
- domDoc->GetElementById(command, getter_AddRefs(commandElt));
- nsCOMPtr<nsIContent> commandContent(do_QueryInterface(commandElt));
- if (commandContent) {
- // Create a new command event to dispatch to the element
- // pointed to by the command attribute. The new event's
- // sourceEvent will be the original command event that we're
- // handling.
- nsCOMPtr<nsIDOMEvent> domEvent = aVisitor.mDOMEvent;
- while (domEvent) {
- Event* event = domEvent->InternalDOMEvent();
- NS_ENSURE_STATE(!SameCOMIdentity(event->GetOriginalTarget(),
- commandContent));
- nsCOMPtr<nsIDOMXULCommandEvent> commandEvent =
- do_QueryInterface(domEvent);
- if (commandEvent) {
- commandEvent->GetSourceEvent(getter_AddRefs(domEvent));
- } else {
- domEvent = nullptr;
- }
- }
-
- WidgetInputEvent* orig = aVisitor.mEvent->AsInputEvent();
- nsContentUtils::DispatchXULCommand(
- commandContent,
- aVisitor.mEvent->IsTrusted(),
- aVisitor.mDOMEvent,
- nullptr,
- orig->IsControl(),
- orig->IsAlt(),
- orig->IsShift(),
- orig->IsMeta());
- } else {
- NS_WARNING("A XUL element is attached to a command that doesn't exist!\n");
- }
+ // Dispatch XUL command in PreHandleEvent to prevent it breaks event
+ // target chain creation
+ aVisitor.mWantsPreHandleEvent = true;
+ aVisitor.mItemFlags |= NS_DISPATCH_XUL_COMMAND;
return NS_OK;
}
}
+ return nsStyledElement::GetEventTargetParent(aVisitor);
+}
+
+nsresult
+nsXULElement::PreHandleEvent(EventChainVisitor& aVisitor)
+{
+ if (aVisitor.mItemFlags & NS_DISPATCH_XUL_COMMAND) {
+ nsAutoString command;
+ GetAttr(kNameSpaceID_None, nsGkAtoms::command, command);
+ MOZ_ASSERT(!command.IsEmpty());
+ return DispatchXULCommand(aVisitor, command);
+ }
return nsStyledElement::PreHandleEvent(aVisitor);
}
@@ -1473,7 +1473,7 @@ nsIControllers*
nsXULElement::GetControllers(ErrorResult& rv)
{
if (! Controllers()) {
- nsDOMSlots* slots = DOMSlots();
+ nsExtendedDOMSlots* slots = ExtendedDOMSlots();
rv = NS_NewXULControllers(nullptr, NS_GET_IID(nsIControllers),
reinterpret_cast<void**>(&slots->mControllers));
@@ -1578,7 +1578,7 @@ nsXULElement::LoadSrc()
RefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
if (!frameLoader) {
// Check if we have an opener we need to be setting
- nsXULSlots* slots = static_cast<nsXULSlots*>(Slots());
+ nsExtendedDOMSlots* slots = ExtendedDOMSlots();
nsCOMPtr<nsPIDOMWindowOuter> opener = do_QueryInterface(slots->mFrameLoaderOrOpener);
if (!opener) {
// If we are a content-primary xul-browser, we want to take the opener property!
@@ -1624,7 +1624,7 @@ nsXULElement::GetFrameLoaderXPCOM(nsIFrameLoader **aFrameLoader)
already_AddRefed<nsFrameLoader>
nsXULElement::GetFrameLoader()
{
- nsXULSlots* slots = static_cast<nsXULSlots*>(GetExistingSlots());
+ nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
if (!slots)
return nullptr;
@@ -1646,7 +1646,7 @@ nsXULElement::GetParentApplication(mozIApplication** aApplication)
void
nsXULElement::PresetOpenerWindow(mozIDOMWindowProxy* aWindow, ErrorResult& aRv)
{
- nsXULSlots* slots = static_cast<nsXULSlots*>(Slots());
+ nsExtendedDOMSlots* slots = ExtendedDOMSlots();
MOZ_ASSERT(!slots->mFrameLoaderOrOpener, "A frameLoader or opener is present when calling PresetOpenerWindow");
slots->mFrameLoaderOrOpener = aWindow;
@@ -1662,7 +1662,7 @@ nsXULElement::SetIsPrerendered()
void
nsXULElement::InternalSetFrameLoader(nsIFrameLoader* aNewFrameLoader)
{
- nsXULSlots* slots = static_cast<nsXULSlots*>(GetExistingDOMSlots());
+ nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
MOZ_ASSERT(slots);
slots->mFrameLoaderOrOpener = aNewFrameLoader;
@@ -1912,12 +1912,14 @@ nsXULElement::MakeHeavyweight(nsXULPrototypeElement* aPrototype)
attrValue.SetTo(protoattr->mValue);
}
+ bool oldValueSet;
// XXX we might wanna have a SetAndTakeAttr that takes an nsAttrName
if (protoattr->mName.IsAtom()) {
- rv = mAttrsAndChildren.SetAndSwapAttr(protoattr->mName.Atom(), attrValue);
+ rv = mAttrsAndChildren.SetAndSwapAttr(protoattr->mName.Atom(),
+ attrValue, &oldValueSet);
} else {
rv = mAttrsAndChildren.SetAndSwapAttr(protoattr->mName.NodeInfo(),
- attrValue);
+ attrValue, &oldValueSet);
}
NS_ENSURE_SUCCESS(rv, rv);
}
diff --git a/dom/xul/nsXULElement.h b/dom/xul/nsXULElement.h
index 164afacd3..a30714145 100644
--- a/dom/xul/nsXULElement.h
+++ b/dom/xul/nsXULElement.h
@@ -355,9 +355,10 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsXULElement, nsStyledElement)
// nsINode
- virtual nsresult PreHandleEvent(
+ virtual nsresult GetEventTargetParent(
mozilla::EventChainPreVisitor& aVisitor) override;
-
+ virtual nsresult PreHandleEvent(
+ mozilla::EventChainVisitor& aVisitor) override;
// nsIContent
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
@@ -609,19 +610,6 @@ protected:
nsresult AddPopupListener(nsIAtom* aName);
- class nsXULSlots : public mozilla::dom::Element::nsDOMSlots
- {
- public:
- nsXULSlots();
- virtual ~nsXULSlots();
-
- void Traverse(nsCycleCollectionTraversalCallback &cb);
-
- nsCOMPtr<nsISupports> mFrameLoaderOrOpener;
- };
-
- virtual nsINode::nsSlots* CreateSlots() override;
-
nsresult LoadSrc();
/**
@@ -636,10 +624,12 @@ protected:
nsresult MakeHeavyweight(nsXULPrototypeElement* aPrototype);
virtual nsresult BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
- nsAttrValueOrString* aValue,
+ const nsAttrValueOrString* aValue,
bool aNotify) override;
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
- const nsAttrValue* aValue, bool aNotify) override;
+ const nsAttrValue* aValue,
+ const nsAttrValue* aOldValue,
+ bool aNotify) override;
virtual void UpdateEditableState(bool aNotify) override;
@@ -677,8 +667,8 @@ protected:
// Internal accessor. This shadows the 'Slots', and returns
// appropriate value.
nsIControllers *Controllers() {
- nsDOMSlots* slots = GetExistingDOMSlots();
- return slots ? slots->mControllers : nullptr;
+ nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
+ return slots ? slots->mControllers.get() : nullptr;
}
void UnregisterAccessKey(const nsAString& aOldValue);
@@ -702,6 +692,11 @@ protected:
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
void MaybeUpdatePrivateLifetime();
+
+ bool IsEventStoppedFromAnonymousScrollbar(mozilla::EventMessage aMessage);
+
+ nsresult DispatchXULCommand(const mozilla::EventChainVisitor& aVisitor,
+ nsAutoString& aCommand);
};
#endif // nsXULElement_h__
diff --git a/dom/xul/nsXULPrototypeCache.cpp b/dom/xul/nsXULPrototypeCache.cpp
index 2c3454860..a73e2f8f0 100644
--- a/dom/xul/nsXULPrototypeCache.cpp
+++ b/dom/xul/nsXULPrototypeCache.cpp
@@ -1,5 +1,4 @@
/* -*- 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/. */
diff --git a/dom/xul/templates/moz.build b/dom/xul/templates/moz.build
index 780f01941..54811df44 100644
--- a/dom/xul/templates/moz.build
+++ b/dom/xul/templates/moz.build
@@ -1,5 +1,4 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
# 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/.