summaryrefslogtreecommitdiff
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
parentc030a50228349fa1b2c0b4fbc2e83752324dd4d7 (diff)
downloaduxp-ddaee7c1be914cc28a28cbe27e5922215b3b2e6f.tar.gz
Issue #1830 - Remove --disable-xul config and conditionals.
-rw-r--r--accessible/base/AccIterator.cpp2
-rw-r--r--accessible/base/nsAccessibilityService.cpp6
-rw-r--r--accessible/base/nsAccessibilityService.h2
-rw-r--r--accessible/generic/DocAccessible.cpp6
-rw-r--r--accessible/generic/RootAccessible.cpp39
-rw-r--r--accessible/generic/RootAccessible.h12
-rw-r--r--accessible/moz.build6
-rw-r--r--accessible/windows/msaa/moz.build10
-rw-r--r--build/moz.configure/old.configure1
-rw-r--r--chrome/nsChromeRegistry.cpp2
-rw-r--r--chrome/nsChromeRegistry.h6
-rw-r--r--chrome/nsChromeRegistryChrome.cpp2
-rw-r--r--chrome/nsChromeRegistryChrome.h2
-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
-rw-r--r--embedding/components/build/nsEmbeddingModule.cpp8
-rw-r--r--embedding/components/moz.build4
-rw-r--r--embedding/components/windowwatcher/moz.build8
-rw-r--r--layout/base/RestyleManager.cpp3
-rw-r--r--layout/base/nsCSSFrameConstructor.cpp70
-rw-r--r--layout/base/nsCSSFrameConstructor.h4
-rw-r--r--layout/base/nsCSSRendering.cpp8
-rw-r--r--layout/base/nsCaret.cpp2
-rw-r--r--layout/base/nsDisplayItemTypesList.h7
-rw-r--r--layout/base/nsDocumentViewer.cpp6
-rw-r--r--layout/base/nsLayoutUtils.cpp8
-rw-r--r--layout/base/nsPresShell.cpp16
-rw-r--r--layout/build/nsLayoutModule.cpp30
-rw-r--r--layout/build/nsLayoutStatics.cpp13
-rw-r--r--layout/generic/ReflowInput.cpp4
-rw-r--r--layout/generic/TextOverflow.cpp3
-rw-r--r--layout/generic/nsContainerFrame.cpp5
-rw-r--r--layout/generic/nsFrame.cpp4
-rw-r--r--layout/inspector/moz.build6
-rw-r--r--layout/style/Loader.cpp18
-rw-r--r--layout/style/SVGAttrAnimationRuleProcessor.cpp2
-rw-r--r--layout/style/SVGAttrAnimationRuleProcessor.h2
-rw-r--r--layout/style/StyleRule.cpp12
-rw-r--r--layout/style/nsCSSAnonBoxList.h2
-rw-r--r--layout/style/nsCSSAnonBoxes.cpp2
-rw-r--r--layout/style/nsCSSAnonBoxes.h2
-rw-r--r--layout/style/nsCSSParser.cpp21
-rw-r--r--layout/style/nsCSSProps.cpp2
-rw-r--r--layout/style/nsCSSPseudoElements.cpp2
-rw-r--r--layout/style/nsCSSPseudoElements.h2
-rw-r--r--layout/style/nsCSSRuleProcessor.cpp12
-rw-r--r--layout/style/nsCSSRuleProcessor.h2
-rw-r--r--layout/style/nsHTMLCSSStyleSheet.cpp2
-rw-r--r--layout/style/nsHTMLCSSStyleSheet.h2
-rw-r--r--layout/style/nsHTMLStyleSheet.cpp9
-rw-r--r--layout/style/nsHTMLStyleSheet.h2
-rw-r--r--layout/style/nsIStyleRuleProcessor.h4
-rw-r--r--layout/style/nsRuleNode.cpp4
-rw-r--r--layout/style/nsRuleProcessorData.h2
-rw-r--r--layout/style/nsStyleConsts.h2
-rw-r--r--layout/style/nsStyleSet.cpp9
-rw-r--r--layout/style/nsStyleSet.h2
-rw-r--r--layout/xul/BoxObject.cpp4
-rw-r--r--layout/xul/moz.build63
-rw-r--r--layout/xul/nsXULLabelFrame.h4
-rw-r--r--layout/xul/nsXULTooltipListener.cpp33
-rw-r--r--layout/xul/nsXULTooltipListener.h8
-rw-r--r--old-configure.in16
-rw-r--r--security/manager/moz.build5
-rw-r--r--security/manager/ssl/moz.build13
-rw-r--r--security/manager/ssl/nsNSSModule.cpp10
-rw-r--r--toolkit/components/moz.build3
-rw-r--r--toolkit/components/places/nsNavHistory.cpp29
-rw-r--r--toolkit/components/places/nsNavHistory.h4
-rw-r--r--widget/moz.build2
-rw-r--r--widget/windows/nsWindow.cpp10
-rw-r--r--widget/windows/nsWindow.h6
-rw-r--r--widget/windows/nsWindowGfx.cpp14
95 files changed, 101 insertions, 730 deletions
diff --git a/accessible/base/AccIterator.cpp b/accessible/base/AccIterator.cpp
index f6e890c502..6149ba0a3f 100644
--- a/accessible/base/AccIterator.cpp
+++ b/accessible/base/AccIterator.cpp
@@ -5,9 +5,7 @@
#include "AccIterator.h"
#include "AccGroupInfo.h"
-#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
-#endif
#include "mozilla/dom/HTMLLabelElement.h"
diff --git a/accessible/base/nsAccessibilityService.cpp b/accessible/base/nsAccessibilityService.cpp
index 90d54e3ab6..ab0e8eb1af 100644
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -68,7 +68,6 @@
#include "mozilla/Services.h"
#include "nsDeckFrame.h"
-#ifdef MOZ_XUL
#include "XULAlertAccessible.h"
#include "XULColorPickerAccessible.h"
#include "XULComboboxAccessible.h"
@@ -79,7 +78,6 @@
#include "XULSliderAccessible.h"
#include "XULTabAccessible.h"
#include "XULTreeGridAccessibleWrap.h"
-#endif
#if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
#include "nsNPAPIPluginInstance.h"
@@ -1356,7 +1354,6 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
}
RefPtr<Accessible> accessible;
-#ifdef MOZ_XUL
// XUL controls
if (role.EqualsLiteral("xul:alert")) {
accessible = new XULAlertAccessible(aContent, aDoc);
@@ -1515,7 +1512,6 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
accessible = new XULToolbarButtonAccessible(aContent, aDoc);
}
-#endif // MOZ_XUL
return accessible.forget();
}
@@ -1739,7 +1735,6 @@ nsAccessibilityService::HasAccessible(nsIDOMNode* aDOMNode)
////////////////////////////////////////////////////////////////////////////////
// nsAccessibilityService private (DON'T put methods here)
-#ifdef MOZ_XUL
already_AddRefed<Accessible>
nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
DocAccessible* aDoc)
@@ -1769,7 +1764,6 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
new XULTreeGridAccessibleWrap(aContent, aDoc, treeFrame);
return accessible.forget();
}
-#endif
nsAccessibilityService*
GetOrCreateAccService(uint32_t aNewConsumer)
diff --git a/accessible/base/nsAccessibilityService.h b/accessible/base/nsAccessibilityService.h
index 1f32fc6779..6efc628b7a 100644
--- a/accessible/base/nsAccessibilityService.h
+++ b/accessible/base/nsAccessibilityService.h
@@ -274,13 +274,11 @@ private:
CreateAccessibleByFrameType(nsIFrame* aFrame, nsIContent* aContent,
Accessible* aContext);
-#ifdef MOZ_XUL
/**
* Create accessible for XUL tree element.
*/
already_AddRefed<Accessible>
CreateAccessibleForXULTree(nsIContent* aContent, DocAccessible* aDoc);
-#endif
/**
* Reference for accessibility service instance.
diff --git a/accessible/generic/DocAccessible.cpp b/accessible/generic/DocAccessible.cpp
index 8fda3b44f5..8c423193c0 100644
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -48,9 +48,7 @@
#include "mozilla/dom/DocumentType.h"
#include "mozilla/dom/Element.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
-#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -210,11 +208,9 @@ DocAccessible::NativeRole()
return roles::CHROME_WINDOW;
if (itemType == nsIDocShellTreeItem::typeContent) {
-#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc)
return roles::APPLICATION;
-#endif
return roles::DOCUMENT;
}
}
@@ -387,13 +383,11 @@ DocAccessible::URL(nsAString& aURL) const
void
DocAccessible::DocType(nsAString& aType) const
{
-#ifdef MOZ_XUL
nsCOMPtr<nsIXULDocument> xulDoc(do_QueryInterface(mDocumentNode));
if (xulDoc) {
aType.AssignLiteral("window"); // doctype not implemented for XUL at time of writing - causes assertion
return;
}
-#endif
dom::DocumentType* docType = mDocumentNode->GetDoctype();
if (docType)
docType->GetPublicId(aType);
diff --git a/accessible/generic/RootAccessible.cpp b/accessible/generic/RootAccessible.cpp
index 8ca9b8c9cd..f3035008bb 100644
--- a/accessible/generic/RootAccessible.cpp
+++ b/accessible/generic/RootAccessible.cpp
@@ -19,9 +19,7 @@
#include "Relation.h"
#include "Role.h"
#include "States.h"
-#ifdef MOZ_XUL
#include "XULTreeAccessible.h"
-#endif
#include "mozilla/dom/Element.h"
@@ -43,10 +41,8 @@
#include "nsFocusManager.h"
#include "nsGlobalWindow.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsIXULWindow.h"
-#endif
using namespace mozilla;
using namespace mozilla::a11y;
@@ -102,7 +98,6 @@ RootAccessible::NativeRole()
}
// RootAccessible protected member
-#ifdef MOZ_XUL
uint32_t
RootAccessible::GetChromeFlags()
{
@@ -122,7 +117,6 @@ RootAccessible::GetChromeFlags()
xulWin->GetChromeFlags(&chromeFlags);
return chromeFlags;
}
-#endif
uint64_t
RootAccessible::NativeState()
@@ -131,7 +125,6 @@ RootAccessible::NativeState()
if (state & states::DEFUNCT)
return state;
-#ifdef MOZ_XUL
uint32_t chromeFlags = GetChromeFlags();
if (chromeFlags & nsIWebBrowserChrome::CHROME_WINDOW_RESIZE)
state |= states::SIZEABLE;
@@ -142,7 +135,6 @@ RootAccessible::NativeState()
state |= states::MOVEABLE;
if (chromeFlags & nsIWebBrowserChrome::CHROME_MODAL)
state |= states::MODAL;
-#endif
nsFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm && fm->GetActiveWindow() == mDocumentNode->GetWindow())
@@ -292,7 +284,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (!accessible)
return;
-#ifdef MOZ_XUL
XULTreeAccessible* treeAcc = accessible->AsXULTree();
if (treeAcc) {
if (eventType.EqualsLiteral("TreeRowCountChanged")) {
@@ -305,7 +296,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
return;
}
}
-#endif
if (eventType.EqualsLiteral("RadioStateChange")) {
uint64_t state = accessible->State();
@@ -341,7 +331,6 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
}
Accessible* treeItemAcc = nullptr;
-#ifdef MOZ_XUL
// If it's a tree element, need the currently selected item.
if (treeAcc) {
treeItemAcc = accessible->CurrentItem();
@@ -385,29 +374,22 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
nsEventShell::FireEvent(selChangeEvent);
return;
}
- }
- else
-#endif
- if (eventType.EqualsLiteral("AlertActive")) {
+ } else if (eventType.EqualsLiteral("AlertActive")) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_ALERT, accessible);
- }
- else if (eventType.EqualsLiteral("popupshown")) {
+ } else if (eventType.EqualsLiteral("popupshown")) {
HandlePopupShownEvent(accessible);
- }
- else if (eventType.EqualsLiteral("DOMMenuInactive")) {
+ } else if (eventType.EqualsLiteral("DOMMenuInactive")) {
if (accessible->Role() == roles::MENUPOPUP) {
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENUPOPUP_END,
accessible);
}
- }
- else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
+ } else if (eventType.EqualsLiteral("DOMMenuItemActive")) {
FocusMgr()->ActiveItemChanged(accessible);
#ifdef A11Y_LOG
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuItemActive", accessible);
#endif
- }
- else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
+ } else if (eventType.EqualsLiteral("DOMMenuItemInactive")) {
// Process DOMMenuItemInactive event for autocomplete only because this is
// unique widget that may acquire focus from autocomplete popup while popup
// stays open and has no active item. In case of XUL tree autocomplete
@@ -421,8 +403,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuItemInactive", accessible);
#endif
}
- }
- else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
+ } else if (eventType.EqualsLiteral("DOMMenuBarActive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_START,
accessible, eFromUserInput);
@@ -440,8 +421,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
logging::ActiveItemChangeCausedBy("DOMMenuBarActive", accessible);
#endif
}
- }
- else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
+ } else if (eventType.EqualsLiteral("DOMMenuBarInactive")) { // Always from user input
nsEventShell::FireEvent(nsIAccessibleEvent::EVENT_MENU_END,
accessible, eFromUserInput);
@@ -450,8 +430,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
if (logging::IsEnabled(logging::eFocus))
logging::ActiveItemChangeCausedBy("DOMMenuBarInactive", accessible);
#endif
- }
- else if (accessible->NeedsDOMUIEvent() &&
+ } else if (accessible->NeedsDOMUIEvent() &&
eventType.EqualsLiteral("ValueChange")) {
uint32_t event = accessible->HasNumericValue()
? nsIAccessibleEvent::EVENT_VALUE_CHANGE
@@ -650,7 +629,6 @@ RootAccessible::HandlePopupHidingEvent(nsINode* aPopupNode)
}
}
-#ifdef MOZ_XUL
void
RootAccessible::HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
XULTreeAccessible* aAccessible)
@@ -714,7 +692,6 @@ RootAccessible::HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
aAccessible->TreeViewInvalidated(startRow, endRow, startCol, endCol);
}
-#endif
ProxyAccessible*
RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const
diff --git a/accessible/generic/RootAccessible.h b/accessible/generic/RootAccessible.h
index beb74cf4b6..ac1e83f5e1 100644
--- a/accessible/generic/RootAccessible.h
+++ b/accessible/generic/RootAccessible.h
@@ -70,14 +70,12 @@ protected:
*/
void HandlePopupHidingEvent(nsINode* aNode);
-#ifdef MOZ_XUL
- void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
- XULTreeAccessible* aAccessible);
- void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
- XULTreeAccessible* aAccessible);
+ void HandleTreeRowCountChangedEvent(nsIDOMEvent* aEvent,
+ XULTreeAccessible* aAccessible);
+ void HandleTreeInvalidatedEvent(nsIDOMEvent* aEvent,
+ XULTreeAccessible* aAccessible);
- uint32_t GetChromeFlags();
-#endif
+ uint32_t GetChromeFlags();
};
inline RootAccessible*
diff --git a/accessible/moz.build b/accessible/moz.build
index c22a085f01..edfd88f504 100644
--- a/accessible/moz.build
+++ b/accessible/moz.build
@@ -19,12 +19,10 @@ DIRS += [ 'aom',
'interfaces',
'ipc',
'jsat',
- 'xpcom'
+ 'xpcom',
+ 'xul'
]
-if CONFIG['MOZ_XUL']:
- DIRS += ['xul']
-
TEST_DIRS += ['tests/mochitest']
BROWSER_CHROME_MANIFESTS += [
diff --git a/accessible/windows/msaa/moz.build b/accessible/windows/msaa/moz.build
index b929222d38..8a759f73b3 100644
--- a/accessible/windows/msaa/moz.build
+++ b/accessible/windows/msaa/moz.build
@@ -33,15 +33,11 @@ SOURCES += [
'RootAccessibleWrap.cpp',
'ServiceProvider.cpp',
'TextLeafAccessibleWrap.cpp',
+ 'XULListboxAccessibleWrap.cpp',
+ 'XULMenuAccessibleWrap.cpp',
+ 'XULTreeGridAccessibleWrap.cpp',
]
-if CONFIG['MOZ_XUL']:
- SOURCES += [
- 'XULListboxAccessibleWrap.cpp',
- 'XULMenuAccessibleWrap.cpp',
- 'XULTreeGridAccessibleWrap.cpp',
- ]
-
LOCAL_INCLUDES += [
'/accessible/base',
'/accessible/generic',
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index 5951858f3f..c7e3345ea2 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -249,7 +249,6 @@ def old_configure_options(*options):
'--enable-valgrind',
'--enable-verify-mar',
'--enable-webrtc',
- '--enable-xul',
'--enable-zipwriter',
'--includedir',
'--libdir',
diff --git a/chrome/nsChromeRegistry.cpp b/chrome/nsChromeRegistry.cpp
index e25e7bbcf6..ef2cb79ab7 100644
--- a/chrome/nsChromeRegistry.cpp
+++ b/chrome/nsChromeRegistry.cpp
@@ -108,9 +108,7 @@ NS_INTERFACE_MAP_BEGIN(nsChromeRegistry)
NS_INTERFACE_MAP_ENTRY(nsIChromeRegistry)
NS_INTERFACE_MAP_ENTRY(nsIXULChromeRegistry)
NS_INTERFACE_MAP_ENTRY(nsIToolkitChromeRegistry)
-#ifdef MOZ_XUL
NS_INTERFACE_MAP_ENTRY(nsIXULOverlayProvider)
-#endif
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIChromeRegistry)
diff --git a/chrome/nsChromeRegistry.h b/chrome/nsChromeRegistry.h
index f47c8e6050..27b45791fb 100644
--- a/chrome/nsChromeRegistry.h
+++ b/chrome/nsChromeRegistry.h
@@ -9,11 +9,7 @@
#include "nsIToolkitChromeRegistry.h"
#include "nsIObserver.h"
#include "nsWeakReference.h"
-
-#ifdef MOZ_XUL
#include "nsIXULOverlayProvider.h"
-#endif
-
#include "nsString.h"
#include "nsURIHashKey.h"
#include "nsInterfaceHashtable.h"
@@ -37,9 +33,7 @@ class nsIURL;
{ 0x47049e42, 0x1d87, 0x482a, { 0x98, 0x4d, 0x56, 0xae, 0x18, 0x5e, 0x36, 0x7a } }
class nsChromeRegistry : public nsIToolkitChromeRegistry,
-#ifdef MOZ_XUL
public nsIXULOverlayProvider,
-#endif
public nsIObserver,
public nsSupportsWeakReference
{
diff --git a/chrome/nsChromeRegistryChrome.cpp b/chrome/nsChromeRegistryChrome.cpp
index fef2afc37b..c115280fdc 100644
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -638,7 +638,6 @@ nsChromeRegistryChrome::OverlayListHash::GetArray(nsIURI* aBase)
return &entry->mArray;
}
-#ifdef MOZ_XUL
NS_IMETHODIMP
nsChromeRegistryChrome::GetStyleOverlays(nsIURI *aChromeURL,
nsISimpleEnumerator **aResult)
@@ -668,7 +667,6 @@ nsChromeRegistryChrome::GetXULOverlays(nsIURI *aChromeURL,
return NS_NewArrayEnumerator(aResult, *parray);
}
-#endif // MOZ_XUL
nsIURI*
nsChromeRegistry::ManifestProcessingContext::GetManifestURI()
diff --git a/chrome/nsChromeRegistryChrome.h b/chrome/nsChromeRegistryChrome.h
index 4d12ca7830..60e93274e5 100644
--- a/chrome/nsChromeRegistryChrome.h
+++ b/chrome/nsChromeRegistryChrome.h
@@ -41,12 +41,10 @@ class nsChromeRegistryChrome : public nsChromeRegistry
NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
const char16_t *someData) override;
-#ifdef MOZ_XUL
NS_IMETHOD GetXULOverlays(nsIURI *aURI,
nsISimpleEnumerator **_retval) override;
NS_IMETHOD GetStyleOverlays(nsIURI *aURI,
nsISimpleEnumerator **_retval) override;
-#endif
// If aChild is non-null then it is a new child to notify. If aChild is
// null, then we have installed new chrome and we are resetting all of our
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',
diff --git a/embedding/components/build/nsEmbeddingModule.cpp b/embedding/components/build/nsEmbeddingModule.cpp
index 48351ec3ad..6d0da1f13f 100644
--- a/embedding/components/build/nsEmbeddingModule.cpp
+++ b/embedding/components/build/nsEmbeddingModule.cpp
@@ -35,7 +35,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandParams)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandGroup)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController)
-#ifdef MOZ_XUL
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
#ifdef NS_PRINTING
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
@@ -44,14 +43,11 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPrintingProxy,
nsPrintingProxy::GetInstance)
#endif
#endif
-#endif
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_DIALOGPARAMBLOCK_CID);
#ifdef NS_PRINTING
NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID);
#endif
-#endif
NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID);
NS_DEFINE_NAMED_CID(NS_FIND_CID);
NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID);
@@ -64,7 +60,6 @@ NS_DEFINE_NAMED_CID(NS_CONTROLLER_COMMAND_GROUP_CID);
NS_DEFINE_NAMED_CID(NS_BASECOMMANDCONTROLLER_CID);
static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
-#ifdef MOZ_XUL
{ &kNS_DIALOGPARAMBLOCK_CID, false, nullptr, nsDialogParamBlockConstructor },
#ifdef NS_PRINTING
@@ -77,7 +72,6 @@ static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor },
#endif
#endif
-#endif
{ &kNS_WINDOWWATCHER_CID, false, nullptr, nsWindowWatcherConstructor },
{ &kNS_FIND_CID, false, nullptr, nsFindConstructor },
{ &kNS_WEB_BROWSER_FIND_CID, false, nullptr, nsWebBrowserFindConstructor },
@@ -92,12 +86,10 @@ static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
};
static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
-#ifdef MOZ_XUL
{ NS_DIALOGPARAMBLOCK_CONTRACTID, &kNS_DIALOGPARAMBLOCK_CID },
#ifdef NS_PRINTING
{ NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID },
#endif
-#endif
{ NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID },
{ NS_FIND_CONTRACTID, &kNS_FIND_CID },
{ NS_WEB_BROWSER_FIND_CONTRACTID, &kNS_WEB_BROWSER_FIND_CID },
diff --git a/embedding/components/moz.build b/embedding/components/moz.build
index 5b8788a25a..2d7914aa96 100644
--- a/embedding/components/moz.build
+++ b/embedding/components/moz.build
@@ -11,9 +11,7 @@ DIRS += [
'find',
'webbrowserpersist',
'commandhandler',
+ 'printingui',
]
-if CONFIG['MOZ_XUL']:
- DIRS += ['printingui']
-
DIRS += ['build']
diff --git a/embedding/components/windowwatcher/moz.build b/embedding/components/windowwatcher/moz.build
index d0257d90b1..a4183da325 100644
--- a/embedding/components/windowwatcher/moz.build
+++ b/embedding/components/windowwatcher/moz.build
@@ -21,8 +21,9 @@ EXPORTS += [
'nsPromptUtils.h',
]
-UNIFIED_SOURCES += [
+SOURCES += [
'nsAutoWindowStateHelper.cpp',
+ 'nsDialogParamBlock.cpp',
'nsWindowWatcher.cpp',
]
@@ -30,11 +31,6 @@ EXPORTS += [
'nsWindowWatcher.h',
]
-if CONFIG['MOZ_XUL']:
- UNIFIED_SOURCES += [
- 'nsDialogParamBlock.cpp',
- ]
-
FINAL_LIBRARY = 'xul'
# For nsJSUtils
LOCAL_INCLUDES += [
diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp
index 9e80ef7bc7..44a9f4c3c5 100644
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -311,7 +311,6 @@ RestyleManager::AttributeChanged(Element* aElement,
bool reframe = (hint & nsChangeHint_ReconstructFrame) != 0;
-#ifdef MOZ_XUL
// The following listbox widget trap prevents offscreen listbox widget
// content from being removed and re-inserted (which is what would
// happen otherwise).
@@ -338,8 +337,6 @@ RestyleManager::AttributeChanged(Element* aElement,
}
}
-#endif // MOZ_XUL
-
if (primaryFrame) {
// See if we have appearance information for a theme.
const nsStyleDisplay* disp = primaryFrame->StyleDisplay();
diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
index df793c67f8..5b514a330b 100644
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -94,9 +94,8 @@
#include "nsTransitionManager.h"
#include "DetailsFrame.h"
-#ifdef MOZ_XUL
#include "nsIRootBox.h"
-#endif
+
#ifdef ACCESSIBILITY
#include "nsAccessibilityService.h"
#endif
@@ -208,8 +207,6 @@ static FrameCtorDebugFlags gFlags[] = {
#define NUM_DEBUG_FLAGS (sizeof(gFlags) / sizeof(gFlags[0]))
#endif
-
-#ifdef MOZ_XUL
#include "nsMenuFrame.h"
#include "nsPopupSetFrame.h"
#include "nsTreeColFrame.h"
@@ -291,9 +288,6 @@ NS_NewTitleBarFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewResizerFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
-
-#endif
-
nsHTMLScrollFrame*
NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsRoot);
@@ -748,10 +742,8 @@ public:
nsIPresShell *mPresShell;
nsFrameManager *mFrameManager;
-#ifdef MOZ_XUL
// Frames destined for the kPopupList.
nsAbsoluteItems mPopupItems;
-#endif
// Containing block information for out-of-flow frames.
nsAbsoluteItems mFixedItems;
@@ -967,9 +959,7 @@ nsFrameConstructorState::nsFrameConstructorState(
: mPresContext(aPresShell->GetPresContext()),
mPresShell(aPresShell),
mFrameManager(aPresShell->FrameManager()),
-#ifdef MOZ_XUL
mPopupItems(nullptr),
-#endif
mFixedItems(aFixedContainingBlock),
mAbsoluteItems(aAbsoluteContainingBlock),
mFloatedItems(aFloatContainingBlock),
@@ -990,12 +980,10 @@ nsFrameConstructorState::nsFrameConstructorState(
aPresShell->GetDocument()),
mCurrentPendingBindingInsertionPoint(nullptr)
{
-#ifdef MOZ_XUL
nsIRootBox* rootBox = nsIRootBox::GetRootBox(aPresShell);
if (rootBox) {
mPopupItems.containingBlock = rootBox->GetPopupSetFrame();
}
-#endif
MOZ_COUNT_CTOR(nsFrameConstructorState);
}
@@ -1018,9 +1006,7 @@ nsFrameConstructorState::~nsFrameConstructorState()
ProcessFrameInsertions(mFloatedItems, nsIFrame::kFloatList);
ProcessFrameInsertions(mAbsoluteItems, nsIFrame::kAbsoluteList);
ProcessFrameInsertions(mFixedItems, nsIFrame::kFixedList);
-#ifdef MOZ_XUL
ProcessFrameInsertions(mPopupItems, nsIFrame::kPopupList);
-#endif
for (int32_t i = mGeneratedTextNodesWithInitializer.Count() - 1; i >= 0; --i) {
mGeneratedTextNodesWithInitializer[i]->
DeleteProperty(nsGkAtoms::genConInitializerProperty);
@@ -1164,13 +1150,11 @@ nsFrameConstructorState::GetOutOfFlowFrameItems(nsIFrame* aNewFrame,
bool aIsOutOfFlowPopup,
nsFrameState* aPlaceholderType)
{
-#ifdef MOZ_XUL
if (MOZ_UNLIKELY(aIsOutOfFlowPopup)) {
MOZ_ASSERT(mPopupItems.containingBlock, "Must have a popup set frame!");
*aPlaceholderType = PLACEHOLDER_FOR_POPUP;
return &mPopupItems;
}
-#endif // MOZ_XUL
if (aCanBeFloated && aNewFrame->IsFloating()) {
*aPlaceholderType = PLACEHOLDER_FOR_FLOAT;
return &mFloatedItems;
@@ -1315,15 +1299,10 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems,
((&aFrameItems == &mFixedItems || \
&aFrameItems == &mTopLayerFixedItems) && \
aChildListID == nsIFrame::kFixedList)
-#ifdef MOZ_XUL
NS_PRECONDITION(NS_NONXUL_LIST_TEST ||
(&aFrameItems == &mPopupItems &&
aChildListID == nsIFrame::kPopupList),
"Unexpected aFrameItems/aChildListID combination");
-#else
- NS_PRECONDITION(NS_NONXUL_LIST_TEST,
- "Unexpected aFrameItems/aChildListID combination");
-#endif
if (aFrameItems.IsEmpty()) {
return;
@@ -2525,7 +2504,6 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
nsFrameConstructorSaveState absoluteSaveState;
// Check whether we need to build a XUL box or SVG root frame
-#ifdef MOZ_XUL
if (aDocElement->IsXULElement()) {
contentFrame = NS_NewDocElementBoxFrame(mPresShell, styleContext);
InitAndRestoreFrame(state, aDocElement, mDocElementContainingBlock,
@@ -2534,7 +2512,6 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
processChildren = true;
}
else
-#endif
if (aDocElement->IsSVGElement()) {
if (!aDocElement->IsSVGElement(nsGkAtoms::svg)) {
return nullptr;
@@ -2803,13 +2780,11 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement)
nsIAtom* rootPseudo;
if (!isPaginated) {
-#ifdef MOZ_XUL
if (aDocElement->IsXULElement())
{
// pass a temporary stylecontext, the correct one will be set later
rootFrame = NS_NewRootBoxFrame(mPresShell, viewportPseudoStyle);
} else
-#endif
{
// pass a temporary stylecontext, the correct one will be set later
rootFrame = NS_NewCanvasFrame(mPresShell, viewportPseudoStyle);
@@ -3972,9 +3947,8 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
nsContainerFrame* newFrameAsContainer = do_QueryFrame(newFrame);
if (newFrameAsContainer) {
-#ifdef MOZ_XUL
- // Icky XUL stuff, sadly
+ // Icky XUL stuff, sadly
if (aItem.mIsRootPopupgroup) {
NS_ASSERTION(nsIRootBox::GetRootBox(mPresShell) &&
nsIRootBox::GetRootBox(mPresShell)->GetPopupSetFrame() ==
@@ -3983,7 +3957,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
aState.mPopupItems.containingBlock = newFrameAsContainer;
aState.mHavePendingPopupgroup = false;
}
-#endif /* MOZ_XUL */
// Process the child content if requested
nsFrameItems childItems;
@@ -4072,7 +4045,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
}
}
-#ifdef MOZ_XUL
// More icky XUL stuff
if (aItem.mNameSpaceID == kNameSpaceID_XUL &&
(aItem.mTag == nsGkAtoms::treechildren || // trees always need titletips
@@ -4083,7 +4055,6 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
rootBox->AddTooltipSupport(content);
}
}
-#endif
NS_ASSERTION(newFrame->IsFrameOfType(nsIFrame::eLineParticipant) ==
((bits & FCDATA_IS_LINE_PARTICIPANT) != 0),
@@ -4251,12 +4222,9 @@ static
bool IsXULDisplayType(const nsStyleDisplay* aDisplay)
{
return (aDisplay->mDisplay == StyleDisplay::InlineBox ||
-#ifdef MOZ_XUL
aDisplay->mDisplay == StyleDisplay::InlineXulGrid ||
aDisplay->mDisplay == StyleDisplay::InlineStack ||
-#endif
aDisplay->mDisplay == StyleDisplay::Box
-#ifdef MOZ_XUL
|| aDisplay->mDisplay == StyleDisplay::XulGrid ||
aDisplay->mDisplay == StyleDisplay::Stack ||
aDisplay->mDisplay == StyleDisplay::XulGridGroup ||
@@ -4264,7 +4232,6 @@ bool IsXULDisplayType(const nsStyleDisplay* aDisplay)
aDisplay->mDisplay == StyleDisplay::Deck ||
aDisplay->mDisplay == StyleDisplay::Popup ||
aDisplay->mDisplay == StyleDisplay::Groupbox
-#endif
);
}
@@ -4314,7 +4281,6 @@ nsCSSFrameConstructor::FindXULTagData(Element* aElement,
}
static const FrameConstructionDataByTag sXULTagData[] = {
-#ifdef MOZ_XUL
SCROLLABLE_XUL_CREATE(button, NS_NewButtonBoxFrame),
SCROLLABLE_XUL_CREATE(checkbox, NS_NewButtonBoxFrame),
SCROLLABLE_XUL_CREATE(radio, NS_NewButtonBoxFrame),
@@ -4342,7 +4308,6 @@ nsCSSFrameConstructor::FindXULTagData(Element* aElement,
SIMPLE_TAG_CHAIN(listboxbody,
nsCSSFrameConstructor::FindXULListBoxBodyData),
SIMPLE_TAG_CHAIN(listitem, nsCSSFrameConstructor::FindXULListItemData),
-#endif /* MOZ_XUL */
SIMPLE_XUL_CREATE(slider, NS_NewSliderFrame),
SIMPLE_XUL_CREATE(scrollbar, NS_NewScrollbarFrame),
SIMPLE_XUL_CREATE(scrollbarbutton, NS_NewScrollbarButtonFrame)
@@ -4352,7 +4317,6 @@ nsCSSFrameConstructor::FindXULTagData(Element* aElement,
ArrayLength(sXULTagData));
}
-#ifdef MOZ_XUL
/* static */
const nsCSSFrameConstructor::FrameConstructionData*
nsCSSFrameConstructor::FindPopupGroupData(Element* aElement,
@@ -4436,8 +4400,6 @@ nsCSSFrameConstructor::FindXULListItemData(Element* aElement,
return &sListItemData;
}
-#endif /* MOZ_XUL */
-
/* static */
const nsCSSFrameConstructor::FrameConstructionData*
nsCSSFrameConstructor::FindXULDisplayData(const nsStyleDisplay* aDisplay,
@@ -4449,7 +4411,6 @@ nsCSSFrameConstructor::FindXULDisplayData(const nsStyleDisplay* aDisplay,
NS_NewBoxFrame),
SCROLLABLE_ABSPOS_CONTAINER_XUL_DISPLAY_CREATE(StyleDisplay::InlineBox,
NS_NewBoxFrame),
-#ifdef MOZ_XUL
SCROLLABLE_XUL_DISPLAY_CREATE(StyleDisplay::XulGrid, NS_NewGridBoxFrame),
SCROLLABLE_XUL_DISPLAY_CREATE(StyleDisplay::InlineXulGrid, NS_NewGridBoxFrame),
SCROLLABLE_XUL_DISPLAY_CREATE(StyleDisplay::XulGridGroup,
@@ -4463,7 +4424,6 @@ nsCSSFrameConstructor::FindXULDisplayData(const nsStyleDisplay* aDisplay,
FCDATA_FOR_DISPLAY(StyleDisplay::Popup,
FCDATA_DECL(FCDATA_DISALLOW_OUT_OF_FLOW | FCDATA_IS_POPUP |
FCDATA_SKIP_ABSPOS_PUSH, NS_NewMenuPopupFrame))
-#endif /* MOZ_XUL */
};
if (aDisplay->mDisplay < StyleDisplay::Box) {
@@ -5831,7 +5791,6 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
return;
}
-#ifdef MOZ_XUL
if ((data->mBits & FCDATA_IS_POPUP) &&
(!aParentFrame || // Parent is inline
aParentFrame->GetType() != nsGkAtoms::menuFrame)) {
@@ -5844,7 +5803,6 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
isPopup = true;
}
-#endif /* MOZ_XUL */
}
uint32_t bits = data->mBits;
@@ -6821,8 +6779,6 @@ IsSpecialFramesetChild(nsIContent* aContent)
static void
InvalidateCanvasIfNeeded(nsIPresShell* presShell, nsIContent* node);
-#ifdef MOZ_XUL
-
static
bool
IsXULListBox(nsIContent* aContainer)
@@ -6850,7 +6806,6 @@ MaybeGetListBoxBodyFrame(nsIContent* aContainer, nsIContent* aChild)
return nullptr;
}
-#endif
void
nsCSSFrameConstructor::AddTextItemIfNeeded(nsFrameConstructorState& aState,
@@ -7075,12 +7030,9 @@ nsCSSFrameConstructor::IssueSingleInsertNofications(nsIContent* aContainer,
child = child->GetNextSibling()) {
if ((child->GetPrimaryFrame() || GetUndisplayedContent(child) ||
GetDisplayContentsStyleFor(child))
-#ifdef MOZ_XUL
// Except listboxes suck, so do NOT skip anything here if
// we plan to notify a listbox.
- && !MaybeGetListBoxBodyFrame(aContainer, child)
-#endif
- ) {
+ && !MaybeGetListBoxBodyFrame(aContainer, child)) {
// Already have a frame or undisplayed entry for this content; a
// previous ContentInserted in this loop must have reconstructed
// its insertion parent. Skip it.
@@ -7208,7 +7160,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
}
#endif
-#ifdef MOZ_XUL
if (aContainer) {
int32_t namespaceID;
nsIAtom* tag =
@@ -7221,7 +7172,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
return;
}
-#endif // MOZ_XUL
if (aContainer && aContainer->HasFlag(NODE_IS_IN_SHADOW_TREE) &&
!aContainer->IsInNativeAnonymousSubtree() &&
@@ -7511,8 +7461,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
return;
}
-#ifdef MOZ_XUL
-
enum content_operation
{
CONTENT_INSERTED,
@@ -7549,7 +7497,6 @@ bool NotifyListBoxBody(nsPresContext* aPresContext,
return false;
}
-#endif // MOZ_XUL
void
nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer,
@@ -7632,7 +7579,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
NS_ASSERTION(isSingleInsert || aEndChild,
"range should not include all nodes after aStartChild");
-#ifdef MOZ_XUL
if (aContainer && IsXULListBox(aContainer)) {
if (isSingleInsert) {
if (NotifyListBoxBody(mPresShell->GetPresContext(), aContainer,
@@ -7651,7 +7597,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
return;
}
}
-#endif // MOZ_XUL
// If we have a null parent, then this must be the document element being
// inserted, or some other child of the document in the DOM (might be a PI,
@@ -8172,7 +8117,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
ClearDisplayContentsIn(aChild, aContainer);
}
-#ifdef MOZ_XUL
if (NotifyListBoxBody(presContext, aContainer, aChild, aOldNextSibling,
childFrame, CONTENT_REMOVED)) {
if (aFlags == REMOVE_DESTROY_FRAMES) {
@@ -8181,8 +8125,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
return;
}
-#endif // MOZ_XUL
-
// If we're removing the root, then make sure to remove things starting at
// the viewport's child instead of the primary frame (which might even be
// null if the root had an XBL binding or display:none, even though the
@@ -8774,11 +8716,9 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
"no support for fragmenting table captions yet");
newFrame = NS_NewBlockFrame(shell, styleContext);
newFrame->Init(content, aParentFrame, aFrame);
-#ifdef MOZ_XUL
} else if (nsGkAtoms::XULLabelFrame == frameType) {
newFrame = NS_NewXULLabelFrame(shell, styleContext);
newFrame->Init(content, aParentFrame, aFrame);
-#endif
} else if (nsGkAtoms::columnSetFrame == frameType) {
MOZ_ASSERT(!aFrame->IsTableCaption(),
"no support for fragmenting table captions yet");
@@ -9370,7 +9310,6 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(
return true;
}
-#ifdef MOZ_XUL
if (aFrame->GetType() == nsGkAtoms::popupSetFrame) {
nsIRootBox* rootBox = nsIRootBox::GetRootBox(mPresShell);
if (rootBox && rootBox->GetPopupSetFrame() == aFrame) {
@@ -9378,7 +9317,6 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(
return true;
}
}
-#endif
// Reconstruct if inflowFrame is parent's only child, and parent is, or has,
// a non-fluid continuation, i.e. it was split by bidi resolution
@@ -11487,7 +11425,6 @@ nsCSSFrameConstructor::CreateListBoxContent(nsContainerFrame* aParentFrame,
nsIFrame** aNewFrame,
bool aIsAppend)
{
-#ifdef MOZ_XUL
// Construct a new frame
if (nullptr != aParentFrame) {
nsFrameItems frameItems;
@@ -11544,7 +11481,6 @@ nsCSSFrameConstructor::CreateListBoxContent(nsContainerFrame* aParentFrame,
}
#endif
}
-#endif
}
//----------------------------------------
diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h
index 1df38b58a8..738ac82eca 100644
--- a/layout/base/nsCSSFrameConstructor.h
+++ b/layout/base/nsCSSFrameConstructor.h
@@ -633,11 +633,9 @@ private:
/* If FCDATA_MAY_NEED_SCROLLFRAME is set, the new frame should be wrapped in
a scrollframe if its overflow type so requires. */
#define FCDATA_MAY_NEED_SCROLLFRAME 0x80
-#ifdef MOZ_XUL
/* If FCDATA_IS_POPUP is set, the new frame is a XUL popup frame. These need
some really weird special handling. */
#define FCDATA_IS_POPUP 0x100
-#endif /* MOZ_XUL */
/* If FCDATA_SKIP_ABSPOS_PUSH is set, don't push this frame as an
absolute containing block, no matter what its style says. */
#define FCDATA_SKIP_ABSPOS_PUSH 0x200
@@ -1462,7 +1460,6 @@ private:
int32_t aNameSpaceID,
nsStyleContext* aStyleContext);
// XUL data-finding helper functions and structures
-#ifdef MOZ_XUL
static const FrameConstructionData*
FindPopupGroupData(Element* aElement, nsStyleContext* aStyleContext);
// sXULTextBoxData used for both labels and descriptions
@@ -1475,7 +1472,6 @@ private:
FindXULListBoxBodyData(Element* aElement, nsStyleContext* aStyleContext);
static const FrameConstructionData*
FindXULListItemData(Element* aElement, nsStyleContext* aStyleContext);
-#endif /* MOZ_XUL */
// Function to find FrameConstructionData for aContent using one of the XUL
// display types. Will return null if aDisplay doesn't have a XUL display
diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp
index d5df170203..70186df2be 100644
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -879,13 +879,7 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext,
bgContext->GetVisitedDependentColor(eCSSProperty_background_color);
nsRect innerRect;
- if (
-#ifdef MOZ_XUL
- aStyleContext->GetPseudoType() == CSSPseudoElementType::XULTree
-#else
- false
-#endif
- ) {
+ if (aStyleContext->GetPseudoType() == CSSPseudoElementType::XULTree) {
innerRect = aBorderArea;
} else {
innerRect = GetOutlineInnerRect(aForFrame) + aBorderArea.TopLeft();
diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp
index 2194a01f31..c79dde1a35 100644
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -832,7 +832,6 @@ size_t nsCaret::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
bool nsCaret::IsMenuPopupHidingCaret()
{
-#ifdef MOZ_XUL
// Check if there are open popups.
nsXULPopupManager *popMgr = nsXULPopupManager::GetInstance();
nsTArray<nsIFrame*> popups;
@@ -873,7 +872,6 @@ bool nsCaret::IsMenuPopupHidingCaret()
return true;
}
}
-#endif
// There are no open menu popups, no need to hide the caret.
return false;
diff --git a/layout/base/nsDisplayItemTypesList.h b/layout/base/nsDisplayItemTypesList.h
index cf809817ff..a46a0c0999 100644
--- a/layout/base/nsDisplayItemTypesList.h
+++ b/layout/base/nsDisplayItemTypesList.h
@@ -1,4 +1,9 @@
// IWYU pragma: private, include "nsDisplayList.h"
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * 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/.
+ */
DECLARE_DISPLAY_ITEM_TYPE(ALT_FEEDBACK)
DECLARE_DISPLAY_ITEM_TYPE(BACKGROUND)
DECLARE_DISPLAY_ITEM_TYPE(THEMED_BACKGROUND)
@@ -69,7 +74,6 @@ DECLARE_DISPLAY_ITEM_TYPE(ZOOM)
DECLARE_DISPLAY_ITEM_TYPE(REFLOW_COUNT)
#endif
-#ifdef MOZ_XUL
DECLARE_DISPLAY_ITEM_TYPE(XUL_EVENT_REDIRECTOR)
DECLARE_DISPLAY_ITEM_TYPE(XUL_GROUP_BACKGROUND)
DECLARE_DISPLAY_ITEM_TYPE(XUL_IMAGE)
@@ -79,7 +83,6 @@ DECLARE_DISPLAY_ITEM_TYPE(XUL_TREE_COL_SPLITTER_TARGET)
#ifdef DEBUG_LAYOUT
DECLARE_DISPLAY_ITEM_TYPE(XUL_DEBUG)
#endif
-#endif
DECLARE_DISPLAY_ITEM_TYPE(MATHML_BAR)
DECLARE_DISPLAY_ITEM_TYPE(MATHML_CHAR_FOREGROUND)
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index a0af38c289..f919e16477 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -64,10 +64,8 @@
#include "nsCopySupport.h"
#include "nsIDOMHTMLFrameSetElement.h"
#include "nsIDOMHTMLImageElement.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsXULPopupManager.h"
-#endif
#include "nsIClipboardHelper.h"
@@ -1395,11 +1393,9 @@ nsDocumentViewer::PageHide(bool aIsUnload)
EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);
}
-#ifdef MOZ_XUL
// look for open menupopups and close them after the unload event, in case
// the unload event listeners open any new popups
nsContentUtils::HidePopupsInDocument(mDocument);
-#endif
return NS_OK;
}
@@ -3583,7 +3579,6 @@ nsDocumentViewer::GetPopupNode(nsIDOMNode** aNode)
// get the popup node
nsCOMPtr<nsIDOMNode> node = root->GetPopupNode();
-#ifdef MOZ_XUL
if (!node) {
nsPIDOMWindowOuter* rootWindow = root->GetWindow();
if (rootWindow) {
@@ -3596,7 +3591,6 @@ nsDocumentViewer::GetPopupNode(nsIDOMNode** aNode)
}
}
}
-#endif
node.swap(*aNode);
}
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index ccdc5503f8..6c73db7e2e 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -118,11 +118,7 @@
#include "RegionBuilder.h"
#include "SVGSVGElement.h"
#include "nsDocument.h"
-
-#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
-#endif
-
#include "GeckoProfiler.h"
#include "nsAnimationManager.h"
#include "nsTransitionManager.h"
@@ -1443,7 +1439,6 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
} else {
id = nsIFrame::kAbsoluteList;
}
-#ifdef MOZ_XUL
} else if (StyleDisplay::Popup == disp->mDisplay) {
// Out-of-flows that are DISPLAY_POPUP must be kids of the root popup set
#ifdef DEBUG
@@ -1453,7 +1448,6 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
#endif // DEBUG
id = nsIFrame::kPopupList;
-#endif // MOZ_XUL
} else {
NS_ASSERTION(aChildFrame->IsFloating(), "not a floated frame");
id = nsIFrame::kFloatList;
@@ -2280,7 +2274,6 @@ nsIFrame*
nsLayoutUtils::GetPopupFrameForEventCoordinates(nsPresContext* aPresContext,
const WidgetEvent* aEvent)
{
-#ifdef MOZ_XUL
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
if (!pm) {
return nullptr;
@@ -2297,7 +2290,6 @@ nsLayoutUtils::GetPopupFrameForEventCoordinates(nsPresContext* aPresContext,
return popup;
}
}
-#endif
return nullptr;
}
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 37475d9595..eeb059f278 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -149,7 +149,6 @@
// For style data reconstruction
#include "nsStyleChangeList.h"
#include "nsCSSFrameConstructor.h"
-#ifdef MOZ_XUL
#include "nsMenuFrame.h"
#include "nsTreeBodyFrame.h"
#include "nsIBoxObject.h"
@@ -159,9 +158,6 @@
#include "nsIDOMXULMultSelectCntrlEl.h"
#include "nsIDOMXULSelectCntrlItemEl.h"
#include "nsIDOMXULMenuListElement.h"
-
-#endif
-
#include "GeckoProfiler.h"
#include "gfxPlatform.h"
#include "Layers.h"
@@ -951,9 +947,7 @@ PresShell::Init(nsIDocument* aDocument,
os->AddObserver(this, "agent-sheet-removed", false);
os->AddObserver(this, "user-sheet-removed", false);
os->AddObserver(this, "author-sheet-removed", false);
-#ifdef MOZ_XUL
os->AddObserver(this, "chrome-flush-skin-caches", false);
-#endif
os->AddObserver(this, "memory-pressure", false);
}
}
@@ -1165,9 +1159,7 @@ PresShell::Destroy()
os->RemoveObserver(this, "agent-sheet-removed");
os->RemoveObserver(this, "user-sheet-removed");
os->RemoveObserver(this, "author-sheet-removed");
-#ifdef MOZ_XUL
os->RemoveObserver(this, "chrome-flush-skin-caches");
-#endif
os->RemoveObserver(this, "memory-pressure");
}
}
@@ -8336,7 +8328,6 @@ PresShell::HandleDOMEventWithTarget(nsIContent* aTargetContent,
bool
PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
{
-#ifdef MOZ_XUL
// if a menu is open, open the context menu relative to the active item on the menu.
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
if (pm) {
@@ -8359,7 +8350,6 @@ PresShell::AdjustContextMenuKeyEvent(WidgetMouseEvent* aEvent)
return true;
}
}
-#endif
// If we're here because of the key-equiv for showing context menus, we
// have to twiddle with the NS event to make sure the context menu comes
@@ -8562,7 +8552,6 @@ PresShell::GetCurrentItemAndPositionForElement(nsIDOMElement *aCurrentEl,
bool istree = false, checkLineHeight = true;
nscoord extraTreeY = 0;
-#ifdef MOZ_XUL
// Set the position to just underneath the current item for multi-select
// lists or just underneath the selected item for single-select lists. If
// the element is not a list, or there is no selection, leave the position
@@ -8635,7 +8624,6 @@ PresShell::GetCurrentItemAndPositionForElement(nsIDOMElement *aCurrentEl,
if (item)
focusedContent = do_QueryInterface(item);
-#endif
nsIFrame *frame = focusedContent->GetPrimaryFrame();
if (frame) {
@@ -9411,7 +9399,6 @@ PresShell::WindowSizeMoveDone()
}
}
-#ifdef MOZ_XUL
/*
* It's better to add stuff to the |DidSetStyleContext| method of the
* relevant frames than adding it here. These methods should (ideally,
@@ -9475,7 +9462,6 @@ WalkFramesThroughPlaceholders(nsPresContext *aPresContext, nsIFrame *aFrame,
}
}
}
-#endif
NS_IMETHODIMP
PresShell::Observe(nsISupports* aSubject,
@@ -9487,7 +9473,6 @@ PresShell::Observe(nsISupports* aSubject,
return NS_OK;
}
-#ifdef MOZ_XUL
if (!nsCRT::strcmp(aTopic, "chrome-flush-skin-caches")) {
nsIFrame *rootFrame = mFrameConstructor->GetRootFrame();
// Need to null-check because "chrome-flush-skin-caches" can happen
@@ -9527,7 +9512,6 @@ PresShell::Observe(nsISupports* aSubject,
}
return NS_OK;
}
-#endif
if (!nsCRT::strcmp(aTopic, "agent-sheet-added")) {
if (mStyleSet) {
diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp
index 3c6f5f3aa5..207ce6f2f9 100644
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -136,15 +136,12 @@ class nsIDocumentLoaderFactory;
#include "nsIBoxObject.h"
-#ifdef MOZ_XUL
#include "inDOMView.h"
-#endif /* MOZ_XUL */
#include "inDeepTreeWalker.h"
#include "inCSSValueSearch.h"
#include "inDOMUtils.h"
-#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsIXULSortService.h"
@@ -153,7 +150,6 @@ NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
nsresult
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
-#endif
static void Shutdown();
@@ -331,14 +327,12 @@ nsresult NS_NewLayoutDebugger(nsILayoutDebugger** aResult);
nsresult NS_NewBoxObject(nsIBoxObject** aResult);
-#ifdef MOZ_XUL
nsresult NS_NewListBoxObject(nsIBoxObject** aResult);
nsresult NS_NewScrollBoxObject(nsIBoxObject** aResult);
nsresult NS_NewMenuBoxObject(nsIBoxObject** aResult);
nsresult NS_NewPopupBoxObject(nsIBoxObject** aResult);
nsresult NS_NewContainerBoxObject(nsIBoxObject** aResult);
nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult);
-#endif
nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** aResult);
@@ -401,18 +395,14 @@ MAKE_CTOR(CreateNewLayoutDebugger, nsILayoutDebugger, NS_NewLay
MAKE_CTOR(CreateNewFrameTraversal, nsIFrameTraversal, NS_CreateFrameTraversal)
MAKE_CTOR(CreateNewBoxObject, nsIBoxObject, NS_NewBoxObject)
-#ifdef MOZ_XUL
MAKE_CTOR(CreateNewListBoxObject, nsIBoxObject, NS_NewListBoxObject)
MAKE_CTOR(CreateNewMenuBoxObject, nsIBoxObject, NS_NewMenuBoxObject)
MAKE_CTOR(CreateNewPopupBoxObject, nsIBoxObject, NS_NewPopupBoxObject)
MAKE_CTOR(CreateNewScrollBoxObject, nsIBoxObject, NS_NewScrollBoxObject)
MAKE_CTOR(CreateNewTreeBoxObject, nsIBoxObject, NS_NewTreeBoxObject)
MAKE_CTOR(CreateNewContainerBoxObject, nsIBoxObject, NS_NewContainerBoxObject)
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMView)
-#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(inDeepTreeWalker)
NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
@@ -433,13 +423,11 @@ MAKE_CTOR(CreateHTMLContentSerializer, nsIContentSerializer, NS_NewHTM
MAKE_CTOR(CreateXHTMLContentSerializer, nsIContentSerializer, NS_NewXHTMLContentSerializer)
MAKE_CTOR(CreatePlainTextSerializer, nsIContentSerializer, NS_NewPlainTextSerializer)
MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy)
-#ifdef MOZ_XUL
MAKE_CTOR(CreateXULSortService, nsIXULSortService, NS_NewXULSortService)
// NS_NewXULContentBuilder
// NS_NewXULTreeBuilder
MAKE_CTOR(CreateXULDocument, nsIXULDocument, NS_NewXULDocument)
// NS_NewXULControllers
-#endif
MAKE_CTOR(CreateContentDLF, nsIDocumentLoaderFactory, NS_NewContentDocumentLoaderFactory)
MAKE_CTOR(CreateEventListenerService, nsIEventListenerService, NS_NewEventListenerService)
MAKE_CTOR(CreateGlobalMessageManager, nsIMessageBroadcaster, NS_NewGlobalMessageManager)
@@ -549,17 +537,13 @@ NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGER_CID);
#endif
NS_DEFINE_NAMED_CID(NS_FRAMETRAVERSAL_CID);
NS_DEFINE_NAMED_CID(NS_BOXOBJECT_CID);
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_LISTBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_MENUBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_POPUPBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_CONTAINERBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_SCROLLBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_TREEBOXOBJECT_CID);
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(IN_DOMVIEW_CID);
-#endif
NS_DEFINE_NAMED_CID(IN_DEEPTREEWALKER_CID);
NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CID);
NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID);
@@ -585,12 +569,10 @@ NS_DEFINE_NAMED_CID(NS_CONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_DATADOCUMENTCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_NODATAPROTOCOLCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_XULCONTROLLERS_CID);
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_XULSORTSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_XULTEMPLATEBUILDER_CID);
NS_DEFINE_NAMED_CID(NS_XULTREEBUILDER_CID);
NS_DEFINE_NAMED_CID(NS_XULDOCUMENT_CID);
-#endif
NS_DEFINE_NAMED_CID(NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID);
NS_DEFINE_NAMED_CID(NS_JSPROTOCOLHANDLER_CID);
NS_DEFINE_NAMED_CID(NS_JSURI_CID);
@@ -802,17 +784,13 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
#endif
{ &kNS_FRAMETRAVERSAL_CID, false, nullptr, CreateNewFrameTraversal },
{ &kNS_BOXOBJECT_CID, false, nullptr, CreateNewBoxObject },
-#ifdef MOZ_XUL
{ &kNS_LISTBOXOBJECT_CID, false, nullptr, CreateNewListBoxObject },
{ &kNS_MENUBOXOBJECT_CID, false, nullptr, CreateNewMenuBoxObject },
{ &kNS_POPUPBOXOBJECT_CID, false, nullptr, CreateNewPopupBoxObject },
{ &kNS_CONTAINERBOXOBJECT_CID, false, nullptr, CreateNewContainerBoxObject },
{ &kNS_SCROLLBOXOBJECT_CID, false, nullptr, CreateNewScrollBoxObject },
{ &kNS_TREEBOXOBJECT_CID, false, nullptr, CreateNewTreeBoxObject },
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
{ &kIN_DOMVIEW_CID, false, nullptr, inDOMViewConstructor },
-#endif
{ &kIN_DEEPTREEWALKER_CID, false, nullptr, inDeepTreeWalkerConstructor },
{ &kIN_CSSVALUESEARCH_CID, false, nullptr, inCSSValueSearchConstructor },
{ &kIN_DOMUTILS_CID, false, nullptr, inDOMUtilsConstructor },
@@ -838,12 +816,10 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_DATADOCUMENTCONTENTPOLICY_CID, false, nullptr, nsDataDocumentContentPolicyConstructor },
{ &kNS_NODATAPROTOCOLCONTENTPOLICY_CID, false, nullptr, nsNoDataProtocolContentPolicyConstructor },
{ &kNS_XULCONTROLLERS_CID, false, nullptr, NS_NewXULControllers },
-#ifdef MOZ_XUL
{ &kNS_XULSORTSERVICE_CID, false, nullptr, CreateXULSortService },
{ &kNS_XULTEMPLATEBUILDER_CID, false, nullptr, NS_NewXULContentBuilder },
{ &kNS_XULTREEBUILDER_CID, false, nullptr, NS_NewXULTreeBuilder },
{ &kNS_XULDOCUMENT_CID, false, nullptr, CreateXULDocument },
-#endif
{ &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID, false, nullptr, CreateContentDLF },
{ &kNS_JSPROTOCOLHANDLER_CID, false, nullptr, nsJSProtocolHandler::Create },
{ &kNS_JSURI_CID, false, nullptr, nsJSURIConstructor },
@@ -919,17 +895,13 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
XPCONNECT_CONTRACTS
{ "@mozilla.org/layout/xul-boxobject;1", &kNS_BOXOBJECT_CID },
-#ifdef MOZ_XUL
{ "@mozilla.org/layout/xul-boxobject-listbox;1", &kNS_LISTBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-menu;1", &kNS_MENUBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-popup;1", &kNS_POPUPBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-container;1", &kNS_CONTAINERBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-scrollbox;1", &kNS_SCROLLBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-tree;1", &kNS_TREEBOXOBJECT_CID },
-#endif // MOZ_XUL
-#ifdef MOZ_XUL
{ "@mozilla.org/inspector/dom-view;1", &kIN_DOMVIEW_CID },
-#endif
{ "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID },
{ "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID },
{ IN_DOMUTILS_CONTRACTID, &kIN_DOMUTILS_CID },
@@ -960,12 +932,10 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
{ NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, &kNS_DATADOCUMENTCONTENTPOLICY_CID },
{ NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, &kNS_NODATAPROTOCOLCONTENTPOLICY_CID },
{ "@mozilla.org/xul/xul-controllers;1", &kNS_XULCONTROLLERS_CID },
-#ifdef MOZ_XUL
{ "@mozilla.org/xul/xul-sort-service;1", &kNS_XULSORTSERVICE_CID },
{ "@mozilla.org/xul/xul-template-builder;1", &kNS_XULTEMPLATEBUILDER_CID },
{ "@mozilla.org/xul/xul-tree-builder;1", &kNS_XULTREEBUILDER_CID },
{ "@mozilla.org/xul/xul-document;1", &kNS_XULDOCUMENT_CID },
-#endif
{ CONTENT_DLF_CONTRACTID, &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID },
{ NS_JSPROTOCOLHANDLER_CONTRACTID, &kNS_JSPROTOCOLHANDLER_CID },
{ NS_WINDOWCONTROLLER_CONTRACTID, &kNS_WINDOWCONTROLLER_CID },
diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp
index 014176f03c..e9095ce03e 100644
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -75,7 +75,6 @@
#include "mozilla/dom/PromiseDebugging.h"
#include "mozilla/dom/WebCryptoThreadPool.h"
-#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
#include "nsXULContentUtils.h"
#include "nsXULPrototypeCache.h"
@@ -84,7 +83,6 @@
#include "inDOMView.h"
#include "nsMenuBarListener.h"
-#endif
#include "nsTextServicesDocument.h"
@@ -208,15 +206,12 @@ nsLayoutStatics::Initialize()
return rv;
}
-#ifdef MOZ_XUL
rv = nsXULContentUtils::Init();
if (NS_FAILED(rv)) {
NS_ERROR("Could not initialize nsXULContentUtils");
return rv;
}
-#endif
-
nsMathMLOperators::AddRefTable();
#ifdef DEBUG
@@ -245,13 +240,11 @@ nsLayoutStatics::Initialize()
nsCSSParser::Startup();
nsCSSRuleProcessor::Startup();
-#ifdef MOZ_XUL
rv = nsXULPopupManager::Init();
if (NS_FAILED(rv)) {
NS_ERROR("Could not initialize nsXULPopupManager");
return rv;
}
-#endif
rv = nsFocusManager::Init();
if (NS_FAILED(rv)) {
@@ -288,9 +281,7 @@ nsLayoutStatics::Initialize()
HTMLVideoElement::Init();
-#ifdef MOZ_XUL
nsMenuBarListener::InitializeStatics();
-#endif
CacheObserver::Init();
@@ -328,9 +319,7 @@ nsLayoutStatics::Shutdown()
nsMessageManagerScriptExecutor::Shutdown();
nsFocusManager::Shutdown();
-#ifdef MOZ_XUL
nsXULPopupManager::Shutdown();
-#endif
DOMStorageObserver::Shutdown();
txMozillaXSLTProcessor::Shutdown();
Attr::Shutdown();
@@ -355,11 +344,9 @@ nsLayoutStatics::Shutdown()
nsStackLayout::Shutdown();
nsBox::Shutdown();
-#ifdef MOZ_XUL
nsXULContentUtils::Finish();
nsXULPrototypeCache::ReleaseGlobals();
nsSprocketLayout::Shutdown();
-#endif
SVGElementFactory::Shutdown();
nsMathMLOperators::ReleaseTable();
diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp
index 077c68b5be..0c3fef3825 100644
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -507,9 +507,7 @@ static bool
IsQuirkContainingBlockHeight(const ReflowInput* rs, nsIAtom* aFrameType)
{
if (nsGkAtoms::blockFrame == aFrameType ||
-#ifdef MOZ_XUL
nsGkAtoms::XULLabelFrame == aFrameType ||
-#endif
nsGkAtoms::scrollFrame == aFrameType) {
// Note: This next condition could change due to a style change,
// but that would cause a style reflow anyway, which means we're ok.
@@ -1950,9 +1948,7 @@ CalcQuirkContainingBlockHeight(const ReflowInput* aCBReflowInput)
// if the ancestor is auto height then skip it and continue up if it
// is the first block frame and possibly the body/html
if (nsGkAtoms::blockFrame == frameType ||
-#ifdef MOZ_XUL
nsGkAtoms::XULLabelFrame == frameType ||
-#endif
nsGkAtoms::scrollFrame == frameType) {
secondAncestorRI = firstAncestorRI;
diff --git a/layout/generic/TextOverflow.cpp b/layout/generic/TextOverflow.cpp
index 3d78eaf911..d4d5b04afb 100644
--- a/layout/generic/TextOverflow.cpp
+++ b/layout/generic/TextOverflow.cpp
@@ -288,7 +288,6 @@ TextOverflow::TextOverflow(nsDisplayListBuilder* aBuilder,
, mBlockWM(aBlockFrame->GetWritingMode())
, mAdjustForPixelSnapping(false)
{
-#ifdef MOZ_XUL
if (!mScrollableFrame) {
nsIAtom* pseudoType = aBlockFrame->StyleContext()->GetPseudo();
if (pseudoType == nsCSSAnonBoxes::mozXULAnonymousBlock) {
@@ -301,7 +300,7 @@ TextOverflow::TextOverflow(nsDisplayListBuilder* aBuilder,
mAdjustForPixelSnapping = !mBlockWM.IsBidiLTR();
}
}
-#endif
+
mCanHaveInlineAxisScrollbar = false;
if (mScrollableFrame) {
auto scrollbarStyle = mBlockWM.IsVertical() ?
diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp
index 45c28c6107..125d602635 100644
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -394,12 +394,11 @@ ReparentFrameViewTo(nsIFrame* aFrame,
nsView* aOldParentView)
{
if (aFrame->HasView()) {
-#ifdef MOZ_XUL
if (aFrame->GetType() == nsGkAtoms::menuPopupFrame) {
// This view must be parented by the root view, don't reparent it.
return;
}
-#endif
+
nsView* view = aFrame->GetView();
// Verify that the current parent view is what we think it is
//nsView* parentView;
@@ -652,7 +651,6 @@ nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
nsRenderingContext* aRC,
uint32_t aFlags)
{
-#ifdef MOZ_XUL
if (!aView || !nsCSSRendering::IsCanvasFrame(aFrame) || !aView->HasWidget())
return;
@@ -716,7 +714,6 @@ nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
nsSize maxSize = rootFrame->GetXULMaxSize(aState);
SetSizeConstraints(aPresContext, windowWidget, minSize, maxSize);
-#endif
}
void nsContainerFrame::SetSizeConstraints(nsPresContext* aPresContext,
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index b8e66ecbcd..14d411e6ab 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10759,12 +10759,10 @@ void DR_State::InitFrameTypeTable()
AddFrameTypeInfo(nsGkAtoms::textInputFrame, "textCtl", "textInput");
AddFrameTypeInfo(nsGkAtoms::textFrame, "text", "text");
AddFrameTypeInfo(nsGkAtoms::viewportFrame, "VP", "viewport");
-#ifdef MOZ_XUL
AddFrameTypeInfo(nsGkAtoms::XULLabelFrame, "XULLabel", "XULLabel");
AddFrameTypeInfo(nsGkAtoms::boxFrame, "Box", "Box");
AddFrameTypeInfo(nsGkAtoms::sliderFrame, "Slider", "Slider");
AddFrameTypeInfo(nsGkAtoms::popupSetFrame, "PopupSet", "PopupSet");
-#endif
AddFrameTypeInfo(nullptr, "unknown", "unknown");
}
@@ -11382,10 +11380,8 @@ ReflowInput::DisplayInitFrameTypeExit(nsIFrame* aFrame,
"grid", "inline-grid", "ruby", "ruby-base", "ruby-base-container",
"ruby-text", "ruby-text-container", "contents", "-webkit-box",
"-webkit-inline-box", "box", "inline-box",
-#ifdef MOZ_XUL
"grid", "inline-grid", "grid-group", "grid-line", "stack",
"inline-stack", "deck", "groupbox", "popup",
-#endif
};
const uint32_t display = static_cast<uint32_t>(disp->mDisplay);
if (display >= ArrayLength(displayTypes))
diff --git a/layout/inspector/moz.build b/layout/inspector/moz.build
index 3bc757a560..0fed1f1b01 100644
--- a/layout/inspector/moz.build
+++ b/layout/inspector/moz.build
@@ -29,17 +29,13 @@ SOURCES += [
'inCSSValueSearch.cpp',
'inDeepTreeWalker.cpp',
'inDOMUtils.cpp',
+ 'inDOMView.cpp',
'inLayoutUtils.cpp',
'inSearchLoop.cpp',
'nsFontFace.cpp',
'nsFontFaceList.cpp',
]
-if CONFIG['MOZ_XUL']:
- SOURCES += [
- 'inDOMView.cpp',
- ]
-
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../style',
diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp
index 155ecbeeef..a28a1053f0 100644
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -5,13 +5,6 @@
* 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/.
*
- * This Original Code has been modified by IBM Corporation.
- * Modifications made by IBM described herein are Copyright (c)
- * International Business Machines Corporation, 2000. Modifications
- * to Mozilla code or documentation identified per MPL Section 3.3
- *
- * Date Modified by Description of modification
- * 04/20/2000 IBM Corp. OS/2 VisualAge build.
*/
/* loading of CSS style sheets using the network APIs */
@@ -58,9 +51,7 @@
#include "mozilla/StyleSheetInlines.h"
#include "mozilla/ConsoleReportCollector.h"
-#ifdef MOZ_XUL
#include "nsXULPrototypeCache.h"
-#endif
#include "nsIMediaList.h"
#include "nsIDOMStyleSheet.h"
@@ -1104,7 +1095,6 @@ Loader::CreateSheet(nsIURI* aURI,
RefPtr<StyleSheet> sheet;
// First, the XUL cache
-#ifdef MOZ_XUL
if (IsChromeURI(aURI)) {
nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance();
if (cache) {
@@ -1114,7 +1104,6 @@ Loader::CreateSheet(nsIURI* aURI,
}
}
}
-#endif
bool fromCompleteSheets = false;
if (!sheet) {
@@ -1945,7 +1934,6 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
}
data = data->mNext;
}
-#ifdef MOZ_XUL
if (IsChromeURI(aLoadData->mURI)) {
nsXULPrototypeCache* cache = nsXULPrototypeCache::GetInstance();
if (cache && cache->IsEnabled()) {
@@ -1956,9 +1944,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
cache->PutStyleSheet(sheet);
}
}
- }
- else {
-#endif
+ } else {
URIPrincipalReferrerPolicyAndCORSModeHashKey key(aLoadData->mURI,
aLoadData->mLoaderPrincipal,
aLoadData->mSheet->GetCORSMode(),
@@ -1966,9 +1952,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
NS_ASSERTION(sheet->IsComplete(),
"Should only be caching complete sheets");
mSheets->mCompleteSheets.Put(&key, sheet);
-#ifdef MOZ_XUL
}
-#endif
} else {
NS_WARNING("stylo: Stylesheet caching not yet supported - see bug 1290218.");
}
diff --git a/layout/style/SVGAttrAnimationRuleProcessor.cpp b/layout/style/SVGAttrAnimationRuleProcessor.cpp
index 9eb31b1b23..edc468003b 100644
--- a/layout/style/SVGAttrAnimationRuleProcessor.cpp
+++ b/layout/style/SVGAttrAnimationRuleProcessor.cpp
@@ -92,14 +92,12 @@ SVGAttrAnimationRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData)
// see comment in RulesMatching(PseudoElementRuleProcessorData*).
}
-#ifdef MOZ_XUL
/* virtual */ void
SVGAttrAnimationRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData)
{
// If SMIL Animation of SVG attributes can ever target XUL tree pseudos,
// see comment in RulesMatching(PseudoElementRuleProcessorData*).
}
-#endif
/* virtual */ size_t
SVGAttrAnimationRuleProcessor::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
diff --git a/layout/style/SVGAttrAnimationRuleProcessor.h b/layout/style/SVGAttrAnimationRuleProcessor.h
index 1750c761bd..f5aa0aaf37 100644
--- a/layout/style/SVGAttrAnimationRuleProcessor.h
+++ b/layout/style/SVGAttrAnimationRuleProcessor.h
@@ -37,9 +37,7 @@ public:
virtual void RulesMatching(ElementRuleProcessorData* aData) override;
virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override;
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override;
diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp
index 8fde725349..6fad62f8b6 100644
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -489,17 +489,11 @@ int32_t nsCSSSelector::CalcWeightWithoutNegations() const
{
int32_t weight = 0;
-#ifdef MOZ_XUL
MOZ_ASSERT(!(IsPseudoElement() &&
PseudoType() != CSSPseudoElementType::XULTree &&
mClassList),
"If non-XUL-tree pseudo-elements can have class selectors "
"after them, specificity calculation must be updated");
-#else
- MOZ_ASSERT(!(IsPseudoElement() && mClassList),
- "If pseudo-elements can have class selectors "
- "after them, specificity calculation must be updated");
-#endif
MOZ_ASSERT(!(IsPseudoElement() && (mIDList || mAttrList)),
"If pseudo-elements can have id or attribute selectors "
"after them, specificity calculation must be updated");
@@ -513,13 +507,11 @@ int32_t nsCSSSelector::CalcWeightWithoutNegations() const
list = list->mNext;
}
list = mClassList;
-#ifdef MOZ_XUL
// XUL tree pseudo-elements abuse mClassList to store some private
// data; ignore that.
if (PseudoType() == CSSPseudoElementType::XULTree) {
list = nullptr;
}
-#endif
while (nullptr != list) {
weight += 0x000100;
list = list->mNext;
@@ -793,7 +785,6 @@ nsCSSSelector::AppendToStringWithoutCombinatorsOrNegations
// Append each class in the linked list
if (mClassList) {
if (isPseudoElement) {
-#ifdef MOZ_XUL
MOZ_ASSERT(nsCSSAnonBoxes::IsTreePseudoElement(mLowercaseTag),
"must be tree pseudo-element");
@@ -804,9 +795,6 @@ nsCSSSelector::AppendToStringWithoutCombinatorsOrNegations
}
// replace the final comma with a close-paren
aString.Replace(aString.Length() - 1, 1, char16_t(')'));
-#else
- NS_ERROR("Can't happen");
-#endif
} else {
nsAtomList* list = mClassList;
while (list != nullptr) {
diff --git a/layout/style/nsCSSAnonBoxList.h b/layout/style/nsCSSAnonBoxList.h
index bb44215f18..fb97bff4dc 100644
--- a/layout/style/nsCSSAnonBoxList.h
+++ b/layout/style/nsCSSAnonBoxList.h
@@ -82,7 +82,6 @@ CSS_ANON_BOX(rubyBaseContainer, ":-moz-ruby-base-container")
CSS_ANON_BOX(rubyText, ":-moz-ruby-text")
CSS_ANON_BOX(rubyTextContainer, ":-moz-ruby-text-container")
-#ifdef MOZ_XUL
CSS_ANON_BOX(moztreecolumn, ":-moz-tree-column")
CSS_ANON_BOX(moztreerow, ":-moz-tree-row")
CSS_ANON_BOX(moztreeseparator, ":-moz-tree-separator")
@@ -95,7 +94,6 @@ CSS_ANON_BOX(moztreecelltext, ":-moz-tree-cell-text")
CSS_ANON_BOX(moztreecheckbox, ":-moz-tree-checkbox")
CSS_ANON_BOX(moztreeprogressmeter, ":-moz-tree-progressmeter")
CSS_ANON_BOX(moztreedropfeedback, ":-moz-tree-drop-feedback")
-#endif
CSS_ANON_BOX(mozSVGMarkerAnonChild, ":-moz-svg-marker-anon-child")
CSS_ANON_BOX(mozSVGOuterSVGAnonChild, ":-moz-svg-outer-svg-anon-child")
diff --git a/layout/style/nsCSSAnonBoxes.cpp b/layout/style/nsCSSAnonBoxes.cpp
index 3585c9e38d..0c0adbb1d1 100644
--- a/layout/style/nsCSSAnonBoxes.cpp
+++ b/layout/style/nsCSSAnonBoxes.cpp
@@ -42,11 +42,9 @@ bool nsCSSAnonBoxes::IsAnonBox(nsIAtom *aAtom)
ArrayLength(CSSAnonBoxes_info));
}
-#ifdef MOZ_XUL
/* static */ bool
nsCSSAnonBoxes::IsTreePseudoElement(nsIAtom* aPseudo)
{
return StringBeginsWith(nsDependentAtomString(aPseudo),
NS_LITERAL_STRING(":-moz-tree-"));
}
-#endif
diff --git a/layout/style/nsCSSAnonBoxes.h b/layout/style/nsCSSAnonBoxes.h
index f631f88013..ed55eef442 100644
--- a/layout/style/nsCSSAnonBoxes.h
+++ b/layout/style/nsCSSAnonBoxes.h
@@ -20,9 +20,7 @@ public:
static void AddRefAtoms();
static bool IsAnonBox(nsIAtom *aAtom);
-#ifdef MOZ_XUL
static bool IsTreePseudoElement(nsIAtom* aPseudo);
-#endif
static bool IsNonElement(nsIAtom* aPseudo)
{ return aPseudo == mozText || aPseudo == mozOtherNonElement; }
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
index 9866dd09e8..3d5edbd0ee 100644
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -863,9 +863,7 @@ protected:
};
PriorityParsingStatus ParsePriority();
-#ifdef MOZ_XUL
bool ParseTreePseudoElement(nsAtomList **aPseudoElementArgs);
-#endif
// Property specific parsing routines
bool ParseImageLayers(const nsCSSPropertyID aTable[]);
@@ -6052,7 +6050,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
}
}
-#ifdef MOZ_XUL
isTreePseudo = (pseudoElementType == CSSPseudoElementType::XULTree);
// If a tree pseudo-element is using the function syntax, it will
// get isTree set here and will pass the check below that only
@@ -6062,7 +6059,7 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
// pseudo-elements are allowed to be either functions or not, as
// desired.
bool isTree = (eCSSToken_Function == mToken.mType) && isTreePseudo;
-#endif
+
bool isPseudoElement = (pseudoElementType < CSSPseudoElementType::Count);
// anonymous boxes are only allowed if they're the tree boxes or we have
// enabled agent rules
@@ -6088,10 +6085,7 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
// If it's a function token, it better be on our "ok" list, and if the name
// is that of a function pseudo it better be a function token
if ((eCSSToken_Function == mToken.mType) !=
- (
-#ifdef MOZ_XUL
- isTree ||
-#endif
+ (isTree ||
CSSPseudoClassType::negation == pseudoClassType ||
nsCSSPseudoClasses::HasStringArg(pseudoClassType) ||
nsCSSPseudoClasses::HasNthPairArg(pseudoClassType) ||
@@ -6185,11 +6179,8 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
// various -moz-* pseudo-elements) must have |parsingPseudoElement|
// set.
if (!parsingPseudoElement &&
- !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo)
-#ifdef MOZ_XUL
- && !isTreePseudo
-#endif
- ) {
+ !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo) &&
+ !isTreePseudo) {
REPORT_UNEXPECTED_TOKEN(PEPseudoSelNewStyleOnly);
UngetToken();
return eSelectorParsingStatus_Error;
@@ -6200,7 +6191,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
NS_ADDREF(*aPseudoElement = pseudo);
*aPseudoElementType = pseudoElementType;
-#ifdef MOZ_XUL
if (isTree) {
// We have encountered a pseudoelement of the form
// -moz-tree-xxxx(a,b,c). We parse (a,b,c) and add each
@@ -6210,7 +6200,6 @@ CSSParserImpl::ParsePseudoSelector(int32_t& aDataMask,
return eSelectorParsingStatus_Error;
}
}
-#endif
// Pseudo-elements can only be followed by user action pseudo-classes
// or be the end of the selector. So the next non-whitespace token must
@@ -7096,7 +7085,6 @@ CSSParserImpl::ParseRGBColor(ComponentType& aR,
return false;
}
-#ifdef MOZ_XUL
bool
CSSParserImpl::ParseTreePseudoElement(nsAtomList **aPseudoElementArgs)
{
@@ -7122,7 +7110,6 @@ CSSParserImpl::ParseTreePseudoElement(nsAtomList **aPseudoElementArgs)
fakeSelector.mClassList = nullptr;
return true;
}
-#endif
nsCSSKeyword
CSSParserImpl::LookupKeywordPrefixAware(nsAString& aKeywordStr,
diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp
index 461b3e3ee3..756e3eb25c 100644
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -1316,7 +1316,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = {
// nsCSSFrameConstructor::ConstructXULFrame
{ eCSSKeyword__moz_box, StyleDisplay::Box },
{ eCSSKeyword__moz_inline_box, StyleDisplay::InlineBox },
-#ifdef MOZ_XUL
{ eCSSKeyword__moz_grid, StyleDisplay::XulGrid },
{ eCSSKeyword__moz_inline_grid, StyleDisplay::InlineXulGrid },
{ eCSSKeyword__moz_grid_group, StyleDisplay::XulGridGroup },
@@ -1326,7 +1325,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = {
{ eCSSKeyword__moz_deck, StyleDisplay::Deck },
{ eCSSKeyword__moz_popup, StyleDisplay::Popup },
{ eCSSKeyword__moz_groupbox, StyleDisplay::Groupbox },
-#endif
{ eCSSKeyword_flex, StyleDisplay::Flex },
{ eCSSKeyword_inline_flex, StyleDisplay::InlineFlex },
{ eCSSKeyword_ruby, StyleDisplay::Ruby },
diff --git a/layout/style/nsCSSPseudoElements.cpp b/layout/style/nsCSSPseudoElements.cpp
index ef09f2d42a..49621374fe 100644
--- a/layout/style/nsCSSPseudoElements.cpp
+++ b/layout/style/nsCSSPseudoElements.cpp
@@ -92,11 +92,9 @@ nsCSSPseudoElements::GetPseudoType(nsIAtom *aAtom, EnabledState aEnabledState)
}
if (nsCSSAnonBoxes::IsAnonBox(aAtom)) {
-#ifdef MOZ_XUL
if (nsCSSAnonBoxes::IsTreePseudoElement(aAtom)) {
return Type::XULTree;
}
-#endif
return Type::AnonBox;
}
diff --git a/layout/style/nsCSSPseudoElements.h b/layout/style/nsCSSPseudoElements.h
index 22c744ad06..90db43c7d3 100644
--- a/layout/style/nsCSSPseudoElements.h
+++ b/layout/style/nsCSSPseudoElements.h
@@ -55,9 +55,7 @@ enum class CSSPseudoElementType : CSSPseudoElementTypeBase {
#undef CSS_PSEUDO_ELEMENT
Count,
AnonBox = Count,
-#ifdef MOZ_XUL
XULTree,
-#endif
NotPseudo,
MAX
};
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
index 6de279ac5c..aed26a1c01 100644
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -853,9 +853,7 @@ struct RuleCascadeData {
// case-sensitive match.
mAttributeSelectors(&AtomSelector_CSOps, sizeof(AtomSelectorEntry)),
mAnonBoxRules(&RuleHash_TagTable_Ops, sizeof(RuleHashTagTableEntry)),
-#ifdef MOZ_XUL
mXULTreeRules(&RuleHash_TagTable_Ops, sizeof(RuleHashTagTableEntry)),
-#endif
mKeyframesRuleTable(),
mCounterStyleRuleTable(),
mCacheKey(aMedium),
@@ -885,9 +883,7 @@ struct RuleCascadeData {
nsTArray<nsCSSSelector*> mPossiblyNegatedIDSelectors;
PLDHashTable mAttributeSelectors;
PLDHashTable mAnonBoxRules;
-#ifdef MOZ_XUL
PLDHashTable mXULTreeRules;
-#endif
nsTArray<nsFontFaceRuleContainer> mFontFaceRules;
nsTArray<nsCSSKeyframesRule*> mKeyframesRules;
@@ -940,9 +936,7 @@ RuleCascadeData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
n += SizeOfSelectorsHashTable(mAttributeSelectors, aMallocSizeOf);
n += SizeOfRuleHashTable(mAnonBoxRules, aMallocSizeOf);
-#ifdef MOZ_XUL
n += SizeOfRuleHashTable(mXULTreeRules, aMallocSizeOf);
-#endif
n += mFontFaceRules.ShallowSizeOfExcludingThis(aMallocSizeOf);
n += mKeyframesRules.ShallowSizeOfExcludingThis(aMallocSizeOf);
@@ -2589,7 +2583,6 @@ nsCSSRuleProcessor::RulesMatching(AnonBoxRuleProcessorData* aData)
}
}
-#ifdef MOZ_XUL
/* virtual */ void
nsCSSRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData)
{
@@ -2612,7 +2605,6 @@ nsCSSRuleProcessor::RulesMatching(XULTreeRuleProcessorData* aData)
}
}
}
-#endif
static inline nsRestyleHint RestyleHintForOp(char16_t oper)
{
@@ -3362,7 +3354,6 @@ AddRule(RuleSelectorPair* aRuleInfo, RuleCascadeData* aCascade)
aRuleInfo->mSelector->mLowercaseTag,
RuleValue(*aRuleInfo, 0, aCascade->mQuirksMode));
} else {
-#ifdef MOZ_XUL
NS_ASSERTION(pseudoType == CSSPseudoElementType::XULTree,
"Unexpected pseudo type");
// Index doesn't matter here, since we'll just be walking these
@@ -3370,9 +3361,6 @@ AddRule(RuleSelectorPair* aRuleInfo, RuleCascadeData* aCascade)
AppendRuleToTagTable(&cascade->mXULTreeRules,
aRuleInfo->mSelector->mLowercaseTag,
RuleValue(*aRuleInfo, 0, aCascade->mQuirksMode));
-#else
- NS_NOTREACHED("Unexpected pseudo type");
-#endif
}
for (nsCSSSelector* selector = aRuleInfo->mSelector;
diff --git a/layout/style/nsCSSRuleProcessor.h b/layout/style/nsCSSRuleProcessor.h
index e207a71afe..ae3e76da28 100644
--- a/layout/style/nsCSSRuleProcessor.h
+++ b/layout/style/nsCSSRuleProcessor.h
@@ -140,9 +140,7 @@ public:
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
diff --git a/layout/style/nsHTMLCSSStyleSheet.cpp b/layout/style/nsHTMLCSSStyleSheet.cpp
index 9b3bd65fb5..c477dc65f2 100644
--- a/layout/style/nsHTMLCSSStyleSheet.cpp
+++ b/layout/style/nsHTMLCSSStyleSheet.cpp
@@ -119,12 +119,10 @@ nsHTMLCSSStyleSheet::RulesMatching(AnonBoxRuleProcessorData* aData)
{
}
-#ifdef MOZ_XUL
/* virtual */ void
nsHTMLCSSStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData)
{
}
-#endif
// Test if style is dependent on content state
/* virtual */ nsRestyleHint
diff --git a/layout/style/nsHTMLCSSStyleSheet.h b/layout/style/nsHTMLCSSStyleSheet.h
index 2b7ea7ae83..b5f2941c99 100644
--- a/layout/style/nsHTMLCSSStyleSheet.h
+++ b/layout/style/nsHTMLCSSStyleSheet.h
@@ -37,9 +37,7 @@ public:
virtual void RulesMatching(ElementRuleProcessorData* aData) override;
virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override;
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override;
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index 70a5c7f414..af5df10493 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -3,13 +3,6 @@
* 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/.
- *
- * This Original Code has been modified by IBM Corporation. Modifications made by IBM
- * described herein are Copyright (c) International Business Machines Corporation, 2000.
- * Modifications to Mozilla code or documentation identified per MPL Section 3.3
- *
- * Date Modified by Description of modification
- * 04/20/2000 IBM Corp. OS/2 VisualAge build.
*/
/*
@@ -456,12 +449,10 @@ nsHTMLStyleSheet::RulesMatching(AnonBoxRuleProcessorData* aData)
{
}
-#ifdef MOZ_XUL
/* virtual */ void
nsHTMLStyleSheet::RulesMatching(XULTreeRuleProcessorData* aData)
{
}
-#endif
void
nsHTMLStyleSheet::SetOwningDocument(nsIDocument* aDocument)
diff --git a/layout/style/nsHTMLStyleSheet.h b/layout/style/nsHTMLStyleSheet.h
index a522fc3b41..eacee9d080 100644
--- a/layout/style/nsHTMLStyleSheet.h
+++ b/layout/style/nsHTMLStyleSheet.h
@@ -37,9 +37,7 @@ public:
virtual void RulesMatching(ElementRuleProcessorData* aData) override;
virtual void RulesMatching(PseudoElementRuleProcessorData* aData) override;
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) override;
-#ifdef MOZ_XUL
virtual void RulesMatching(XULTreeRuleProcessorData* aData) override;
-#endif
virtual nsRestyleHint HasStateDependentStyle(StateRuleProcessorData* aData) override;
virtual nsRestyleHint HasStateDependentStyle(PseudoElementStateRuleProcessorData* aData) override;
virtual bool HasDocumentStateDependentStyle(StateRuleProcessorData* aData) override;
diff --git a/layout/style/nsIStyleRuleProcessor.h b/layout/style/nsIStyleRuleProcessor.h
index 2075050d40..fbaaf9c37d 100644
--- a/layout/style/nsIStyleRuleProcessor.h
+++ b/layout/style/nsIStyleRuleProcessor.h
@@ -20,9 +20,7 @@ struct RuleProcessorData;
struct ElementRuleProcessorData;
struct PseudoElementRuleProcessorData;
struct AnonBoxRuleProcessorData;
-#ifdef MOZ_XUL
struct XULTreeRuleProcessorData;
-#endif
struct StateRuleProcessorData;
struct PseudoElementStateRuleProcessorData;
struct AttributeRuleProcessorData;
@@ -70,13 +68,11 @@ public:
*/
virtual void RulesMatching(AnonBoxRuleProcessorData* aData) = 0;
-#ifdef MOZ_XUL
/**
* Just like the previous |RulesMatching|, except for a given content
* node <em>and tree pseudo</em>.
*/
virtual void RulesMatching(XULTreeRuleProcessorData* aData) = 0;
-#endif
/**
* Return whether style can depend on a change of the given document state.
diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp
index 9d0821406b..e59c10cd2f 100644
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -1402,11 +1402,7 @@ struct SetEnumValueHelper
DEFINE_ENUM_CLASS_SETTER(StyleUserModify, ReadOnly, WriteOnly)
DEFINE_ENUM_CLASS_SETTER(StyleWindowDragging, Default, NoDrag)
DEFINE_ENUM_CLASS_SETTER(StyleOrient, Inline, Vertical)
-#ifdef MOZ_XUL
DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, Popup)
-#else
- DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, InlineBox)
-#endif
#undef DEF_SET_ENUMERATED_VALUE
};
diff --git a/layout/style/nsRuleProcessorData.h b/layout/style/nsRuleProcessorData.h
index 6f8cba8959..fbaa768cc9 100644
--- a/layout/style/nsRuleProcessorData.h
+++ b/layout/style/nsRuleProcessorData.h
@@ -499,7 +499,6 @@ struct MOZ_STACK_CLASS AnonBoxRuleProcessorData : public RuleProcessorData {
nsIAtom* mPseudoTag;
};
-#ifdef MOZ_XUL
struct MOZ_STACK_CLASS XULTreeRuleProcessorData :
public ElementDependentRuleProcessorData {
XULTreeRuleProcessorData(nsPresContext* aPresContext,
@@ -522,7 +521,6 @@ struct MOZ_STACK_CLASS XULTreeRuleProcessorData :
nsIAtom* mPseudoTag;
nsICSSPseudoComparator* mComparator;
};
-#endif
struct MOZ_STACK_CLASS StateRuleProcessorData :
public ElementDependentRuleProcessorData {
diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h
index 60377928b0..8966932626 100644
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -559,7 +559,6 @@ enum class StyleDisplay : uint8_t {
WebkitInlineBox,
Box,
InlineBox,
-#ifdef MOZ_XUL
XulGrid,
InlineXulGrid,
XulGridGroup,
@@ -569,7 +568,6 @@ enum class StyleDisplay : uint8_t {
Deck,
Groupbox,
Popup,
-#endif
};
// See nsStyleDisplay
diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp
index 558b9fa7f1..5890100eb0 100644
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -1969,11 +1969,8 @@ nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
NS_ENSURE_FALSE(mInShutdown, nullptr);
#ifdef DEBUG
- bool isAnonBox = nsCSSAnonBoxes::IsAnonBox(aPseudoTag)
-#ifdef MOZ_XUL
- && !nsCSSAnonBoxes::IsTreePseudoElement(aPseudoTag)
-#endif
- ;
+ bool isAnonBox = nsCSSAnonBoxes::IsAnonBox(aPseudoTag) &&
+ !nsCSSAnonBoxes::IsTreePseudoElement(aPseudoTag);
NS_PRECONDITION(isAnonBox, "Unexpected pseudo");
#endif
@@ -2007,7 +2004,6 @@ nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
nullptr, aFlags);
}
-#ifdef MOZ_XUL
already_AddRefed<nsStyleContext>
nsStyleSet::ResolveXULTreePseudoStyle(Element* aParentElement,
nsIAtom* aPseudoTag,
@@ -2046,7 +2042,6 @@ nsStyleSet::ResolveXULTreePseudoStyle(Element* aParentElement,
aPseudoTag, CSSPseudoElementType::XULTree,
nullptr, eNoFlags);
}
-#endif
bool
nsStyleSet::AppendFontFaceRules(nsTArray<nsFontFaceRuleContainer>& aArray)
diff --git a/layout/style/nsStyleSet.h b/layout/style/nsStyleSet.h
index 879d0add39..52541d030f 100644
--- a/layout/style/nsStyleSet.h
+++ b/layout/style/nsStyleSet.h
@@ -240,7 +240,6 @@ class nsStyleSet final
ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext,
uint32_t aFlags = eNoFlags);
-#ifdef MOZ_XUL
// Get a style context for a XUL tree pseudo. aPseudoTag is the
// pseudo-tag to use and must be non-null. aParentContent must be
// non-null. aComparator must be non-null.
@@ -249,7 +248,6 @@ class nsStyleSet final
nsIAtom* aPseudoTag,
nsStyleContext* aParentContext,
nsICSSPseudoComparator* aComparator);
-#endif
// Append all the currently-active font face rules to aArray. Return
// true for success and false for failure.
diff --git a/layout/xul/BoxObject.cpp b/layout/xul/BoxObject.cpp
index c8e7b221ab..0b7289828a 100644
--- a/layout/xul/BoxObject.cpp
+++ b/layout/xul/BoxObject.cpp
@@ -14,11 +14,7 @@
#include "nsReadableUtils.h"
#include "nsDOMClassInfoID.h"
#include "nsView.h"
-#ifdef MOZ_XUL
#include "nsIDOMXULElement.h"
-#else
-#include "nsIDOMElement.h"
-#endif
#include "nsLayoutUtils.h"
#include "nsISupportsPrimitives.h"
#include "nsSupportsPrimitives.h"
diff --git a/layout/xul/moz.build b/layout/xul/moz.build
index e4186674b2..fa5204af90 100644
--- a/layout/xul/moz.build
+++ b/layout/xul/moz.build
@@ -3,12 +3,6 @@
# 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/.
-with Files('**'):
- BUG_COMPONENT = ('Core', 'XP Toolkit/Widgets: XUL')
-
-with Files('*Menu*'):
- BUG_COMPONENT = ('Core', 'XP Toolkit/Widgets: Menus')
-
if CONFIG['ENABLE_TESTS']:
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
@@ -45,54 +39,49 @@ EXPORTS.mozilla.dom += [
SOURCES += [
'BoxObject.cpp',
+ 'ContainerBoxObject.cpp',
+ 'ListBoxObject.cpp',
+ 'MenuBoxObject.cpp',
'nsBox.cpp',
'nsBoxFrame.cpp',
'nsBoxLayout.cpp',
'nsBoxLayoutState.cpp',
'nsButtonBoxFrame.cpp',
+ 'nsDeckFrame.cpp',
+ 'nsDocElementBoxFrame.cpp',
+ 'nsGroupBoxFrame.cpp',
+ 'nsImageBoxFrame.cpp',
+ 'nsLeafBoxFrame.cpp',
+ 'nsListBoxBodyFrame.cpp',
+ 'nsListBoxLayout.cpp',
+ 'nsListItemFrame.cpp',
+ 'nsMenuBarFrame.cpp',
+ 'nsMenuBarListener.cpp',
+ 'nsMenuFrame.cpp',
+ 'nsMenuPopupFrame.cpp',
+ 'nsPopupSetFrame.cpp',
+ 'nsProgressMeterFrame.cpp',
'nsRepeatService.cpp',
+ 'nsResizerFrame.cpp',
'nsRootBoxFrame.cpp',
'nsScrollbarButtonFrame.cpp',
'nsScrollbarFrame.cpp',
'nsScrollBoxFrame.cpp',
'nsSliderFrame.cpp',
+ 'nsSplitterFrame.cpp',
'nsSprocketLayout.cpp',
'nsStackFrame.cpp',
'nsStackLayout.cpp',
+ 'nsTextBoxFrame.cpp',
+ 'nsTitleBarFrame.cpp',
+ 'nsXULLabelFrame.cpp',
+ 'nsXULPopupManager.cpp',
'nsXULTooltipListener.cpp',
+ 'PopupBoxObject.cpp',
+ 'ScrollBoxObject.cpp',
]
-if CONFIG['MOZ_XUL']:
- SOURCES += [
- 'ContainerBoxObject.cpp',
- 'ListBoxObject.cpp',
- 'MenuBoxObject.cpp',
- 'nsDeckFrame.cpp',
- 'nsDocElementBoxFrame.cpp',
- 'nsGroupBoxFrame.cpp',
- 'nsImageBoxFrame.cpp',
- 'nsLeafBoxFrame.cpp',
- 'nsListBoxBodyFrame.cpp',
- 'nsListBoxLayout.cpp',
- 'nsListItemFrame.cpp',
- 'nsMenuBarFrame.cpp',
- 'nsMenuBarListener.cpp',
- 'nsMenuFrame.cpp',
- 'nsMenuPopupFrame.cpp',
- 'nsPopupSetFrame.cpp',
- 'nsProgressMeterFrame.cpp',
- 'nsResizerFrame.cpp',
- 'nsSplitterFrame.cpp',
- 'nsTextBoxFrame.cpp',
- 'nsTitleBarFrame.cpp',
- 'nsXULLabelFrame.cpp',
- 'nsXULPopupManager.cpp',
- 'PopupBoxObject.cpp',
- 'ScrollBoxObject.cpp',
- ]
-
-if CONFIG['MOZ_XUL']:
- DIRS += ['tree', 'grid']
+DIRS += ['tree', 'grid']
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
diff --git a/layout/xul/nsXULLabelFrame.h b/layout/xul/nsXULLabelFrame.h
index e97fc3fca3..faeb461f21 100644
--- a/layout/xul/nsXULLabelFrame.h
+++ b/layout/xul/nsXULLabelFrame.h
@@ -11,10 +11,6 @@
#include "mozilla/Attributes.h"
#include "nsBlockFrame.h"
-#ifndef MOZ_XUL
-#error "This file should not be included"
-#endif
-
class nsXULLabelFrame : public nsBlockFrame
{
public:
diff --git a/layout/xul/nsXULTooltipListener.cpp b/layout/xul/nsXULTooltipListener.cpp
index 110f8c0e09..eefeec3599 100644
--- a/layout/xul/nsXULTooltipListener.cpp
+++ b/layout/xul/nsXULTooltipListener.cpp
@@ -14,14 +14,10 @@
#include "nsIServiceManager.h"
#include "nsIDragService.h"
#include "nsIDragSession.h"
-#ifdef MOZ_XUL
#include "nsITreeView.h"
-#endif
#include "nsIScriptContext.h"
#include "nsPIDOMWindow.h"
-#ifdef MOZ_XUL
#include "nsXULPopupManager.h"
-#endif
#include "nsIRootBox.h"
#include "nsIBoxObject.h"
#include "mozilla/Preferences.h"
@@ -42,11 +38,9 @@ nsXULTooltipListener::nsXULTooltipListener()
: mMouseScreenX(0)
, mMouseScreenY(0)
, mTooltipShownOnce(false)
-#ifdef MOZ_XUL
, mIsSourceTree(false)
, mNeedTitletip(false)
, mLastTreeRow(-1)
-#endif
{
if (sTooltipListenerCount++ == 0) {
// register the callback so we get notified of updates
@@ -95,7 +89,6 @@ nsXULTooltipListener::MouseOut(nsIDOMEvent* aEvent)
return;
#endif
-#ifdef MOZ_XUL
// check to see if the mouse left the targetNode, and if so,
// hide the tooltip
if (currentTooltip) {
@@ -119,7 +112,6 @@ nsXULTooltipListener::MouseOut(nsIDOMEvent* aEvent)
}
}
}
-#endif
}
void
@@ -157,11 +149,9 @@ nsXULTooltipListener::MouseMove(nsIDOMEvent* aEvent)
nsCOMPtr<nsIContent> sourceContent = do_QueryInterface(
aEvent->InternalDOMEvent()->GetCurrentTarget());
mSourceNode = do_GetWeakReference(sourceContent);
-#ifdef MOZ_XUL
mIsSourceTree = sourceContent->IsXULElement(nsGkAtoms::treechildren);
if (mIsSourceTree)
CheckTreeBodyMove(mouseEvent);
-#endif
// as the mouse moves, we want to make sure we reset the timer to show it,
// so that the delay is from when the mouse stops moving, not when it enters
@@ -210,10 +200,8 @@ nsXULTooltipListener::MouseMove(nsIDOMEvent* aEvent)
return;
}
-#ifdef MOZ_XUL
if (mIsSourceTree)
return;
-#endif
HideTooltip();
// set a flag so that the tooltip is only displayed once until the mouse
@@ -319,7 +307,6 @@ nsXULTooltipListener::RemoveTooltipSupport(nsIContent* aNode)
return NS_OK;
}
-#ifdef MOZ_XUL
void
nsXULTooltipListener::CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent)
{
@@ -376,7 +363,6 @@ nsXULTooltipListener::CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent)
mLastTreeCol = col;
}
}
-#endif
nsresult
nsXULTooltipListener::ShowTooltip()
@@ -396,12 +382,10 @@ nsXULTooltipListener::ShowTooltip()
// Make sure the target node is still attached to some document.
// It might have been deleted.
if (sourceNode->IsInComposedDoc()) {
-#ifdef MOZ_XUL
if (!mIsSourceTree) {
mLastTreeRow = -1;
mLastTreeCol = nullptr;
}
-#endif
mCurrentTooltip = do_GetWeakReference(tooltipNode);
LaunchTooltip();
@@ -440,7 +424,6 @@ nsXULTooltipListener::ShowTooltip()
return NS_OK;
}
-#ifdef MOZ_XUL
// XXX: "This stuff inside DEBUG_crap could be used to make tree tooltips work
// in the future."
#ifdef DEBUG_crap
@@ -477,7 +460,6 @@ SetTitletipLabel(nsITreeBoxObject* aTreeBox, nsIContent* aTooltip,
aTooltip->SetAttr(kNameSpaceID_None, nsGkAtoms::label, label, true);
}
}
-#endif
void
nsXULTooltipListener::LaunchTooltip()
@@ -486,7 +468,6 @@ nsXULTooltipListener::LaunchTooltip()
if (!currentTooltip)
return;
-#ifdef MOZ_XUL
if (mIsSourceTree && mNeedTitletip) {
nsCOMPtr<nsITreeBoxObject> obx;
GetSourceTreeBoxObject(getter_AddRefs(obx));
@@ -514,21 +495,17 @@ nsXULTooltipListener::LaunchTooltip()
if (!pm->IsPopupOpen(currentTooltip))
mCurrentTooltip = nullptr;
}
-#endif
-
}
nsresult
nsXULTooltipListener::HideTooltip()
{
-#ifdef MOZ_XUL
nsCOMPtr<nsIContent> currentTooltip = do_QueryReferent(mCurrentTooltip);
if (currentTooltip) {
nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
if (pm)
pm->HidePopup(currentTooltip, false, false, false, false);
}
-#endif
DestroyTooltip();
return NS_OK;
@@ -603,22 +580,18 @@ nsXULTooltipListener::FindTooltip(nsIContent* aTarget, nsIContent** aTooltip)
nsCOMPtr<nsIContent> tooltipEl = document->GetElementById(tooltipId);
if (tooltipEl) {
-#ifdef MOZ_XUL
mNeedTitletip = false;
-#endif
tooltipEl.forget(aTooltip);
return NS_OK;
}
}
-#ifdef MOZ_XUL
// titletips should just use the default tooltip
if (mIsSourceTree && mNeedTitletip) {
nsIRootBox* rootBox = nsIRootBox::GetRootBox(document->GetShell());
NS_ENSURE_STATE(rootBox);
NS_IF_ADDREF(*aTooltip = rootBox->GetDefaultTooltip());
}
-#endif
return NS_OK;
}
@@ -634,7 +607,6 @@ nsXULTooltipListener::GetTooltipFor(nsIContent* aTarget, nsIContent** aTooltip)
return rv;
}
-#ifdef MOZ_XUL
// Submenus can't be used as tooltips, see bug 288763.
nsIContent* parent = tooltip->GetParent();
if (parent) {
@@ -644,7 +616,6 @@ nsXULTooltipListener::GetTooltipFor(nsIContent* aTarget, nsIContent** aTooltip)
return NS_ERROR_FAILURE;
}
}
-#endif
tooltip.swap(*aTooltip);
return rv;
@@ -679,9 +650,7 @@ nsXULTooltipListener::DestroyTooltip()
// kill any ongoing timers
KillTooltipTimer();
mSourceNode = nullptr;
-#ifdef MOZ_XUL
mLastTreeCol = nullptr;
-#endif
return NS_OK;
}
@@ -704,7 +673,6 @@ nsXULTooltipListener::sTooltipCallback(nsITimer *aTimer, void *aListener)
instance->ShowTooltip();
}
-#ifdef MOZ_XUL
nsresult
nsXULTooltipListener::GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject)
{
@@ -726,4 +694,3 @@ nsXULTooltipListener::GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject)
}
return NS_ERROR_FAILURE;
}
-#endif
diff --git a/layout/xul/nsXULTooltipListener.h b/layout/xul/nsXULTooltipListener.h
index 51e0a2c3f6..1f014c08b0 100644
--- a/layout/xul/nsXULTooltipListener.h
+++ b/layout/xul/nsXULTooltipListener.h
@@ -12,10 +12,8 @@
#include "nsITimer.h"
#include "nsCOMPtr.h"
#include "nsString.h"
-#ifdef MOZ_XUL
#include "nsITreeBoxObject.h"
#include "nsITreeColumns.h"
-#endif
#include "nsWeakPtr.h"
#include "mozilla/Attributes.h"
@@ -50,10 +48,8 @@ protected:
void KillTooltipTimer();
-#ifdef MOZ_XUL
void CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent);
nsresult GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject);
-#endif
nsresult ShowTooltip();
void LaunchTooltip();
@@ -90,13 +86,11 @@ protected:
// the next time the mouse enters the node (bug #395668).
bool mTooltipShownOnce;
-#ifdef MOZ_XUL
- // special members for handling trees
+ // Special members for handling XUL trees.
bool mIsSourceTree;
bool mNeedTitletip;
int32_t mLastTreeRow;
nsCOMPtr<nsITreeColumn> mLastTreeCol;
-#endif
};
#endif // nsXULTooltipListener
diff --git a/old-configure.in b/old-configure.in
index 449bf2ee14..cd7f6b03d8 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -1977,7 +1977,6 @@ MOZ_TOOLKIT_SEARCH=1
MOZ_UI_LOCALE=en-US
MOZ_UNIVERSALCHARDET=1
MOZ_URL_CLASSIFIER=
-MOZ_XUL=1
MOZ_ZIPWRITER=1
MOZ_NO_SMART_CARDS=
MOZ_NECKO_WIFI=1
@@ -4586,21 +4585,6 @@ AC_SUBST_LIST(MOZ_CAIRO_OSLIBS)
AC_SUBST(MOZ_TREE_PIXMAN)
dnl ========================================================
-dnl disable xul
-dnl ========================================================
-MOZ_ARG_DISABLE_BOOL(xul,
-[ --disable-xul Disable XUL],
- MOZ_XUL= )
-if test "$MOZ_XUL"; then
- AC_DEFINE(MOZ_XUL)
-else
- dnl remove extensions that require XUL
- MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/irc//' -e 's/tasks//'`
-fi
-
-AC_SUBST(MOZ_XUL)
-
-dnl ========================================================
dnl necko configuration options
dnl ========================================================
diff --git a/security/manager/moz.build b/security/manager/moz.build
index 93f4b56435..e94be25cdf 100644
--- a/security/manager/moz.build
+++ b/security/manager/moz.build
@@ -3,7 +3,4 @@
# 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/.
-DIRS += ['ssl', 'locales']
-
-if CONFIG['MOZ_XUL']:
- DIRS += ['pki']
+DIRS += ['ssl', 'locales', 'pki']
diff --git a/security/manager/ssl/moz.build b/security/manager/ssl/moz.build
index 876b0e8cff..a8011f3c86 100644
--- a/security/manager/ssl/moz.build
+++ b/security/manager/ssl/moz.build
@@ -14,6 +14,7 @@ XPIDL_SOURCES += [
'nsICertBlocklist.idl',
'nsICertificateDialogs.idl',
'nsICertOverrideService.idl',
+ 'nsICertTree.idl',
'nsIClientAuthDialogs.idl',
'nsIContentSignatureVerifier.idl',
'nsIDataSignatureVerifier.idl',
@@ -44,11 +45,6 @@ XPIDL_SOURCES += [
'nsIX509CertValidity.idl',
]
-if CONFIG['MOZ_XUL']:
- XPIDL_SOURCES += [
- 'nsICertTree.idl',
- ]
-
XPIDL_MODULE = 'pipnss'
EXTRA_JS_MODULES.psm += [
@@ -151,10 +147,9 @@ if not CONFIG['MOZ_NO_SMART_CARDS']:
'nsSmartCardMonitor.cpp',
]
-if CONFIG['MOZ_XUL']:
- UNIFIED_SOURCES += [
- 'nsCertTree.cpp',
- ]
+UNIFIED_SOURCES += [
+ 'nsCertTree.cpp',
+]
UNIFIED_SOURCES += [
'md4.c',
diff --git a/security/manager/ssl/nsNSSModule.cpp b/security/manager/ssl/nsNSSModule.cpp
index e43d7d23d6..9012bb33fa 100644
--- a/security/manager/ssl/nsNSSModule.cpp
+++ b/security/manager/ssl/nsNSSModule.cpp
@@ -39,9 +39,7 @@
#include "nsTLSSocketProvider.h"
#include "nsXULAppAPI.h"
-#ifdef MOZ_XUL
#include "nsCertTree.h"
-#endif
#define NS_IS_PROCESS_DEFAULT \
(GeckoProcessType_Default == XRE_GetProcessType())
@@ -196,9 +194,7 @@ NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsNSSCertificateDB)
NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_BYPROCESS(nssEnsureOnChromeOnly,
nsNSSCertList,
nsNSSCertListFakeTransport)
-#ifdef MOZ_XUL
NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCertTree)
-#endif
NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsPkcs11)
NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nssEnsure, nsNTLMAuthModule, InitTest)
NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsureChromeOrContent, nsCryptoHash)
@@ -232,9 +228,7 @@ NS_DEFINE_NAMED_CID(NS_X509CERT_CID);
NS_DEFINE_NAMED_CID(NS_X509CERTDB_CID);
NS_DEFINE_NAMED_CID(NS_X509CERTLIST_CID);
NS_DEFINE_NAMED_CID(NS_FORMPROCESSOR_CID);
-#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_CERTTREE_CID);
-#endif
NS_DEFINE_NAMED_CID(NS_PKCS11_CID);
NS_DEFINE_NAMED_CID(NS_CRYPTO_HASH_CID);
NS_DEFINE_NAMED_CID(NS_CRYPTO_HMAC_CID);
@@ -267,9 +261,7 @@ static const mozilla::Module::CIDEntry kNSSCIDs[] = {
{ &kNS_X509CERTDB_CID, false, nullptr, nsNSSCertificateDBConstructor },
{ &kNS_X509CERTLIST_CID, false, nullptr, nsNSSCertListConstructor },
{ &kNS_FORMPROCESSOR_CID, false, nullptr, nsKeygenFormProcessor::Create },
-#ifdef MOZ_XUL
{ &kNS_CERTTREE_CID, false, nullptr, nsCertTreeConstructor },
-#endif
{ &kNS_PKCS11_CID, false, nullptr, nsPkcs11Constructor },
{ &kNS_CRYPTO_HASH_CID, false, nullptr, nsCryptoHashConstructor },
{ &kNS_CRYPTO_HMAC_CID, false, nullptr, nsCryptoHMACConstructor },
@@ -305,9 +297,7 @@ static const mozilla::Module::ContractIDEntry kNSSContracts[] = {
{ NS_X509CERTDB_CONTRACTID, &kNS_X509CERTDB_CID },
{ NS_X509CERTLIST_CONTRACTID, &kNS_X509CERTLIST_CID },
{ NS_FORMPROCESSOR_CONTRACTID, &kNS_FORMPROCESSOR_CID },
-#ifdef MOZ_XUL
{ NS_CERTTREE_CONTRACTID, &kNS_CERTTREE_CID },
-#endif
{ NS_PKCS11_CONTRACTID, &kNS_PKCS11_CID },
{ NS_CRYPTO_HASH_CONTRACTID, &kNS_CRYPTO_HASH_CID },
{ NS_CRYPTO_HMAC_CONTRACTID, &kNS_CRYPTO_HMAC_CID },
diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build
index ba695a3c21..1770c8aa67 100644
--- a/toolkit/components/moz.build
+++ b/toolkit/components/moz.build
@@ -75,8 +75,7 @@ if CONFIG['BUILD_CTYPES']:
if CONFIG['MOZ_FEEDS']:
DIRS += ['feeds']
-if CONFIG['MOZ_XUL']:
- DIRS += ['autocomplete', 'satchel']
+DIRS += ['autocomplete', 'satchel']
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
DIRS += ['filepicker']
diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp
index bdd39b28e1..cf4edc6331 100644
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -38,10 +38,8 @@
#include "mozilla/Preferences.h"
#include <algorithm>
-#ifdef MOZ_XUL
#include "nsIAutoCompleteInput.h"
#include "nsIAutoCompletePopup.h"
-#endif
using namespace mozilla;
using namespace mozilla::places;
@@ -126,9 +124,7 @@ using namespace mozilla::places;
#define RECENT_EVENTS_INITIAL_CACHE_LENGTH 64
// Observed topics.
-#ifdef MOZ_XUL
#define TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING "autocomplete-will-enter-text"
-#endif
#define TOPIC_IDLE_DAILY "idle-daily"
#define TOPIC_PREF_CHANGED "nsPref:changed"
#define TOPIC_PROFILE_TEARDOWN "profile-change-teardown"
@@ -319,9 +315,7 @@ nsNavHistory::Init()
if (obsSvc) {
(void)obsSvc->AddObserver(this, TOPIC_PLACES_CONNECTION_CLOSED, true);
(void)obsSvc->AddObserver(this, TOPIC_IDLE_DAILY, true);
-#ifdef MOZ_XUL
(void)obsSvc->AddObserver(this, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING, true);
-#endif
}
// Don't add code that can fail here! Do it up above, before we add our
@@ -2997,17 +2991,12 @@ nsNavHistory::Observe(nsISupports *aSubject, const char *aTopic,
// These notifications are used by tests to simulate a Places shutdown.
// They should just be forwarded to the Database handle.
mDB->Observe(aSubject, aTopic, aData);
- }
-
- else if (strcmp(aTopic, TOPIC_PLACES_CONNECTION_CLOSED) == 0) {
+ } else if (strcmp(aTopic, TOPIC_PLACES_CONNECTION_CLOSED) == 0) {
// Don't even try to notify observers from this point on, the category
// cache would init services that could try to use our APIs.
mCanNotify = false;
mObservers.Clear();
- }
-
-#ifdef MOZ_XUL
- else if (strcmp(aTopic, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING) == 0) {
+ } else if (strcmp(aTopic, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING) == 0) {
nsCOMPtr<nsIAutoCompleteInput> input = do_QueryInterface(aSubject);
if (!input)
return NS_OK;
@@ -3045,14 +3034,9 @@ nsNavHistory::Observe(nsISupports *aSubject, const char *aTopic,
rv = AutoCompleteFeedback(selectedIndex, controller);
NS_ENSURE_SUCCESS(rv, rv);
- }
-
-#endif
- else if (strcmp(aTopic, TOPIC_PREF_CHANGED) == 0) {
+ } else if (strcmp(aTopic, TOPIC_PREF_CHANGED) == 0) {
LoadPrefs();
- }
-
- else if (strcmp(aTopic, TOPIC_IDLE_DAILY) == 0) {
+ } else if (strcmp(aTopic, TOPIC_IDLE_DAILY) == 0) {
(void)DecayFrecency();
}
@@ -4426,8 +4410,6 @@ nsNavHistory::FixInvalidFrecencies()
}
-#ifdef MOZ_XUL
-
nsresult
nsNavHistory::AutoCompleteFeedback(int32_t aIndex,
nsIAutoCompleteController *aController)
@@ -4465,9 +4447,6 @@ nsNavHistory::AutoCompleteFeedback(int32_t aIndex,
return NS_OK;
}
-#endif
-
-
nsICollation *
nsNavHistory::GetCollation()
{
diff --git a/toolkit/components/places/nsNavHistory.h b/toolkit/components/places/nsNavHistory.h
index ed5272ce01..c6e1133ff0 100644
--- a/toolkit/components/places/nsNavHistory.h
+++ b/toolkit/components/places/nsNavHistory.h
@@ -44,10 +44,8 @@
// If you typed it more than this time ago, it's not recent.
#define RECENT_EVENT_THRESHOLD PRTime((int64_t)15 * 60 * PR_USEC_PER_SEC)
-#ifdef MOZ_XUL
// Fired after autocomplete feedback has been updated.
#define TOPIC_AUTOCOMPLETE_FEEDBACK_UPDATED "places-autocomplete-feedback-updated"
-#endif
// Fired after frecency has been updated.
#define TOPIC_FRECENCY_UPDATED "places-frecency-updated"
@@ -591,10 +589,8 @@ protected:
const nsACString& url);
void ExpireNonrecentEvents(RecentEventHash* hashTable);
-#ifdef MOZ_XUL
nsresult AutoCompleteFeedback(int32_t aIndex,
nsIAutoCompleteController *aController);
-#endif
// Whether history is enabled or not.
// Will mimic value of the places.history.enabled preference.
diff --git a/widget/moz.build b/widget/moz.build
index acb1387341..e40bf6a61a 100644
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -164,7 +164,7 @@ if CONFIG['OS_ARCH'] == 'Linux':
'LSBUtils.cpp'
]
-if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
+if CONFIG['NS_PRINTING']:
EXPORTS += [
'nsDeviceContextSpecProxy.h',
'nsPrintOptionsImpl.h',
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
index 1a18b9ecaf..5675d6b8c2 100644
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -632,10 +632,8 @@ nsWindow::nsWindow()
mCachedHitTestPoint.y = 0;
mCachedHitTestTime = TimeStamp::Now();
mCachedHitTestResult = 0;
-#ifdef MOZ_XUL
mTransparencyMode = eTransparencyOpaque;
memset(&mGlassMargins, 0, sizeof mGlassMargins);
-#endif
DWORD background = ::GetSysColor(COLOR_BTNFACE);
mBrush = ::CreateSolidBrush(NSRGB_2_COLOREF(background));
mSendingSetText = false;
@@ -1609,14 +1607,12 @@ NS_IMETHODIMP nsWindow::Show(bool bState)
}
}
-#ifdef MOZ_XUL
if (!wasVisible && bState) {
Invalidate();
if (syncInvalidate && !mInDtor && !mOnDestroyCalled) {
::UpdateWindow(mWnd);
}
}
-#endif
return NS_OK;
}
@@ -3008,7 +3004,6 @@ NS_IMETHODIMP nsWindow::SetCursor(imgIContainer* aCursor,
*
**************************************************************/
-#ifdef MOZ_XUL
nsTransparencyMode nsWindow::GetTransparencyMode()
{
return GetTopLevelWindow(true)->GetWindowTranslucencyInner();
@@ -3117,7 +3112,6 @@ void nsWindow::UpdateGlass()
DwmSetWindowAttribute(mWnd, DWMWA_NCRENDERING_POLICY, &policy, sizeof policy);
}
}
-#endif
/**************************************************************
*
@@ -7245,8 +7239,6 @@ nsWindow::GetAccessible()
**************************************************************
**************************************************************/
-#ifdef MOZ_XUL
-
void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
{
if (aMode == mTransparencyMode)
@@ -7304,8 +7296,6 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
UpdateGlass();
}
-#endif //MOZ_XUL
-
/**************************************************************
**************************************************************
**
diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h
index 199500e9c5..ec4a1f0192 100644
--- a/widget/windows/nsWindow.h
+++ b/widget/windows/nsWindow.h
@@ -203,11 +203,9 @@ public:
NS_IMETHOD_(InputContext) GetInputContext() override;
NS_IMETHOD_(TextEventDispatcherListener*)
GetNativeTextEventDispatcherListener() override;
-#ifdef MOZ_XUL
virtual void SetTransparencyMode(nsTransparencyMode aMode) override;
virtual nsTransparencyMode GetTransparencyMode() override;
virtual void UpdateOpaqueRegion(const LayoutDeviceIntRegion& aOpaqueRegion) override;
-#endif // MOZ_XUL
virtual nsIMEUpdatePreference GetIMEUpdatePreference() override;
NS_IMETHOD SetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
void SetDrawsInTitlebar(bool aState) override;
@@ -466,13 +464,11 @@ protected:
/**
* Window transparency helpers
*/
-#ifdef MOZ_XUL
private:
void SetWindowTranslucencyInner(nsTransparencyMode aMode);
nsTransparencyMode GetWindowTranslucencyInner() const { return mTransparencyMode; }
void UpdateGlass();
protected:
-#endif // MOZ_XUL
static bool IsAsyncResponseEvent(UINT aMsg, LRESULT& aResult);
void IPCWindowProcHandler(UINT& msg, WPARAM& wParam, LPARAM& lParam);
@@ -609,11 +605,9 @@ protected:
ResizeState mResizeState;
// Transparency
-#ifdef MOZ_XUL
nsTransparencyMode mTransparencyMode;
nsIntRegion mPossiblyTransparentRegion;
MARGINS mGlassMargins;
-#endif // MOZ_XUL
// Win7 Gesture processing and management
nsWinGesture mGesture;
diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp
index 9b303a0f2e..5a5551753d 100644
--- a/widget/windows/nsWindowGfx.cpp
+++ b/widget/windows/nsWindowGfx.cpp
@@ -233,7 +233,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
PAINTSTRUCT ps;
-#ifdef MOZ_XUL
if (!aDC && (eTransparencyTransparent == mTransparencyMode))
{
// For layered translucent windows all drawing should go to memory DC and no
@@ -248,7 +247,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
// We're guaranteed to have a widget proxy since we called GetLayerManager().
aDC = mCompositorWidgetDelegate->GetTransparentDC();
}
-#endif
mPainting = true;
@@ -267,11 +265,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
HDC hDC = aDC ? aDC : (::BeginPaint(mWnd, &ps));
mPaintDC = hDC;
-#ifdef MOZ_XUL
bool forceRepaint = aDC || (eTransparencyTransparent == mTransparencyMode);
-#else
- bool forceRepaint = nullptr != aDC;
-#endif
nsIntRegion region = GetRegionToPaint(forceRepaint, ps, hDC);
if (clientLayerManager) {
@@ -317,14 +311,12 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
{
RefPtr<gfxASurface> targetSurface;
-#if defined(MOZ_XUL)
// don't support transparency for non-GDI rendering, for now
if (eTransparencyTransparent == mTransparencyMode) {
// This mutex needs to be held when EnsureTransparentSurface is called.
MutexAutoLock lock(mBasicLayersSurface->GetTransparentSurfaceLock());
targetSurface = mBasicLayersSurface->EnsureTransparentSurface();
}
-#endif
RefPtr<gfxWindowsSurface> targetSurfaceWin;
if (!targetSurface)
@@ -353,7 +345,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
// don't need to double buffer with anything but GDI
BufferMode doubleBuffering = mozilla::layers::BufferMode::BUFFER_NONE;
-#ifdef MOZ_XUL
switch (mTransparencyMode) {
case eTransparencyGlass:
case eTransparencyBorderlessGlass:
@@ -368,9 +359,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
dt->GetSize().width, dt->GetSize().height));
break;
}
-#else
- doubleBuffering = mozilla::layers::BufferMode::BUFFERED;
-#endif
RefPtr<gfxContext> thebesContext = gfxContext::CreateOrNull(dt);
MOZ_ASSERT(thebesContext); // already checked draw target above
@@ -382,14 +370,12 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
this, LayoutDeviceIntRegion::FromUnknownRegion(region));
}
-#ifdef MOZ_XUL
if (eTransparencyTransparent == mTransparencyMode) {
// Data from offscreen drawing surface was copied to memory bitmap of transparent
// bitmap. Now it can be read from memory bitmap to apply alpha channel and after
// that displayed on the screen.
mBasicLayersSurface->RedrawTransparentWindow();
}
-#endif
}
break;
case LayersBackend::LAYERS_CLIENT: