diff --git a/dom/xul/XULDocument.h b/dom/xul/XULDocument.h index 00d4b497f5ca..e8af3c55d26a 100644 --- a/dom/xul/XULDocument.h +++ b/dom/xul/XULDocument.h @@ -150,7 +150,7 @@ public: virtual nsIDocument::DocumentTheme GetDocumentLWTheme() override; virtual nsIDocument::DocumentTheme ThreadSafeGetDocumentLWTheme() const override; - virtual void ResetDocumentLWTheme() override { mDocLWTheme = Doc_Theme_Uninitialized; } + void ResetDocumentLWTheme() { mDocLWTheme = Doc_Theme_Uninitialized; } NS_IMETHOD OnScriptCompileComplete(JSScript* aScript, nsresult aStatus) override; diff --git a/dom/xul/nsIXULDocument.h b/dom/xul/nsIXULDocument.h index 6ad6c7328e24..2ce6f0f8b731 100644 --- a/dom/xul/nsIXULDocument.h +++ b/dom/xul/nsIXULDocument.h @@ -34,8 +34,6 @@ class nsIXULDocument : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXULDOCUMENT_IID) - - virtual void ResetDocumentLWTheme() = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXULDocument, NS_IXULDOCUMENT_IID) diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index 2dca5b14e6aa..d6a8ff3776b0 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -40,7 +40,6 @@ #include "nsIURL.h" #include "nsViewManager.h" #include "nsIWidget.h" -#include "nsIXULDocument.h" #include "nsLayoutCID.h" #include "nsContentCID.h" #include "mozilla/dom/Event.h" @@ -1161,7 +1160,7 @@ nsXULElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName, } else if (aName == nsGkAtoms::lwtheme || aName == nsGkAtoms::lwthemetextcolor) { // if the lwtheme changed, make sure to reset the document lwtheme cache - nsCOMPtr xuldoc = do_QueryInterface(document); + XULDocument* xuldoc = document->AsXULDocument(); if (xuldoc) { xuldoc->ResetDocumentLWTheme(); UpdateBrightTitlebarForeground(document); @@ -1198,7 +1197,7 @@ nsXULElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName, } else if ((aName == nsGkAtoms::lwtheme || aName == nsGkAtoms::lwthemetextcolor)) { // if the lwtheme changed, make sure to restyle appropriately - nsCOMPtr xuldoc = do_QueryInterface(doc); + XULDocument* xuldoc = doc->AsXULDocument(); if (xuldoc) { xuldoc->ResetDocumentLWTheme(); UpdateBrightTitlebarForeground(doc);