Bug 1590639 part 6: Fix non-unified build issues in layout/inspector. r=emilio
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 24 Oct 2019 17:15:32 +0000
changeset 498887 54471d01065b459d156c6a4e1a241bc8f40daf0c
parent 498886 5b8a4bd4937a2fc64cefda21933a1489559426bc
child 498888 12353ac49ff9c15b67ca32a470974aacb81740ff
push id36730
push userbtara@mozilla.com
push dateFri, 25 Oct 2019 03:46:30 +0000
treeherdermozilla-central@11b08c1b0061 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1590639
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1590639 part 6: Fix non-unified build issues in layout/inspector. r=emilio This patch: - Gives ServoStyleRuleMap.cpp an include for Element.h (to provide that type). - Gives inDeepTreeWalker.cpp a mozilla::dom prefix for its one use of Document. - Gives inLayoutUtils.cpp a "using" decl for mozilla::dom, so we can compile with the many un-namespaced "Document" and "Element" usages in that file. Depends on D50167 Differential Revision: https://phabricator.services.mozilla.com/D50168
layout/inspector/ServoStyleRuleMap.cpp
layout/inspector/inDeepTreeWalker.cpp
layout/inspector/inLayoutUtils.cpp
--- a/layout/inspector/ServoStyleRuleMap.cpp
+++ b/layout/inspector/ServoStyleRuleMap.cpp
@@ -6,16 +6,17 @@
 
 #include "mozilla/ServoStyleRuleMap.h"
 
 #include "mozilla/css/GroupRule.h"
 #include "mozilla/dom/CSSImportRule.h"
 #include "mozilla/dom/CSSRuleBinding.h"
 #include "mozilla/dom/CSSStyleRule.h"
 #include "mozilla/dom/Document.h"
+#include "mozilla/dom/Element.h"
 #include "mozilla/dom/ShadowRoot.h"
 #include "mozilla/IntegerRange.h"
 #include "mozilla/ServoStyleSet.h"
 #include "mozilla/StyleSheetInlines.h"
 #include "nsStyleSheetService.h"
 
 using namespace mozilla::dom;
 
--- a/layout/inspector/inDeepTreeWalker.cpp
+++ b/layout/inspector/inDeepTreeWalker.cpp
@@ -139,17 +139,17 @@ already_AddRefed<nsINode> inDeepTreeWalk
 
 static already_AddRefed<nsINodeList> GetChildren(nsINode* aParent,
                                                  bool aShowAnonymousContent,
                                                  bool aShowSubDocuments) {
   MOZ_ASSERT(aParent);
 
   nsCOMPtr<nsINodeList> ret;
   if (aShowSubDocuments) {
-    Document* domdoc = inLayoutUtils::GetSubDocumentFor(aParent);
+    mozilla::dom::Document* domdoc = inLayoutUtils::GetSubDocumentFor(aParent);
     if (domdoc) {
       aParent = domdoc;
     }
   }
 
   nsCOMPtr<nsIContent> parentAsContent = do_QueryInterface(aParent);
   if (parentAsContent && aShowAnonymousContent) {
     ret = parentAsContent->GetChildren(nsIContent::eAllChildren);
--- a/layout/inspector/inLayoutUtils.cpp
+++ b/layout/inspector/inLayoutUtils.cpp
@@ -12,16 +12,17 @@
 #include "nsPIDOMWindow.h"
 #include "nsIDocShell.h"
 #include "nsPresContext.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/dom/DocumentInlines.h"
 #include "mozilla/dom/Element.h"
 
 using namespace mozilla;
+using namespace mozilla::dom;
 
 ///////////////////////////////////////////////////////////////////////////////
 
 EventStateManager* inLayoutUtils::GetEventStateManagerFor(Element& aElement) {
   Document* doc = aElement.OwnerDoc();
   nsPresContext* presContext = doc->GetPresContext();
   if (!presContext) return nullptr;