summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-10-10 23:09:26 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-01 14:47:16 +0200
commitddaee7c1be914cc28a28cbe27e5922215b3b2e6f (patch)
treecb8930a9ba1ed0ef574b7c2be9035b1a51201902 /dom
parentc030a50228349fa1b2c0b4fbc2e83752324dd4d7 (diff)
downloaduxp-ddaee7c1be914cc28a28cbe27e5922215b3b2e6f.tar.gz
Issue #1830 - Remove --disable-xul config and conditionals.
Diffstat (limited to 'dom')
-rw-r--r--dom/animation/EffectCompositor.cpp2
-rw-r--r--dom/animation/EffectCompositor.h2
-rw-r--r--dom/base/Element.cpp12
-rw-r--r--dom/base/FragmentOrElement.cpp4
-rw-r--r--dom/base/nsCCUncollectableMarker.cpp8
-rw-r--r--dom/base/nsContentCreatorFunctions.h2
-rw-r--r--dom/base/nsContentUtils.cpp2
-rw-r--r--dom/base/nsDOMClassInfo.cpp14
-rw-r--r--dom/base/nsDOMClassInfoClasses.h7
-rw-r--r--dom/base/nsDocument.cpp7
-rw-r--r--dom/base/nsFocusManager.cpp6
-rw-r--r--dom/base/nsFrameLoader.cpp4
-rw-r--r--dom/base/nsGkAtomList.h2
-rw-r--r--dom/base/nsGlobalWindow.cpp14
-rw-r--r--dom/base/nsNameSpaceManager.cpp4
-rw-r--r--dom/base/nsNodeUtils.cpp4
-rw-r--r--dom/base/nsWindowRoot.cpp5
-rw-r--r--dom/events/EventStateManager.cpp6
-rw-r--r--dom/xbl/nsXBLBinding.cpp8
-rw-r--r--dom/xbl/nsXBLContentSink.cpp8
-rw-r--r--dom/xbl/nsXBLContentSink.h2
-rw-r--r--dom/xbl/nsXBLPrototypeBinding.cpp13
-rw-r--r--dom/xbl/nsXBLService.cpp8
-rw-r--r--dom/xul/moz.build39
24 files changed, 23 insertions, 160 deletions
diff --git a/dom/animation/EffectCompositor.cpp b/dom/animation/EffectCompositor.cpp
index 30df27a012..83369a8ddc 100644
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -886,13 +886,11 @@ EffectCompositor::AnimationStyleRuleProcessor::RulesMatching(
{
}
-#ifdef MOZ_XUL
void
EffectCompositor::AnimationStyleRuleProcessor::RulesMatching(
XULTreeRuleProcessorData* aData)
{
}
-#endif
size_t
EffectCompositor::AnimationStyleRuleProcessor::SizeOfExcludingThis(
diff --git a/dom/animation/EffectCompositor.h b/dom/animation/EffectCompositor.h
index 9410264760..98d0c73f31 100644
--- a/dom/animation/EffectCompositor.h
+++ b/dom/animation/EffectCompositor.h
@@ -281,9 +281,7 @@ private:
void RulesMatching(ElementRuleProcessorData* aData) override;
void RulesMatching(PseudoElementRuleProcessorData* aData) override;
void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf)
const MOZ_MUST_OVERRIDE override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf)
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
index 9ba065238d..2784c17018 100644
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -71,9 +71,7 @@
#include "nsAttrValueOrString.h"
#include "nsAttrValueInlines.h"
#include "nsCSSPseudoElements.h"
-#ifdef MOZ_XUL
#include "nsXULElement.h"
-#endif /* MOZ_XUL */
#include "nsSVGElement.h"
#include "nsFrameSelection.h"
#ifdef DEBUG
@@ -112,9 +110,7 @@
#include "nsRuleProcessorData.h"
#include "nsTextNode.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
-#endif /* MOZ_XUL */
#include "nsCycleCollectionParticipant.h"
#include "nsCCUncollectableMarker.h"
@@ -1545,15 +1541,11 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
aBindingParent == aParent->GetBindingParent(),
"We should be passed the right binding parent");
-#ifdef MOZ_XUL
// First set the binding parent
nsXULElement* xulElem = nsXULElement::FromContent(this);
if (xulElem) {
xulElem->SetXULBindingParent(aBindingParent);
- }
- else
-#endif
- {
+ } else {
if (aBindingParent) {
nsExtendedDOMSlots* slots = ExtendedDOMSlots();
@@ -1971,13 +1963,11 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
UnsetFlags(NODE_FORCE_XBL_BINDINGS);
bool clearBindingParent = true;
-#ifdef MOZ_XUL
nsXULElement* xulElem = nsXULElement::FromContent(this);
if (xulElem) {
xulElem->SetXULBindingParent(nullptr);
clearBindingParent = false;
}
-#endif
nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
if (slots) {
diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
index 70ecd3e562..e70236ea0c 100644
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -61,9 +61,7 @@
#include "nsNodeUtils.h"
#include "nsDocument.h"
#include "nsAttrValueOrString.h"
-#ifdef MOZ_XUL
#include "nsXULElement.h"
-#endif /* MOZ_XUL */
#include "nsFrameSelection.h"
#ifdef DEBUG
#include "nsRange.h"
@@ -103,9 +101,7 @@
#include "nsTextNode.h"
#include "mozilla/dom/NodeListBinding.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
-#endif /* MOZ_XUL */
#include "nsCCUncollectableMarker.h"
diff --git a/dom/base/nsCCUncollectableMarker.cpp b/dom/base/nsCCUncollectableMarker.cpp
index 973f36dbde..8a7c939aa7 100644
--- a/dom/base/nsCCUncollectableMarker.cpp
+++ b/dom/base/nsCCUncollectableMarker.cpp
@@ -45,9 +45,7 @@ static bool sInited = 0;
// before we first CC benignly violate the black-gray invariant, due
// to dom::TraceBlackJS().
uint32_t nsCCUncollectableMarker::sGeneration = 1;
-#ifdef MOZ_XUL
#include "nsXULPrototypeCache.h"
-#endif
NS_IMPL_ISUPPORTS(nsCCUncollectableMarker, nsIObserver)
@@ -414,12 +412,10 @@ nsCCUncollectableMarker::Observe(nsISupports* aSubject, const char* aTopic,
}
}
-#ifdef MOZ_XUL
nsXULPrototypeCache* xulCache = nsXULPrototypeCache::GetInstance();
if (xulCache) {
xulCache->MarkInCCGeneration(sGeneration);
}
-#endif
enum ForgetSkippableCleanupState
{
@@ -480,7 +476,6 @@ nsCCUncollectableMarker::Observe(nsISupports* aSubject, const char* aTopic,
void
mozilla::dom::TraceBlackJS(JSTracer* aTrc, uint32_t aGCNumber, bool aIsShutdownGC)
{
-#ifdef MOZ_XUL
// Mark the scripts held in the XULPrototypeCache. This is required to keep
// the JS script in the cache live across GC.
nsXULPrototypeCache* cache = nsXULPrototypeCache::MaybeGetInstance();
@@ -491,7 +486,6 @@ mozilla::dom::TraceBlackJS(JSTracer* aTrc, uint32_t aGCNumber, bool aIsShutdownG
cache->MarkInGC(aTrc);
}
}
-#endif
if (!nsCCUncollectableMarker::sGeneration) {
return;
@@ -542,13 +536,11 @@ mozilla::dom::TraceBlackJS(JSTracer* aTrc, uint32_t aGCNumber, bool aIsShutdownG
}
}
-#ifdef MOZ_XUL
nsIDocument* doc = window->GetExtantDoc();
if (doc && doc->IsXULDocument()) {
XULDocument* xulDoc = static_cast<XULDocument*>(doc);
xulDoc->TraceProtos(aTrc, aGCNumber);
}
-#endif
}
}
}
diff --git a/dom/base/nsContentCreatorFunctions.h b/dom/base/nsContentCreatorFunctions.h
index 87e5ce736c..e2c6bf9f07 100644
--- a/dom/base/nsContentCreatorFunctions.h
+++ b/dom/base/nsContentCreatorFunctions.h
@@ -55,7 +55,6 @@ nsresult
NS_NewMathMLElement(mozilla::dom::Element** aResult,
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
-#ifdef MOZ_XUL
nsresult
NS_NewXULElement(mozilla::dom::Element** aResult,
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
@@ -63,7 +62,6 @@ NS_NewXULElement(mozilla::dom::Element** aResult,
void
NS_TrustedNewXULElement(nsIContent** aResult,
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
-#endif
nsresult
NS_NewSVGElement(mozilla::dom::Element** aResult,
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
index e88e31bd9d..657c0c0fb2 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -5430,14 +5430,12 @@ nsContentUtils::ProcessViewportInfo(nsIDocument *aDocument,
void
nsContentUtils::HidePopupsInDocument(nsIDocument* aDocument)
{
-#ifdef MOZ_XUL
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
if (pm && aDocument) {
nsCOMPtr<nsIDocShellTreeItem> docShellToHide = aDocument->GetDocShell();
if (docShellToHide)
pm->HidePopupsInDocShell(docShellToHide);
}
-#endif
}
/* static */
diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp
index 5d8b0ff065..7cc92a1b74 100644
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -84,12 +84,10 @@
#include "nsIDOMCSSStyleRule.h"
#include "nsIDOMXULCommandDispatcher.h"
#include "nsIControllers.h"
-#ifdef MOZ_XUL
#include "nsITreeSelection.h"
#include "nsITreeContentView.h"
#include "nsITreeView.h"
#include "nsIXULTemplateBuilder.h"
-#endif
#include "nsIEventListenerService.h"
#include "nsIMessageManager.h"
@@ -199,26 +197,20 @@ static nsDOMClassInfoData sClassInfoData[] = {
DOM_DEFAULT_SCRIPTABLE_FLAGS)
// XUL classes
-#ifdef MOZ_XUL
NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(XULCommandDispatcher, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
-#endif
NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(XULControllers, nsNonDOMObjectSH,
DEFAULT_SCRIPTABLE_FLAGS)
-#ifdef MOZ_XUL
NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(TreeSelection, nsDOMGenericSH,
DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(TreeContentView, nsDOMGenericSH,
DEFAULT_SCRIPTABLE_FLAGS)
-#endif
-#ifdef MOZ_XUL
NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(XULTemplateBuilder, nsDOMGenericSH,
DEFAULT_SCRIPTABLE_FLAGS)
NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(XULTreeBuilder, nsDOMGenericSH,
DEFAULT_SCRIPTABLE_FLAGS)
-#endif
NS_DEFINE_CLASSINFO_DATA(CSSMozDocumentRule, nsDOMGenericSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
@@ -527,17 +519,14 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRule)
DOM_CLASSINFO_MAP_END
-#ifdef MOZ_XUL
DOM_CLASSINFO_MAP_BEGIN(XULCommandDispatcher, nsIDOMXULCommandDispatcher)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandDispatcher)
DOM_CLASSINFO_MAP_END
-#endif
DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULControllers, nsIControllers)
DOM_CLASSINFO_MAP_ENTRY(nsIControllers)
DOM_CLASSINFO_MAP_END
-#ifdef MOZ_XUL
DOM_CLASSINFO_MAP_BEGIN(TreeSelection, nsITreeSelection)
DOM_CLASSINFO_MAP_ENTRY(nsITreeSelection)
DOM_CLASSINFO_MAP_END
@@ -546,9 +535,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsITreeContentView)
DOM_CLASSINFO_MAP_ENTRY(nsITreeView)
DOM_CLASSINFO_MAP_END
-#endif
-#ifdef MOZ_XUL
DOM_CLASSINFO_MAP_BEGIN(XULTemplateBuilder, nsIXULTemplateBuilder)
DOM_CLASSINFO_MAP_ENTRY(nsIXULTemplateBuilder)
DOM_CLASSINFO_MAP_END
@@ -558,7 +545,6 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_ENTRY(nsIXULTemplateBuilder)
DOM_CLASSINFO_MAP_ENTRY(nsITreeView)
DOM_CLASSINFO_MAP_END
-#endif
DOM_CLASSINFO_MAP_BEGIN(CSSMozDocumentRule, nsIDOMCSSMozDocumentRule)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMozDocumentRule)
diff --git a/dom/base/nsDOMClassInfoClasses.h b/dom/base/nsDOMClassInfoClasses.h
index e381fb8f9b..583f76e97e 100644
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -14,19 +14,12 @@ DOMCI_CLASS(CSSMediaRule)
DOMCI_CLASS(CSSNameSpaceRule)
// XUL classes
-#ifdef MOZ_XUL
DOMCI_CLASS(XULCommandDispatcher)
-#endif
DOMCI_CLASS(XULControllers)
-#ifdef MOZ_XUL
DOMCI_CLASS(TreeSelection)
DOMCI_CLASS(TreeContentView)
-#endif
-
-#ifdef MOZ_XUL
DOMCI_CLASS(XULTemplateBuilder)
DOMCI_CLASS(XULTreeBuilder)
-#endif
DOMCI_CLASS(CSSMozDocumentRule)
DOMCI_CLASS(CSSSupportsRule)
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
index 1c3e7a421f..c00a41addf 100644
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -6348,12 +6348,9 @@ nsDocument::GetTitle(nsString& aTitle)
nsAutoString tmp;
-#ifdef MOZ_XUL
if (rootElement->IsXULElement()) {
rootElement->GetAttr(kNameSpaceID_None, nsGkAtoms::title, tmp);
- } else
-#endif
- {
+ } else {
Element* title = GetTitleElement();
if (!title) {
return;
@@ -6373,12 +6370,10 @@ nsDocument::SetTitle(const nsAString& aTitle)
return NS_OK;
}
-#ifdef MOZ_XUL
if (rootElement->IsXULElement()) {
return rootElement->SetAttr(kNameSpaceID_None, nsGkAtoms::title,
aTitle, true);
}
-#endif
// Batch updates so that mutation events don't change "the title
// element" under us
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
index bfd2e334ea..0c12103fba 100644
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -57,10 +57,8 @@
#include "mozilla/Unused.h"
#include <algorithm>
-#ifdef MOZ_XUL
#include "nsIDOMXULTextboxElement.h"
#include "nsIDOMXULMenuListElement.h"
-#endif
#ifdef ACCESSIBILITY
#include "nsAccessibilityService.h"
@@ -328,7 +326,6 @@ nsFocusManager::GetRedirectedFocus(nsIContent* aContent)
}
}
-#ifdef MOZ_XUL
if (aContent->IsXULElement()) {
nsCOMPtr<nsIDOMNode> inputField;
@@ -360,7 +357,6 @@ nsFocusManager::GetRedirectedFocus(nsIContent* aContent)
return retval;
}
}
-#endif
return nullptr;
}
@@ -2713,7 +2709,6 @@ nsFocusManager::DetermineElementToMoveFocus(nsPIDOMWindowOuter* aWindow,
}
}
else {
-#ifdef MOZ_XUL
if (aType != MOVEFOCUS_CARET) {
// if there is no focus, yet a panel is open, focus the first item in
// the panel
@@ -2721,7 +2716,6 @@ nsFocusManager::DetermineElementToMoveFocus(nsPIDOMWindowOuter* aWindow,
if (pm)
popupFrame = pm->GetTopPopup(ePopupTypePanel);
}
-#endif
if (popupFrame) {
// When there is a popup open, and no starting content, start the search
// at the topmost popup.
diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp
index b4397d0630..58b7a93361 100644
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -102,9 +102,7 @@
#include "nsPrincipal.h"
-#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
-#endif
#ifdef NS_PRINTING
#include "mozilla/embedding/printingui/PrintingParent.h"
@@ -3156,14 +3154,12 @@ nsFrameLoader::AttributeChanged(nsIDocument* aDocument,
bool is_primary = value.LowerCaseEqualsLiteral("content-primary");
-#ifdef MOZ_XUL
// when a content panel is no longer primary, hide any open popups it may have
if (!is_primary) {
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
if (pm)
pm->HidePopupsInDocShell(mDocShell);
}
-#endif
parentTreeOwner->ContentShellRemoved(mDocShell);
if (value.LowerCaseEqualsLiteral("content") ||
diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h
index bd05835980..e5008c420b 100644
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -2045,9 +2045,7 @@ GK_ATOM(tableRowFrame, "TableRowFrame")
GK_ATOM(textInputFrame,"TextInputFrame")
GK_ATOM(textFrame, "TextFrame")
GK_ATOM(viewportFrame, "ViewportFrame")
-#ifdef MOZ_XUL
GK_ATOM(XULLabelFrame, "XULLabelFrame")
-#endif
GK_ATOM(svgAFrame, "SVGAFrame")
GK_ATOM(svgClipPathFrame, "SVGClipPathFrame")
GK_ATOM(svgDefsFrame, "SVGDefsFrame")
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
index fa2f4ad798..2b8ace3e0c 100644
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -147,10 +147,8 @@
#include "nsIXULWindow.h"
#include "nsITimedChannel.h"
#include "nsServiceManagerUtils.h"
-#ifdef MOZ_XUL
#include "nsIDOMXULControlElement.h"
#include "nsMenuPopupFrame.h"
-#endif
#include "mozilla/dom/CustomEvent.h"
#include "nsIJARChannel.h"
#include "nsIScreenManager.h"
@@ -6153,12 +6151,10 @@ nsGlobalWindow::CheckSecurityWidthAndHeight(int32_t* aWidth, int32_t* aHeight, b
{
MOZ_ASSERT(IsOuterWindow());
-#ifdef MOZ_XUL
if (!aCallerIsChrome) {
// if attempting to resize the window, hide any open popups
nsContentUtils::HidePopupsInDocument(mDoc);
}
-#endif
// This one is easy. Just ensure the variable is greater than 100;
if ((aWidth && *aWidth < 100) || (aHeight && *aHeight < 100)) {
@@ -6222,10 +6218,8 @@ nsGlobalWindow::CheckSecurityLeftAndTop(int32_t* aLeft, int32_t* aTop, bool aCal
// Check security state for use in determing window dimensions
if (!aCallerIsChrome) {
-#ifdef MOZ_XUL
// if attempting to move the window, hide any open popups
nsContentUtils::HidePopupsInDocument(mDoc);
-#endif
if (nsGlobalWindow* rootWindow = nsGlobalWindow::Cast(GetPrivateRoot())) {
rootWindow->FlushPendingNotifications(Flush_Layout);
@@ -14095,7 +14089,6 @@ nsGlobalWindow::BeginWindowMove(Event& aMouseDownEvent, Element* aPanel,
nsCOMPtr<nsIWidget> widget;
// if a panel was supplied, use its widget instead.
-#ifdef MOZ_XUL
if (aPanel) {
nsIFrame* frame = aPanel->GetPrimaryFrame();
if (!frame || frame->GetType() != nsGkAtoms::menuPopupFrame) {
@@ -14105,11 +14098,8 @@ nsGlobalWindow::BeginWindowMove(Event& aMouseDownEvent, Element* aPanel,
widget = (static_cast<nsMenuPopupFrame*>(frame))->GetWidget();
}
else {
-#endif
widget = GetMainWidget();
-#ifdef MOZ_XUL
}
-#endif
if (!widget) {
return;
@@ -14280,7 +14270,6 @@ nsGlobalWindow::NotifyDefaultButtonLoaded(Element& aDefaultButton,
ErrorResult& aError)
{
MOZ_ASSERT(IsInnerWindow());
-#ifdef MOZ_XUL
// Don't snap to a disabled button.
nsCOMPtr<nsIDOMXULControlElement> xulControl =
do_QueryInterface(&aDefaultButton);
@@ -14319,9 +14308,6 @@ nsGlobalWindow::NotifyDefaultButtonLoaded(Element& aDefaultButton,
if (NS_FAILED(rv) && rv != NS_ERROR_NOT_IMPLEMENTED) {
aError.Throw(rv);
}
-#else
- aError.Throw(NS_ERROR_NOT_IMPLEMENTED);
-#endif
}
NS_IMETHODIMP
diff --git a/dom/base/nsNameSpaceManager.cpp b/dom/base/nsNameSpaceManager.cpp
index 6c660e7008..4891220f6a 100644
--- a/dom/base/nsNameSpaceManager.cpp
+++ b/dom/base/nsNameSpaceManager.cpp
@@ -175,11 +175,9 @@ NS_NewElement(Element** aResult,
if (ns == kNameSpaceID_XHTML) {
return NS_NewHTMLElement(aResult, ni.forget(), aFromParser, aIs);
}
-#ifdef MOZ_XUL
if (ns == kNameSpaceID_XUL) {
return NS_NewXULElement(aResult, ni.forget());
}
-#endif
if (ns == kNameSpaceID_MathML) {
// If the mathml.disabled pref. is true, convert all MathML nodes into
// disabled MathML nodes by swapping the namespace.
@@ -210,9 +208,7 @@ bool
nsNameSpaceManager::HasElementCreator(int32_t aNameSpaceID)
{
return aNameSpaceID == kNameSpaceID_XHTML ||
-#ifdef MOZ_XUL
aNameSpaceID == kNameSpaceID_XUL ||
-#endif
aNameSpaceID == kNameSpaceID_MathML ||
aNameSpaceID == kNameSpaceID_SVG ||
false;
diff --git a/dom/base/nsNodeUtils.cpp b/dom/base/nsNodeUtils.cpp
index 7d31358487..cd60eb2806 100644
--- a/dom/base/nsNodeUtils.cpp
+++ b/dom/base/nsNodeUtils.cpp
@@ -18,9 +18,7 @@
#include "nsCOMArray.h"
#include "nsPIDOMWindow.h"
#include "nsDocument.h"
-#ifdef MOZ_XUL
#include "nsXULElement.h"
-#endif
#include "nsBindingManager.h"
#include "nsGenericHTMLElement.h"
#include "mozilla/AnimationTarget.h"
@@ -684,13 +682,11 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
// Note: Make sure to do this witchery _after_ we've done any deep
// cloning, so kids of the new node aren't confused about whether they're
// in a document.
-#ifdef MOZ_XUL
if (aClone && !aParent && aNode->IsXULElement()) {
if (!aNode->OwnerDoc()->IsLoadedAsInteractiveData()) {
clone->SetFlags(NODE_FORCE_XBL_BINDINGS);
}
}
-#endif
clone.forget(aResult);
diff --git a/dom/base/nsWindowRoot.cpp b/dom/base/nsWindowRoot.cpp
index 30360eb1f4..38348b46c2 100644
--- a/dom/base/nsWindowRoot.cpp
+++ b/dom/base/nsWindowRoot.cpp
@@ -24,10 +24,7 @@
#include "xpcpublic.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/dom/TabParent.h"
-
-#ifdef MOZ_XUL
#include "nsIDOMXULElement.h"
-#endif
using namespace mozilla;
using namespace mozilla::dom;
@@ -223,11 +220,9 @@ nsWindowRoot::GetControllers(nsIControllers** aResult)
nsIContent* focusedContent =
nsFocusManager::GetFocusedDescendant(mWindow, true, getter_AddRefs(focusedWindow));
if (focusedContent) {
-#ifdef MOZ_XUL
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(focusedContent));
if (xulElement)
return xulElement->GetControllers(aResult);
-#endif
nsCOMPtr<nsIDOMHTMLTextAreaElement> htmlTextArea =
do_QueryInterface(focusedContent);
diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp
index 87c4827fab..86201bdc30 100644
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -80,9 +80,7 @@
#include "nsIDragSession.h"
#include "mozilla/dom/DataTransfer.h"
#include "nsContentAreaDragDrop.h"
-#ifdef MOZ_XUL
#include "nsTreeBodyFrame.h"
-#endif
#include "nsIController.h"
#include "nsICommandParams.h"
#include "mozilla/Services.h"
@@ -2017,7 +2015,6 @@ EventStateManager::DoDefaultDragStart(nsPresContext* aPresContext,
// tree to ensure that the drag feedback gets clipped to those
// rows. For other content, region should be null.
nsCOMPtr<nsIScriptableRegion> region;
-#ifdef MOZ_XUL
if (dragTarget && !dragImage) {
if (dragTarget->NodeInfo()->Equals(nsGkAtoms::treechildren,
kNameSpaceID_XUL)) {
@@ -2028,7 +2025,6 @@ EventStateManager::DoDefaultDragStart(nsPresContext* aPresContext,
}
}
}
-#endif
dragService->InvokeDragSessionWithImage(dragTarget->AsDOMNode(), transArray,
region, action,
@@ -2768,7 +2764,6 @@ EventStateManager::DecideGestureEvent(WidgetGestureNotifyEvent* aEvent,
break;
}
-#ifdef MOZ_XUL
// Special check for trees
nsTreeBodyFrame* treeFrame = do_QueryFrame(current);
if (treeFrame) {
@@ -2780,7 +2775,6 @@ EventStateManager::DecideGestureEvent(WidgetGestureNotifyEvent* aEvent,
}
break;
}
-#endif
nsIScrollableFrame* scrollableFrame = do_QueryFrame(current);
if (scrollableFrame) {
diff --git a/dom/xbl/nsXBLBinding.cpp b/dom/xbl/nsXBLBinding.cpp
index b7e0d9094c..f0b4ff5666 100644
--- a/dom/xbl/nsXBLBinding.cpp
+++ b/dom/xbl/nsXBLBinding.cpp
@@ -18,9 +18,7 @@
#include "nsIDocument.h"
#include "nsContentUtils.h"
#include "ChildIterator.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
-#endif
#include "nsIXMLContentSink.h"
#include "nsContentCID.h"
#include "mozilla/dom/XMLDocument.h"
@@ -227,14 +225,12 @@ nsXBLBinding::InstallAnonymousContent(nsIContent* aAnonParent, nsIContent* aElem
child->SetFlags(NODE_IS_ANONYMOUS_ROOT);
-#ifdef MOZ_XUL
// To make XUL templates work (and other goodies that happen when
// an element is added to a XUL document), we need to notify the
// XUL document using its special API.
nsCOMPtr<nsIXULDocument> xuldoc(do_QueryInterface(doc));
if (xuldoc)
xuldoc->AddSubtreeToDocument(child);
-#endif
}
}
@@ -245,19 +241,15 @@ nsXBLBinding::UninstallAnonymousContent(nsIDocument* aDocument,
nsAutoScriptBlocker scriptBlocker;
// Hold a strong ref while doing this, just in case.
nsCOMPtr<nsIContent> anonParent = aAnonParent;
-#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xuldoc =
do_QueryInterface(aDocument);
-#endif
for (nsIContent* child = aAnonParent->GetFirstChild();
child;
child = child->GetNextSibling()) {
child->UnbindFromTree();
-#ifdef MOZ_XUL
if (xuldoc) {
xuldoc->RemoveSubtreeFromDocument(child);
}
-#endif
}
}
diff --git a/dom/xbl/nsXBLContentSink.cpp b/dom/xbl/nsXBLContentSink.cpp
index 0f54d62b49..51a89e2d88 100644
--- a/dom/xbl/nsXBLContentSink.cpp
+++ b/dom/xbl/nsXBLContentSink.cpp
@@ -13,9 +13,7 @@
#include "nsNameSpaceManager.h"
#include "nsIURI.h"
#include "nsTextFragment.h"
-#ifdef MOZ_XUL
#include "nsXULElement.h"
-#endif
#include "nsXBLProtoImplProperty.h"
#include "nsXBLProtoImplMethod.h"
#include "nsXBLProtoImplField.h"
@@ -854,13 +852,10 @@ nsXBLContentSink::CreateElement(const char16_t** aAtts, uint32_t aAttsCount,
nsIContent** aResult, bool* aAppendContent,
FromParser aFromParser)
{
-#ifdef MOZ_XUL
if (!aNodeInfo->NamespaceEquals(kNameSpaceID_XUL)) {
-#endif
return nsXMLContentSink::CreateElement(aAtts, aAttsCount, aNodeInfo,
aLineNumber, aResult,
aAppendContent, aFromParser);
-#ifdef MOZ_XUL
}
// Note that this needs to match the code in nsXBLPrototypeBinding::ReadContentNode.
@@ -876,7 +871,6 @@ nsXBLContentSink::CreateElement(const char16_t** aAtts, uint32_t aAttsCount,
nsresult rv = nsXULElement::Create(prototype, mDocument, false, false, &result);
*aResult = result;
return rv;
-#endif
}
nsresult
@@ -889,7 +883,6 @@ nsXBLContentSink::AddAttributes(const char16_t** aAtts,
return nsXMLContentSink::AddAttributes(aAtts, aContent);
}
-#ifdef MOZ_XUL
nsresult
nsXBLContentSink::AddAttributesToXULPrototype(const char16_t **aAtts,
uint32_t aAttsCount,
@@ -933,4 +926,3 @@ nsXBLContentSink::AddAttributesToXULPrototype(const char16_t **aAtts,
return NS_OK;
}
-#endif
diff --git a/dom/xbl/nsXBLContentSink.h b/dom/xbl/nsXBLContentSink.h
index 93c1454a40..e05728d14b 100644
--- a/dom/xbl/nsXBLContentSink.h
+++ b/dom/xbl/nsXBLContentSink.h
@@ -96,11 +96,9 @@ protected:
nsresult AddAttributes(const char16_t** aAtts,
nsIContent* aContent) override;
-#ifdef MOZ_XUL
nsresult AddAttributesToXULPrototype(const char16_t **aAtts,
uint32_t aAttsCount,
nsXULPrototypeElement* aElement);
-#endif
// Our own helpers for constructing XBL prototype objects.
nsresult ConstructBinding(uint32_t aLineNumber);
diff --git a/dom/xbl/nsXBLPrototypeBinding.cpp b/dom/xbl/nsXBLPrototypeBinding.cpp
index 25c33d5349..fce18a9934 100644
--- a/dom/xbl/nsXBLPrototypeBinding.cpp
+++ b/dom/xbl/nsXBLPrototypeBinding.cpp
@@ -46,9 +46,7 @@
#include "mozilla/StyleSheet.h"
#include "mozilla/StyleSheetInlines.h"
-#ifdef MOZ_XUL
#include "nsXULElement.h"
-#endif
using namespace mozilla;
using namespace mozilla::dom;
@@ -1234,7 +1232,6 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream,
// Create XUL prototype elements, or regular elements for other namespaces.
// This needs to match the code in nsXBLContentSink::CreateElement.
-#ifdef MOZ_XUL
if (namespaceID == kNameSpaceID_XUL) {
nsIURI* documentURI = aDocument->GetDocumentURI();
@@ -1265,8 +1262,7 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream,
nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(name);
if (namespaceID == kNameSpaceID_None) {
attrs[i].mName.SetTo(nameAtom);
- }
- else {
+ } else {
nsCOMPtr<nsIAtom> prefixAtom;
if (!prefix.IsEmpty())
prefixAtom = NS_Atomize(prefix);
@@ -1286,9 +1282,7 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream,
nsXULElement::Create(prototype, aDocument, false, false, getter_AddRefs(result));
NS_ENSURE_SUCCESS(rv, rv);
content = result;
- }
- else {
-#endif
+ } else {
nsCOMPtr<Element> element;
NS_NewElement(getter_AddRefs(element), nodeInfo.forget(), NOT_FROM_PARSER);
content = element;
@@ -1312,10 +1306,7 @@ nsXBLPrototypeBinding::ReadContentNode(nsIObjectInputStream* aStream,
nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(name);
content->SetAttr(namespaceID, nameAtom, prefixAtom, val, false);
}
-
-#ifdef MOZ_XUL
}
-#endif
// Now read the attribute forwarding entries (xbl:inherits)
diff --git a/dom/xbl/nsXBLService.cpp b/dom/xbl/nsXBLService.cpp
index 55839afd26..4a383fb38a 100644
--- a/dom/xbl/nsXBLService.cpp
+++ b/dom/xbl/nsXBLService.cpp
@@ -45,9 +45,7 @@
#include "nsIScriptError.h"
#include "nsXBLSerialize.h"
-#ifdef MOZ_XUL
#include "nsXULPrototypeCache.h"
-#endif
#include "nsIDOMEventListener.h"
#include "mozilla/Attributes.h"
#include "mozilla/EventListenerManager.h"
@@ -323,13 +321,11 @@ nsXBLStreamListener::HandleEvent(nsIDOMEvent* aEvent)
}
// If the doc is a chrome URI, then we put it into the XUL cache.
-#ifdef MOZ_XUL
if (nsXBLService::IsChromeOrResourceURI(documentURI)) {
nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance();
if (cache && cache->IsEnabled())
cache->PutXBLDocumentInfo(info);
}
-#endif
bindingManager->PutXBLDocumentInfo(info);
@@ -870,7 +866,6 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement,
}
}
-#ifdef MOZ_XUL
// The second line of defense is the global nsXULPrototypeCache,
// if it's being used.
nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance();
@@ -893,7 +888,6 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement,
}
}
}
-#endif
if (!info) {
// Finally, if all lines of defense fail, we go and fetch the binding
@@ -920,14 +914,12 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement,
xblDocBindingManager->RemoveXBLDocumentInfo(info); // Break the self-imposed cycle.
// If the doc is a chrome URI, then we put it into the XUL cache.
-#ifdef MOZ_XUL
if (useStartupCache) {
cache->PutXBLDocumentInfo(info);
// now write the bindings into the startup cache
info->WritePrototypeBindings();
}
-#endif
}
}
diff --git a/dom/xul/moz.build b/dom/xul/moz.build
index 50742f9245..6bee058846 100644
--- a/dom/xul/moz.build
+++ b/dom/xul/moz.build
@@ -7,26 +7,25 @@ MOCHITEST_MANIFESTS += ['test/mochitest.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
-if CONFIG['MOZ_XUL']:
- DIRS += ['templates']
-
- XPIDL_SOURCES += [
- 'nsIXULOverlayProvider.idl',
- ]
-
- EXPORTS += [
- 'nsIXULDocument.h',
- ]
-
- SOURCES += [
- 'nsXULCommandDispatcher.cpp',
- 'nsXULContentSink.cpp',
- 'nsXULElement.cpp',
- 'nsXULPopupListener.cpp',
- 'nsXULPrototypeCache.cpp',
- 'nsXULPrototypeDocument.cpp',
- 'XULDocument.cpp',
- ]
+DIRS += ['templates']
+
+XPIDL_SOURCES += [
+ 'nsIXULOverlayProvider.idl',
+]
+
+EXPORTS += [
+ 'nsIXULDocument.h',
+]
+
+SOURCES += [
+ 'nsXULCommandDispatcher.cpp',
+ 'nsXULContentSink.cpp',
+ 'nsXULElement.cpp',
+ 'nsXULPopupListener.cpp',
+ 'nsXULPrototypeCache.cpp',
+ 'nsXULPrototypeDocument.cpp',
+ 'XULDocument.cpp',
+]
XPIDL_SOURCES += [
'nsIController.idl',