diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-10 23:09:26 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-10-10 23:09:26 +0000 |
commit | 0c222d068c7ebe9315c4c54731591ce6785d1f42 (patch) | |
tree | af760fc029cd08b6e339e5efb92453f9cafa19cc /dom/xbl | |
parent | 0ea4019528592afbe0ae918350dd259ef6e5719a (diff) | |
download | aura-central-0c222d068c7ebe9315c4c54731591ce6785d1f42.tar.gz |
Issue %3010 - Remove --disable-xul config and conditionals.
Diffstat (limited to 'dom/xbl')
-rw-r--r-- | dom/xbl/nsXBLBinding.cpp | 8 | ||||
-rw-r--r-- | dom/xbl/nsXBLContentSink.cpp | 8 | ||||
-rw-r--r-- | dom/xbl/nsXBLContentSink.h | 2 | ||||
-rw-r--r-- | dom/xbl/nsXBLPrototypeBinding.cpp | 13 | ||||
-rw-r--r-- | dom/xbl/nsXBLService.cpp | 8 |
5 files changed, 2 insertions, 37 deletions
diff --git a/dom/xbl/nsXBLBinding.cpp b/dom/xbl/nsXBLBinding.cpp index b7e0d9094..f0b4ff566 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 0f54d62b4..51a89e2d8 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 93c1454a4..e05728d14 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 25c33d534..fce18a993 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 55839afd2..4a383fb38 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 } } |