From ad0a976f2d276215d1f159d1aee9553bd7ad32cd Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 29 Apr 2020 12:36:53 +0000 Subject: Issue #80 - De-unify layout/base --- layout/base/MaskLayerImageCache.h | 1 + layout/base/MobileViewportManager.h | 3 +++ layout/base/RestyleManager.cpp | 7 +------ layout/base/RestyleManager.h | 6 ++++++ layout/base/RestyleManagerBase.cpp | 18 ++++++++++++++++++ layout/base/ServoRestyleManager.cpp | 1 + layout/base/TouchManager.cpp | 2 ++ layout/base/moz.build | 11 +++-------- layout/base/nsFrameTraversal.cpp | 1 + layout/base/nsLayoutUtils.cpp | 1 + layout/base/nsPresShell.cpp | 6 +++++- layout/svg/nsISVGChildFrame.h | 1 + 12 files changed, 43 insertions(+), 15 deletions(-) diff --git a/layout/base/MaskLayerImageCache.h b/layout/base/MaskLayerImageCache.h index b18fe5aa1..61881de83 100644 --- a/layout/base/MaskLayerImageCache.h +++ b/layout/base/MaskLayerImageCache.h @@ -10,6 +10,7 @@ #include "nsAutoPtr.h" #include "nsPresContext.h" #include "mozilla/gfx/Matrix.h" +#include "mozilla/layers/ShadowLayers.h" namespace mozilla { diff --git a/layout/base/MobileViewportManager.h b/layout/base/MobileViewportManager.h index 63128b281..6324a8645 100644 --- a/layout/base/MobileViewportManager.h +++ b/layout/base/MobileViewportManager.h @@ -7,8 +7,11 @@ #define MobileViewportManager_h_ #include "mozilla/Maybe.h" +#include "nsIDocument.h" #include "nsIDOMEventListener.h" +#include "nsIDOMEventTarget.h" #include "nsIObserver.h" +#include "nsViewportInfo.h" #include "Units.h" class nsIDOMEventTarget; diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 5c599e1ef..9e80ef7bc 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -241,11 +241,6 @@ RestyleManager::AnimationsWithDestroyedFrame::StopAnimationsWithoutFrame( } } -static inline dom::Element* -ElementForStyleContext(nsIContent* aParentContent, - nsIFrame* aFrame, - CSSPseudoElementType aPseudoType); - // Forwarded nsIDocumentObserver method, to handle restyling (and // passing the notification to the frame). void @@ -1009,7 +1004,7 @@ RestyleManager::TryInitiatingTransition(nsPresContext* aPresContext, return *aNewStyleContext != sc; } -static dom::Element* +dom::Element* ElementForStyleContext(nsIContent* aParentContent, nsIFrame* aFrame, CSSPseudoElementType aPseudoType) diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index 3b60b331a..dd58f4bb4 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -191,6 +191,7 @@ public: MOZ_ASSERT(false, "unexpected aPseudoType"); return nullptr; } + private: RestyleManager* mRestyleManager; AutoRestore mRestorePointer; @@ -880,6 +881,11 @@ private: AutoTArray mAncestors; }; +dom::Element* +ElementForStyleContext(nsIContent* aParentContent, + nsIFrame* aFrame, + CSSPseudoElementType aPseudoType); + } // namespace mozilla #endif /* mozilla_RestyleManager_h */ diff --git a/layout/base/RestyleManagerBase.cpp b/layout/base/RestyleManagerBase.cpp index 1a3cae4bf..69c2d9899 100644 --- a/layout/base/RestyleManagerBase.cpp +++ b/layout/base/RestyleManagerBase.cpp @@ -5,8 +5,26 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/RestyleManagerBase.h" +#include "mozilla/RestyleManager.h" #include "mozilla/StyleSetHandle.h" +#include "mozilla/StyleSetHandleInlines.h" // for Ptr::HasStateDependentStyle +#include "ActiveLayerTracker.h" +#include "nsCSSFrameConstructor.h" +#include "nsCSSRendering.h" #include "nsIFrame.h" +#include "nsIFrameInlines.h" // for IsAbsPosContainingBlock +#include "nsPlaceholderFrame.h" +#include "nsStyleChangeList.h" +#include "nsStyleStructInlines.h" // for HasTransform +#include "nsSVGEffects.h" +#include "nsSVGIntegrationUtils.h" +#include "nsSVGUtils.h" +#include "nsViewportFrame.h" +#include "StickyScrollContainer.h" +#include "SVGTextFrame.h" + +using namespace mozilla; +using namespace mozilla::layers; namespace mozilla { diff --git a/layout/base/ServoRestyleManager.cpp b/layout/base/ServoRestyleManager.cpp index 0659ab857..e7b295845 100644 --- a/layout/base/ServoRestyleManager.cpp +++ b/layout/base/ServoRestyleManager.cpp @@ -9,6 +9,7 @@ #include "mozilla/ServoStyleSet.h" #include "mozilla/dom/ChildIterator.h" #include "nsContentUtils.h" +#include "nsCSSFrameConstructor.h" #include "nsPrintfCString.h" #include "nsStyleChangeList.h" diff --git a/layout/base/TouchManager.cpp b/layout/base/TouchManager.cpp index 5167ca588..e7972d5af 100644 --- a/layout/base/TouchManager.cpp +++ b/layout/base/TouchManager.cpp @@ -12,6 +12,8 @@ #include "nsPresShell.h" #include "nsView.h" +using namespace mozilla::dom; + namespace mozilla { nsDataHashtable* TouchManager::sCaptureTouchList; diff --git a/layout/base/moz.build b/layout/base/moz.build index afc683665..f115280ce 100644 --- a/layout/base/moz.build +++ b/layout/base/moz.build @@ -119,7 +119,7 @@ EXPORTS.mozilla += [ 'StaticPresData.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AccessibleCaret.cpp', 'AccessibleCaretEventHub.cpp', 'AccessibleCaretManager.cpp', @@ -151,9 +151,11 @@ UNIFIED_SOURCES += [ 'nsLayoutDebugger.cpp', 'nsLayoutHistoryState.cpp', 'nsLayoutUtils.cpp', + 'nsPresArena.cpp', 'nsPresContext.cpp', 'nsPresShell.cpp', 'nsQuoteList.cpp', + 'nsRefreshDriver.cpp', 'nsStyleChangeList.cpp', 'nsStyleSheetService.cpp', 'PaintTracker.cpp', @@ -169,13 +171,6 @@ UNIFIED_SOURCES += [ 'ZoomConstraintsClient.cpp', ] -# nsPresArena.cpp needs to be built separately because it uses plarena.h. -# nsRefreshDriver.cpp needs to be built separately because of name clashes in the OS X headers -SOURCES += [ - 'nsPresArena.cpp', - 'nsRefreshDriver.cpp', -] - if CONFIG['ENABLE_TESTS']: DIRS += ['gtest'] diff --git a/layout/base/nsFrameTraversal.cpp b/layout/base/nsFrameTraversal.cpp index 76dd40af1..0c6a655a2 100644 --- a/layout/base/nsFrameTraversal.cpp +++ b/layout/base/nsFrameTraversal.cpp @@ -10,6 +10,7 @@ #include "nsPlaceholderFrame.h" #include "nsContainerFrame.h" +using namespace mozilla; class nsFrameIterator : public nsIFrameEnumerator { diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 7496a4946..710463a5f 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -118,6 +118,7 @@ #include "mozilla/StyleSetHandleInlines.h" #include "RegionBuilder.h" #include "SVGSVGElement.h" +#include "nsDocument.h" #ifdef MOZ_XUL #include "nsXULPopupManager.h" diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index bd5125637..8b469185f 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -58,6 +58,7 @@ #include "nsNameSpaceManager.h" // for Pref-related rule management (bugs 22963,20760,31816) #include "nsFrame.h" #include "FrameLayerBuilder.h" +#include "FrameMetrics.h" // for ViewID #include "nsViewManager.h" #include "nsView.h" #include "nsCRTGlue.h" @@ -162,11 +163,12 @@ #endif -#include "mozilla/layers/CompositorBridgeChild.h" #include "GeckoProfiler.h" #include "gfxPlatform.h" #include "Layers.h" #include "LayerTreeInvalidation.h" +#include "ClientLayerManager.h" +#include "mozilla/layers/CompositorBridgeChild.h" #include "mozilla/css/ImageLoader.h" #include "mozilla/dom/DocumentTimeline.h" #include "mozilla/Preferences.h" @@ -221,6 +223,8 @@ using namespace mozilla::gfx; using namespace mozilla::layout; using PaintFrameFlags = nsLayoutUtils::PaintFrameFlags; +typedef FrameMetrics::ViewID ViewID; + CapturingContentInfo nsIPresShell::gCaptureInfo = { false /* mAllowed */, false /* mPointerLock */, false /* mRetargetToElement */, false /* mPreventDrag */ }; diff --git a/layout/svg/nsISVGChildFrame.h b/layout/svg/nsISVGChildFrame.h index c9fd0f12a..f74ff89c0 100644 --- a/layout/svg/nsISVGChildFrame.h +++ b/layout/svg/nsISVGChildFrame.h @@ -8,6 +8,7 @@ #include "gfxRect.h" #include "nsQueryFrame.h" +#include "imgIContainer.h" class gfxContext; class gfxMatrix; -- cgit v1.2.3 From 192d2e07c3e5842ca6f005275097449727677fde Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 29 Apr 2020 16:55:02 +0000 Subject: Issue #80 - De-unify layout/PITA... I mean layout/generic --- layout/generic/CSSAlignUtils.h | 1 + layout/generic/ReflowOutput.cpp | 2 ++ layout/generic/RubyUtils.h | 1 + layout/generic/ScrollSnap.h | 2 ++ layout/generic/moz.build | 11 +++-------- layout/generic/nsAbsoluteContainingBlock.cpp | 1 + layout/generic/nsBRFrame.cpp | 1 + layout/generic/nsContainerFrame.cpp | 2 ++ layout/generic/nsFrame.cpp | 1 + layout/generic/nsRubyBaseContainerFrame.cpp | 1 + layout/generic/nsTextFrameUtils.cpp | 2 ++ layout/generic/nsTextRunTransformations.cpp | 1 + layout/generic/nsTextRunTransformations.h | 2 ++ layout/generic/nsViewportFrame.cpp | 1 + 14 files changed, 21 insertions(+), 8 deletions(-) diff --git a/layout/generic/CSSAlignUtils.h b/layout/generic/CSSAlignUtils.h index 3693038b2..a258f4103 100644 --- a/layout/generic/CSSAlignUtils.h +++ b/layout/generic/CSSAlignUtils.h @@ -9,6 +9,7 @@ #define mozilla_CSSAlignUtils_h #include "mozilla/WritingModes.h" +#include "ReflowInput.h" namespace mozilla { diff --git a/layout/generic/ReflowOutput.cpp b/layout/generic/ReflowOutput.cpp index e64e41dc5..1c61484e7 100644 --- a/layout/generic/ReflowOutput.cpp +++ b/layout/generic/ReflowOutput.cpp @@ -8,6 +8,8 @@ #include "mozilla/ReflowOutput.h" #include "mozilla/ReflowInput.h" +using namespace mozilla; + void nsOverflowAreas::UnionWith(const nsOverflowAreas& aOther) { diff --git a/layout/generic/RubyUtils.h b/layout/generic/RubyUtils.h index 8c9545f70..9bba89d0b 100644 --- a/layout/generic/RubyUtils.h +++ b/layout/generic/RubyUtils.h @@ -10,6 +10,7 @@ #include "nsTArray.h" #include "nsGkAtoms.h" #include "nsCSSAnonBoxes.h" +#include "nsIFrame.h" #define RTC_ARRAY_SIZE 1 diff --git a/layout/generic/ScrollSnap.h b/layout/generic/ScrollSnap.h index a2877564d..37609017b 100644 --- a/layout/generic/ScrollSnap.h +++ b/layout/generic/ScrollSnap.h @@ -6,6 +6,8 @@ #ifndef mozilla_layout_ScrollSnap_h_ #define mozilla_layout_ScrollSnap_h_ +#include "nsIScrollableFrame.h" + namespace mozilla { namespace layers { diff --git a/layout/generic/moz.build b/layout/generic/moz.build index 0fe98afec..ad186ef7a 100644 --- a/layout/generic/moz.build +++ b/layout/generic/moz.build @@ -123,7 +123,7 @@ EXPORTS.mozilla.layout += [ 'FrameChildList.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AsyncScrollBase.cpp', 'BlockReflowInput.cpp', 'CSSAlignUtils.cpp', @@ -157,9 +157,11 @@ UNIFIED_SOURCES += [ 'nsIntervalSet.cpp', 'nsLeafFrame.cpp', 'nsLineBox.cpp', + 'nsLineLayout.cpp', 'nsPageContentFrame.cpp', 'nsPageFrame.cpp', 'nsPlaceholderFrame.cpp', + 'nsPluginFrame.cpp', 'nsRubyBaseContainerFrame.cpp', 'nsRubyBaseFrame.cpp', 'nsRubyContentFrame.cpp', @@ -185,13 +187,6 @@ UNIFIED_SOURCES += [ 'TextOverflow.cpp', ] -# nsLineLayout.cpp needs to be built separately because it uses plarena.h. -# nsPluginFrame.cpp needs to be built separately because of name clashes in the OS X headers. -SOURCES += [ - 'nsLineLayout.cpp', - 'nsPluginFrame.cpp', -] - include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index a92a2062d..f444757e8 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -18,6 +18,7 @@ #include "nsPresContext.h" #include "nsCSSFrameConstructor.h" #include "nsGridContainerFrame.h" +#include "nsPlaceholderFrame.h" #include "mozilla/Sprintf.h" diff --git a/layout/generic/nsBRFrame.cpp b/layout/generic/nsBRFrame.cpp index 057210350..12c258674 100644 --- a/layout/generic/nsBRFrame.cpp +++ b/layout/generic/nsBRFrame.cpp @@ -6,6 +6,7 @@ /* rendering object for HTML
elements */ #include "nsCOMPtr.h" +#include "nsContainerframe.h" #include "nsFontMetrics.h" #include "nsFrame.h" #include "nsPresContext.h" diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index e2537968c..3ec93b762 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -29,10 +29,12 @@ #include "nsBoxLayoutState.h" #include "nsCSSFrameConstructor.h" #include "nsBlockFrame.h" +#include "nsBulletFrame.h" #include "nsPlaceholderFrame.h" #include "mozilla/AutoRestore.h" #include "nsIFrameInlines.h" #include "nsPrintfCString.h" +#include "nsAttrValueInlines.h" #include using namespace mozilla; diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index ea29c6945..024cc39bd 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -53,6 +53,7 @@ #include "nsGkAtoms.h" #include "nsHtml5Atoms.h" #include "nsCSSAnonBoxes.h" +#include "nsGenericHTMLElement.h" #include "nsFrameTraversal.h" #include "nsRange.h" diff --git a/layout/generic/nsRubyBaseContainerFrame.cpp b/layout/generic/nsRubyBaseContainerFrame.cpp index 401b7d576..566dee14f 100644 --- a/layout/generic/nsRubyBaseContainerFrame.cpp +++ b/layout/generic/nsRubyBaseContainerFrame.cpp @@ -22,6 +22,7 @@ #include "RubyUtils.h" using namespace mozilla; +using namespace mozilla::gfx; //---------------------------------------------------------------------- diff --git a/layout/generic/nsTextFrameUtils.cpp b/layout/generic/nsTextFrameUtils.cpp index d07400f2b..8562839cc 100644 --- a/layout/generic/nsTextFrameUtils.cpp +++ b/layout/generic/nsTextFrameUtils.cpp @@ -13,6 +13,8 @@ #include "nsUnicharUtils.h" #include +using namespace mozilla; + static bool IsDiscardable(char16_t ch, uint32_t* aFlags) { // Unlike IS_DISCARDABLE, we don't discard \r. \r will be ignored by gfxTextRun diff --git a/layout/generic/nsTextRunTransformations.cpp b/layout/generic/nsTextRunTransformations.cpp index 84d669ed6..ac3edd0b9 100644 --- a/layout/generic/nsTextRunTransformations.cpp +++ b/layout/generic/nsTextRunTransformations.cpp @@ -20,6 +20,7 @@ #include "IrishCasing.h" using namespace mozilla; +using namespace mozilla::gfx; // Unicode characters needing special casing treatment in tr/az languages #define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE 0x0130 diff --git a/layout/generic/nsTextRunTransformations.h b/layout/generic/nsTextRunTransformations.h index 662a5d2f8..db29c7315 100644 --- a/layout/generic/nsTextRunTransformations.h +++ b/layout/generic/nsTextRunTransformations.h @@ -12,6 +12,8 @@ #include "gfxTextRun.h" #include "nsStyleContext.h" +using namespace mozilla; + class nsTransformedTextRun; struct nsTransformedCharStyle final { diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index 39491a0ed..20378e766 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -16,6 +16,7 @@ #include "nsAbsoluteContainingBlock.h" #include "GeckoProfiler.h" #include "nsIMozBrowserFrame.h" +#include "nsPlaceholderFrame.h" using namespace mozilla; typedef nsAbsoluteContainingBlock::AbsPosReflowFlags AbsPosReflowFlags; -- cgit v1.2.3 From a78a87502d9973893d2d19daa17e75bc1a1043ca Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 29 Apr 2020 19:53:36 +0000 Subject: Issue #80 - De-unify layout/printing --- layout/printing/ipc/RemotePrintJobParent.cpp | 1 - layout/printing/ipc/RemotePrintJobParent.h | 2 +- layout/printing/moz.build | 3 ++- layout/printing/nsPrintData.cpp | 2 ++ layout/printing/nsPrintEngine.cpp | 3 ++- layout/printing/nsPrintObject.cpp | 4 ++++ 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/layout/printing/ipc/RemotePrintJobParent.cpp b/layout/printing/ipc/RemotePrintJobParent.cpp index 2f4dbd56e..d49927da3 100644 --- a/layout/printing/ipc/RemotePrintJobParent.cpp +++ b/layout/printing/ipc/RemotePrintJobParent.cpp @@ -18,7 +18,6 @@ #include "nsIDeviceContextSpec.h" #include "nsIPrintSettings.h" #include "nsIWebProgressListener.h" -#include "PrintTranslator.h" namespace mozilla { namespace layout { diff --git a/layout/printing/ipc/RemotePrintJobParent.h b/layout/printing/ipc/RemotePrintJobParent.h index a96cc7eaa..752ef601e 100644 --- a/layout/printing/ipc/RemotePrintJobParent.h +++ b/layout/printing/ipc/RemotePrintJobParent.h @@ -13,11 +13,11 @@ #include "nsCOMPtr.h" #include "mozilla/RefPtr.h" #include "mozilla/UniquePtr.h" +#include "mozilla/layout/PrintTranslator.h" class nsDeviceContext; class nsIPrintSettings; class nsIWebProgressListener; -class PrintTranslator; namespace mozilla { namespace layout { diff --git a/layout/printing/moz.build b/layout/printing/moz.build index 1a82d7cdb..745c45c4b 100644 --- a/layout/printing/moz.build +++ b/layout/printing/moz.build @@ -13,11 +13,12 @@ XPIDL_SOURCES += [ EXPORTS.mozilla.layout += [ 'ipc/RemotePrintJobChild.h', 'ipc/RemotePrintJobParent.h', + 'PrintTranslator.h', ] XPIDL_MODULE = 'layout_printing' -UNIFIED_SOURCES += [ +SOURCES += [ 'ipc/RemotePrintJobChild.cpp', 'ipc/RemotePrintJobParent.cpp', 'nsPagePrintTimer.cpp', diff --git a/layout/printing/nsPrintData.cpp b/layout/printing/nsPrintData.cpp index 1914f779b..d760f7f0a 100644 --- a/layout/printing/nsPrintData.cpp +++ b/layout/printing/nsPrintData.cpp @@ -7,9 +7,11 @@ #include "nsIStringBundle.h" #include "nsIServiceManager.h" +#include "nsPIDOMWindow.h" #include "nsPrintObject.h" #include "nsPrintPreviewListener.h" #include "nsIWebProgressListener.h" +#include "nsIWidget.h" #include "mozilla/Services.h" //----------------------------------------------------- diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index 0c455f563..732a7dc92 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -16,6 +16,7 @@ #include "nsPIDOMWindow.h" #include "nsIDocShell.h" #include "nsIURI.h" +#include "nsIFile.h" #include "nsITextToSubURI.h" #include "nsError.h" @@ -143,7 +144,7 @@ using namespace mozilla::dom; #define DUMP_LAYOUT_LEVEL 9 // this turns on the dumping of each doucment's layout info #ifndef PR_PL -static mozilla::LazyLogModule gPrintingLog("printing") +static mozilla::LazyLogModule gPrintingLog("printing"); #define PR_PL(_p1) MOZ_LOG(gPrintingLog, mozilla::LogLevel::Debug, _p1); #endif diff --git a/layout/printing/nsPrintObject.cpp b/layout/printing/nsPrintObject.cpp index 9165374c2..fe9622a1c 100644 --- a/layout/printing/nsPrintObject.cpp +++ b/layout/printing/nsPrintObject.cpp @@ -6,6 +6,7 @@ #include "nsPrintObject.h" #include "nsIContentViewer.h" #include "nsIDOMDocument.h" +#include "nsIDOMElement.h" #include "nsContentUtils.h" // for nsAutoScriptBlocker #include "nsIInterfaceRequestorUtils.h" #include "nsPIDOMWindow.h" @@ -14,6 +15,9 @@ #include "nsIDocShellTreeItem.h" #include "nsIBaseWindow.h" #include "nsIDocument.h" +#include "nsIWidget.h" +#include "mozilla/Unused.h" +#include "mozilla/dom/Element.h" //--------------------------------------------------- //-- nsPrintObject Class Impl -- cgit v1.2.3 From ae707c8dbb26942e11c231965afc3505ba2f7d93 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 30 Apr 2020 16:41:13 +0000 Subject: Issue #80 - De-unify layout/style --- layout/style/CSSLexer.h | 1 + layout/style/CSSStyleSheet.cpp | 1 + layout/style/DocumentStyleRootIterator.h | 1 + layout/style/RuleProcessorCache.cpp | 1 + layout/style/ServoStyleSet.cpp | 1 + layout/style/ServoStyleSheet.cpp | 4 ++++ layout/style/StyleRule.cpp | 1 + layout/style/StyleSheet.cpp | 3 +++ layout/style/moz.build | 12 +++--------- layout/style/nsCSSProps.h | 4 ++-- layout/style/nsCSSPseudoClassList.h | 2 ++ layout/style/nsCSSPseudoClasses.cpp | 1 + layout/style/nsCSSPseudoClasses.h | 2 ++ layout/style/nsCSSRules.h | 1 - layout/style/nsCSSValue.cpp | 7 ++++--- layout/style/nsComputedDOMStyle.cpp | 2 ++ layout/style/nsDOMCSSAttrDeclaration.cpp | 5 +++++ layout/style/nsMediaFeatures.cpp | 1 + layout/style/nsStyleContext.cpp | 3 +++ layout/style/nsStyleStruct.cpp | 1 + 20 files changed, 39 insertions(+), 15 deletions(-) diff --git a/layout/style/CSSLexer.h b/layout/style/CSSLexer.h index 8b41d2778..4eff7a528 100644 --- a/layout/style/CSSLexer.h +++ b/layout/style/CSSLexer.h @@ -9,6 +9,7 @@ #include "mozilla/UniquePtr.h" #include "nsCSSScanner.h" #include "mozilla/dom/CSSLexerBinding.h" +#include "mozilla/dom/NonRefcountedDOMObject.h" namespace mozilla { namespace dom { diff --git a/layout/style/CSSStyleSheet.cpp b/layout/style/CSSStyleSheet.cpp index 43d47100d..40a4ee4d8 100644 --- a/layout/style/CSSStyleSheet.cpp +++ b/layout/style/CSSStyleSheet.cpp @@ -47,6 +47,7 @@ #include "mozilla/RuleProcessorCache.h" #include "nsIStyleSheetLinkingElement.h" #include "nsDOMWindowUtils.h" +#include "nsStyleSet.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/layout/style/DocumentStyleRootIterator.h b/layout/style/DocumentStyleRootIterator.h index 7dcdc7fa1..98d9fd32f 100644 --- a/layout/style/DocumentStyleRootIterator.h +++ b/layout/style/DocumentStyleRootIterator.h @@ -8,6 +8,7 @@ #define DocumentStyleRootIterator_h #include "nsTArray.h" +#include "mozilla/dom/Element.h" class nsIContent; class nsIDocument; diff --git a/layout/style/RuleProcessorCache.cpp b/layout/style/RuleProcessorCache.cpp index 23832c230..e2e788c56 100644 --- a/layout/style/RuleProcessorCache.cpp +++ b/layout/style/RuleProcessorCache.cpp @@ -13,6 +13,7 @@ #include #include "nsCSSRuleProcessor.h" #include "nsThreadUtils.h" +#include "CSSStyleSheet.h" using namespace mozilla; diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index 331e2322a..38e02e66d 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -6,6 +6,7 @@ #include "mozilla/ServoStyleSet.h" +#include "ServoBindings.h" #include "mozilla/ServoRestyleManager.h" #include "mozilla/dom/ChildIterator.h" #include "nsCSSAnonBoxes.h" diff --git a/layout/style/ServoStyleSheet.cpp b/layout/style/ServoStyleSheet.cpp index 5f2a925b5..e03ad2865 100644 --- a/layout/style/ServoStyleSheet.cpp +++ b/layout/style/ServoStyleSheet.cpp @@ -4,8 +4,12 @@ * 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/. */ +#include "ServoBindings.h" #include "mozilla/ServoStyleSheet.h" #include "mozilla/StyleBackendType.h" +#include "CSSRuleList.h" + +using namespace mozilla::dom; namespace mozilla { diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index aca97a505..8fde72534 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -36,6 +36,7 @@ class nsIDOMCSSStyleDeclaration; class nsIDOMCSSStyleSheet; using namespace mozilla; +using namespace mozilla::dom; #define NS_IF_CLONE(member_) \ PR_BEGIN_MACRO \ diff --git a/layout/style/StyleSheet.cpp b/layout/style/StyleSheet.cpp index f125cf97e..d4bc94186 100644 --- a/layout/style/StyleSheet.cpp +++ b/layout/style/StyleSheet.cpp @@ -6,6 +6,7 @@ #include "mozilla/StyleSheet.h" +#include "mozilla/dom/BindingDeclarations.h" // for Optional<> #include "mozilla/dom/CSSRuleList.h" #include "mozilla/dom/ShadowRoot.h" #include "mozilla/ServoStyleSheet.h" @@ -16,6 +17,8 @@ #include "nsIMediaList.h" #include "nsNullPrincipal.h" +using namespace mozilla::dom; + namespace mozilla { StyleSheet::StyleSheet(StyleBackendType aType, css::SheetParsingMode aParsingMode) diff --git a/layout/style/moz.build b/layout/style/moz.build index 40b9fd659..74caf94df 100644 --- a/layout/style/moz.build +++ b/layout/style/moz.build @@ -140,7 +140,7 @@ EXPORTS.mozilla.css += [ 'StyleRule.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AnimationCollection.cpp', 'AnimationCommon.cpp', 'CounterStyleManager.cpp', @@ -171,6 +171,7 @@ UNIFIED_SOURCES += [ 'nsCSSProps.cpp', 'nsCSSPseudoClasses.cpp', 'nsCSSPseudoElements.cpp', + 'nsCSSRuleProcessor.cpp', 'nsCSSRules.cpp', 'nsCSSScanner.cpp', 'nsCSSValue.cpp', @@ -183,6 +184,7 @@ UNIFIED_SOURCES += [ 'nsFontFaceUtils.cpp', 'nsHTMLCSSStyleSheet.cpp', 'nsHTMLStyleSheet.cpp', + 'nsLayoutStylesheetCache.cpp', 'nsMediaFeatures.cpp', 'nsNthIndexCache.cpp', 'nsROCSSPrimitiveValue.cpp', @@ -208,14 +210,6 @@ UNIFIED_SOURCES += [ 'SVGAttrAnimationRuleProcessor.cpp', ] -# nsCSSRuleProcessor.cpp needs to be built separately because it uses plarena.h. -# nsLayoutStylesheetCache.cpp needs to be built separately because it uses -# nsExceptionHandler.h, which includes windows.h. -SOURCES += [ - 'nsCSSRuleProcessor.cpp', - 'nsLayoutStylesheetCache.cpp', -] - EXTRA_COMPONENTS += [ 'CSSUnprefixingService.js', 'CSSUnprefixingService.manifest', diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index e67e1d41d..aabbac07a 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -345,7 +345,7 @@ public: // KTableEntry objects can be initialized either with an int16_t value // or a value of an enumeration type that can fit within an int16_t. - constexpr KTableEntry(nsCSSKeyword aKeyword, int16_t aValue) + KTableEntry(nsCSSKeyword aKeyword, int16_t aValue) : mKeyword(aKeyword) , mValue(aValue) { @@ -353,7 +353,7 @@ public: template::value>::type> - constexpr KTableEntry(nsCSSKeyword aKeyword, T aValue) + KTableEntry(nsCSSKeyword aKeyword, T aValue) : mKeyword(aKeyword) , mValue(static_cast(aValue)) { diff --git a/layout/style/nsCSSPseudoClassList.h b/layout/style/nsCSSPseudoClassList.h index 12f43af5b..7f620ec32 100644 --- a/layout/style/nsCSSPseudoClassList.h +++ b/layout/style/nsCSSPseudoClassList.h @@ -38,6 +38,8 @@ * automatically defined to CSS_PSEUDO_CLASS. */ +#include "nsCSSPseudoElements.h" + // OUTPUT_CLASS=nsCSSPseudoClasses // MACRO_NAME=CSS_PSEUDO_CLASS diff --git a/layout/style/nsCSSPseudoClasses.cpp b/layout/style/nsCSSPseudoClasses.cpp index 9b26459dd..a174525b1 100644 --- a/layout/style/nsCSSPseudoClasses.cpp +++ b/layout/style/nsCSSPseudoClasses.cpp @@ -13,6 +13,7 @@ #include "nsString.h" using namespace mozilla; +using namespace mozilla::css; // define storage for all atoms #define CSS_PSEUDO_CLASS(_name, _value, _flags, _pref) \ diff --git a/layout/style/nsCSSPseudoClasses.h b/layout/style/nsCSSPseudoClasses.h index ca1cb2f39..55e5bf9d2 100644 --- a/layout/style/nsCSSPseudoClasses.h +++ b/layout/style/nsCSSPseudoClasses.h @@ -9,6 +9,8 @@ #define nsCSSPseudoClasses_h___ #include "nsStringFwd.h" +#include "mozilla/CSSEnabledState.h" +#include "nsStyleStruct.h" // The following two flags along with the pref defines where this pseudo // class can be used: diff --git a/layout/style/nsCSSRules.h b/layout/style/nsCSSRules.h index 1bd468cb6..1c6361c3e 100644 --- a/layout/style/nsCSSRules.h +++ b/layout/style/nsCSSRules.h @@ -41,7 +41,6 @@ namespace mozilla { namespace dom { class DocGroup; -class DocGroup; } // namespace dom class ErrorResult; diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index baf5b7897..0a905a055 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -6,11 +6,12 @@ /* representation of simple property values within CSS declarations */ +#include "mozilla/ArrayUtils.h" + #include "nsCSSValue.h" #include "mozilla/StyleSheetInlines.h" #include "mozilla/Likely.h" -#include "mozilla/MemoryReporting.h" #include "mozilla/Move.h" #include "mozilla/css/ImageLoader.h" #include "CSSCalc.h" @@ -18,8 +19,6 @@ #include "imgIRequest.h" #include "imgRequestProxy.h" #include "nsIDocument.h" -#include "nsIPrincipal.h" -#include "nsCSSProps.h" #include "nsNetUtil.h" #include "nsPresContext.h" #include "nsStyleUtil.h" @@ -27,7 +26,9 @@ #include "nsStyleSet.h" #include "nsContentUtils.h" + using namespace mozilla; +using namespace mozilla::css; static bool IsLocalRefURL(nsStringBuffer* aString) diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 20e5651bd..1032be651 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -54,6 +54,8 @@ using namespace mozilla; using namespace mozilla::dom; +typedef nsCSSProps::KTableEntry KTableEntry; + #if defined(DEBUG_bzbarsky) || defined(DEBUG_caillon) #define DEBUG_ComputedDOMStyle #endif diff --git a/layout/style/nsDOMCSSAttrDeclaration.cpp b/layout/style/nsDOMCSSAttrDeclaration.cpp index 7b659a8cc..652bd4ad1 100644 --- a/layout/style/nsDOMCSSAttrDeclaration.cpp +++ b/layout/style/nsDOMCSSAttrDeclaration.cpp @@ -10,6 +10,7 @@ #include "mozilla/css/Declaration.h" #include "mozilla/css/StyleRule.h" #include "mozilla/dom/Element.h" +#include "mozilla/dom/DocGroup.h" #include "nsIDocument.h" #include "nsIDOMMutationEvent.h" #include "nsIURI.h" @@ -17,8 +18,12 @@ #include "nsWrapperCacheInlines.h" #include "nsIFrame.h" #include "ActiveLayerTracker.h" +#include "ServoDeclarationBlock.h" +#include "StyleSetHandle.h" +#include "DeclarationBlockInlines.h" using namespace mozilla; +using namespace mozilla::dom; nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElement, bool aIsSMILOverride) diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp index 854236e51..f33f8dd33 100644 --- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp @@ -19,6 +19,7 @@ #include "nsDeviceContext.h" #include "nsIBaseWindow.h" #include "nsIDocument.h" +#include "nsIWidget.h" #include "nsContentUtils.h" #include "mozilla/StyleSheet.h" #include "mozilla/StyleSheetInlines.h" diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index 7ad260f1b..4b1a14897 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -12,6 +12,8 @@ #include "nsCSSAnonBoxes.h" #include "nsCSSPseudoElements.h" #include "nsStyleConsts.h" +#include "nsStyleStruct.h" +#include "nsStyleStructInlines.h" #include "nsString.h" #include "nsPresContext.h" #include "nsIStyleRule.h" @@ -35,6 +37,7 @@ #include "mozilla/ReflowInput.h" #include "nsLayoutUtils.h" #include "nsCoord.h" +#include "nsFontMetrics.h" // Ensure the binding function declarations in nsStyleContext.h matches // those in ServoBindings.h. diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 72c103724..200f934c5 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -40,6 +40,7 @@ #include using namespace mozilla; +using namespace mozilla::dom; static_assert((((1 << nsStyleStructID_Length) - 1) & ~(NS_STYLE_INHERIT_MASK)) == 0, -- cgit v1.2.3 From 6e8e1b36dd44668c2428c329383c58427888a2b4 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 30 Apr 2020 21:02:50 +0000 Subject: Issue #80 - De-unify layout/svg --- layout/svg/SVGTextFrame.cpp | 1 + layout/svg/moz.build | 2 +- layout/svg/nsFilterInstance.cpp | 1 + layout/svg/nsSVGContainerFrame.cpp | 1 + layout/svg/nsSVGFilterInstance.cpp | 1 + layout/svg/nsSVGIntegrationUtils.h | 1 + layout/svg/nsSVGMarkerFrame.cpp | 1 + layout/svg/nsSVGOuterSVGFrame.cpp | 3 +++ layout/svg/nsSVGSwitchFrame.cpp | 1 + layout/svg/nsSVGUtils.cpp | 1 + 10 files changed, 12 insertions(+), 1 deletion(-) diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index 6ba267ee8..ebb5298b7 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -37,6 +37,7 @@ #include "nsTextNode.h" #include "SVGAnimatedNumberList.h" #include "SVGContentUtils.h" +#include "SVGContextPaint.h" #include "SVGLengthList.h" #include "SVGNumberList.h" #include "SVGPathElement.h" diff --git a/layout/svg/moz.build b/layout/svg/moz.build index b1481f4ef..69d5d2a3b 100644 --- a/layout/svg/moz.build +++ b/layout/svg/moz.build @@ -21,7 +21,7 @@ EXPORTS.mozilla += [ 'SVGContextPaint.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsCSSClipPathInstance.cpp', 'nsCSSFilterInstance.cpp', 'nsFilterInstance.cpp', diff --git a/layout/svg/nsFilterInstance.cpp b/layout/svg/nsFilterInstance.cpp index fe52b8a8f..0735807ce 100644 --- a/layout/svg/nsFilterInstance.cpp +++ b/layout/svg/nsFilterInstance.cpp @@ -28,6 +28,7 @@ using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::gfx; +using namespace mozilla::image; FilterDescription nsFilterInstance::GetFilterDescription(nsIContent* aFilteredElement, diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index 750dcc9da..15af5da99 100644 --- a/layout/svg/nsSVGContainerFrame.cpp +++ b/layout/svg/nsSVGContainerFrame.cpp @@ -17,6 +17,7 @@ #include "SVGTextFrame.h" using namespace mozilla; +using namespace mozilla::image; NS_QUERYFRAME_HEAD(nsSVGContainerFrame) NS_QUERYFRAME_ENTRY(nsSVGContainerFrame) diff --git a/layout/svg/nsSVGFilterInstance.cpp b/layout/svg/nsSVGFilterInstance.cpp index 59b5a27ba..462c0098b 100644 --- a/layout/svg/nsSVGFilterInstance.cpp +++ b/layout/svg/nsSVGFilterInstance.cpp @@ -13,6 +13,7 @@ #include "mozilla/dom/HTMLCanvasElement.h" #include "mozilla/dom/SVGFilterElement.h" #include "nsReferencedElement.h" +#include "nsSVGEffects.h" #include "nsSVGFilterFrame.h" #include "nsSVGUtils.h" #include "SVGContentUtils.h" diff --git a/layout/svg/nsSVGIntegrationUtils.h b/layout/svg/nsSVGIntegrationUtils.h index e3eb3c5f2..471e3fb04 100644 --- a/layout/svg/nsSVGIntegrationUtils.h +++ b/layout/svg/nsSVGIntegrationUtils.h @@ -10,6 +10,7 @@ #include "gfxRect.h" #include "nsRegionFwd.h" #include "mozilla/gfx/Rect.h" +#include "imgIContainer.h" class gfxContext; class gfxDrawable; diff --git a/layout/svg/nsSVGMarkerFrame.cpp b/layout/svg/nsSVGMarkerFrame.cpp index 93b76b17f..af19cc025 100644 --- a/layout/svg/nsSVGMarkerFrame.cpp +++ b/layout/svg/nsSVGMarkerFrame.cpp @@ -15,6 +15,7 @@ using namespace mozilla::dom; using namespace mozilla::gfx; +using namespace mozilla::image; nsContainerFrame* NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index b1ee54eb9..306b3de7a 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -18,9 +18,12 @@ #include "mozilla/dom/SVGSVGElement.h" #include "mozilla/dom/SVGViewElement.h" #include "nsSubDocumentFrame.h" +#include "gfxMatrix.h" using namespace mozilla; using namespace mozilla::dom; +using namespace mozilla::gfx; +using namespace mozilla::image; //---------------------------------------------------------------------- // Implementation helpers diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp index 26e77071b..e68043228 100644 --- a/layout/svg/nsSVGSwitchFrame.cpp +++ b/layout/svg/nsSVGSwitchFrame.cpp @@ -11,6 +11,7 @@ #include "nsSVGUtils.h" using namespace mozilla::gfx; +using namespace mozilla::image; class nsSVGSwitchFrame : public nsSVGGFrame { diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp index c3394e292..103a4ce1a 100644 --- a/layout/svg/nsSVGUtils.cpp +++ b/layout/svg/nsSVGUtils.cpp @@ -58,6 +58,7 @@ using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::gfx; +using namespace mozilla::image; static bool sSVGPathCachingEnabled; static bool sSVGDisplayListHitTestingEnabled; -- cgit v1.2.3 From 4aafee310e2833cc916ba5ae8435a4b156fd278b Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 30 Apr 2020 21:45:28 +0000 Subject: Issue #80 - De-unify layout/tables --- layout/tables/FixedTableLayoutStrategy.cpp | 4 ++++ layout/tables/SpanningCellSorter.cpp | 2 ++ layout/tables/moz.build | 2 +- layout/tables/nsTableFrame.cpp | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/layout/tables/FixedTableLayoutStrategy.cpp b/layout/tables/FixedTableLayoutStrategy.cpp index 427765795..d69946a33 100644 --- a/layout/tables/FixedTableLayoutStrategy.cpp +++ b/layout/tables/FixedTableLayoutStrategy.cpp @@ -15,6 +15,10 @@ #include "nsTableCellFrame.h" #include +#include "mozilla/WritingModes.h" + +using namespace mozilla; + FixedTableLayoutStrategy::FixedTableLayoutStrategy(nsTableFrame *aTableFrame) : nsITableLayoutStrategy(nsITableLayoutStrategy::Fixed) , mTableFrame(aTableFrame) diff --git a/layout/tables/SpanningCellSorter.cpp b/layout/tables/SpanningCellSorter.cpp index c67d784bb..686b02d89 100644 --- a/layout/tables/SpanningCellSorter.cpp +++ b/layout/tables/SpanningCellSorter.cpp @@ -12,6 +12,8 @@ #include "nsQuickSort.h" #include "nsIPresShell.h" +using mozilla::fallible; + //#define DEBUG_SPANNING_CELL_SORTER SpanningCellSorter::SpanningCellSorter() diff --git a/layout/tables/moz.build b/layout/tables/moz.build index e28e21ee0..554ffebec 100644 --- a/layout/tables/moz.build +++ b/layout/tables/moz.build @@ -13,7 +13,7 @@ EXPORTS += [ 'nsITableCellLayout.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'BasicTableLayoutStrategy.cpp', 'FixedTableLayoutStrategy.cpp', 'nsCellMap.cpp', diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index e5a48139a..648fa7ddf 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -41,6 +41,7 @@ #include "nsCSSFrameConstructor.h" #include "mozilla/StyleSetHandle.h" #include "mozilla/StyleSetHandleInlines.h" +#include "mozilla/gfx/Helpers.h" #include "nsDisplayList.h" #include "nsIScrollableFrame.h" #include "nsCSSProps.h" @@ -48,6 +49,7 @@ #include using namespace mozilla; +using namespace mozilla::gfx; using namespace mozilla::image; using namespace mozilla::layout; -- cgit v1.2.3 From e11620a0f5b81ddd439c3547bd1ee41330852d2b Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 30 Apr 2020 22:30:35 +0000 Subject: Issue #80 - De-unify layout/xul and tree, grid --- layout/xul/ContainerBoxObject.h | 1 + layout/xul/grid/moz.build | 2 +- layout/xul/moz.build | 4 ++-- layout/xul/nsButtonBoxFrame.cpp | 1 + layout/xul/nsMenuBarListener.cpp | 1 + layout/xul/nsMenuFrame.cpp | 1 + layout/xul/nsMenuPopupFrame.cpp | 3 +++ layout/xul/nsResizerFrame.h | 3 +++ layout/xul/tree/moz.build | 2 +- 9 files changed, 14 insertions(+), 4 deletions(-) diff --git a/layout/xul/ContainerBoxObject.h b/layout/xul/ContainerBoxObject.h index b3da97991..d9da164ea 100644 --- a/layout/xul/ContainerBoxObject.h +++ b/layout/xul/ContainerBoxObject.h @@ -8,6 +8,7 @@ #define mozilla_dom_ContainerBoxObject_h #include "mozilla/dom/BoxObject.h" +#include "nsIDocShell.h" namespace mozilla { namespace dom { diff --git a/layout/xul/grid/moz.build b/layout/xul/grid/moz.build index 074985aaf..049489ab2 100644 --- a/layout/xul/grid/moz.build +++ b/layout/xul/grid/moz.build @@ -19,7 +19,7 @@ EXPORTS += [ 'nsIGridPart.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsGrid.cpp', 'nsGridCell.cpp', 'nsGridLayout2.cpp', diff --git a/layout/xul/moz.build b/layout/xul/moz.build index 8ed304c9f..18b120b34 100644 --- a/layout/xul/moz.build +++ b/layout/xul/moz.build @@ -44,7 +44,7 @@ EXPORTS.mozilla.dom += [ 'ScrollBoxObject.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'BoxObject.cpp', 'nsBox.cpp', 'nsBoxFrame.cpp', @@ -64,7 +64,7 @@ UNIFIED_SOURCES += [ ] if CONFIG['MOZ_XUL']: - UNIFIED_SOURCES += [ + SOURCES += [ 'ContainerBoxObject.cpp', 'ListBoxObject.cpp', 'MenuBoxObject.cpp', diff --git a/layout/xul/nsButtonBoxFrame.cpp b/layout/xul/nsButtonBoxFrame.cpp index 45d934516..e69c91929 100644 --- a/layout/xul/nsButtonBoxFrame.cpp +++ b/layout/xul/nsButtonBoxFrame.cpp @@ -12,6 +12,7 @@ #include "nsPresContext.h" #include "nsIPresShell.h" #include "nsIDOMElement.h" +#include "nsIDOMEvent.h" #include "nsDisplayList.h" #include "nsContentUtils.h" #include "mozilla/dom/Element.h" diff --git a/layout/xul/nsMenuBarListener.cpp b/layout/xul/nsMenuBarListener.cpp index 0fce497b8..23df81937 100644 --- a/layout/xul/nsMenuBarListener.cpp +++ b/layout/xul/nsMenuBarListener.cpp @@ -21,6 +21,7 @@ #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" #include "mozilla/TextEvents.h" +#include "mozilla/dom/Event.h" using namespace mozilla; diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index 67fcdbe43..cb12dfc0a 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -48,6 +48,7 @@ #include using namespace mozilla; +using namespace mozilla::dom; #define NS_MENU_POPUP_LIST_INDEX 0 diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index 6e706e49c..3f934b208 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -18,6 +18,7 @@ #include "nsMenuBarFrame.h" #include "nsPopupSetFrame.h" #include "nsPIDOMWindow.h" +#include "nsIDOMEvent.h" #include "nsIDOMKeyEvent.h" #include "nsIDOMScreen.h" #include "nsIPresShell.h" @@ -45,6 +46,7 @@ #include "nsThemeConstants.h" #include "nsTransitionManager.h" #include "nsDisplayList.h" +#include "nsIDOMXULMenuListElement.h" #include "nsIDOMXULSelectCntrlItemEl.h" #include "mozilla/EventDispatcher.h" #include "mozilla/EventStateManager.h" @@ -53,6 +55,7 @@ #include "mozilla/LookAndFeel.h" #include "mozilla/MouseEvents.h" #include "mozilla/dom/Element.h" +#include "mozilla/dom/Event.h" #include "mozilla/dom/PopupBoxObject.h" #include diff --git a/layout/xul/nsResizerFrame.h b/layout/xul/nsResizerFrame.h index 92656bc76..41efa79a7 100644 --- a/layout/xul/nsResizerFrame.h +++ b/layout/xul/nsResizerFrame.h @@ -8,9 +8,12 @@ #include "mozilla/Attributes.h" #include "mozilla/EventForwards.h" #include "nsTitleBarFrame.h" +#include "Units.h" class nsIBaseWindow; +using namespace mozilla; + class nsResizerFrame : public nsTitleBarFrame { protected: diff --git a/layout/xul/tree/moz.build b/layout/xul/tree/moz.build index ccac5bde9..7d150881a 100644 --- a/layout/xul/tree/moz.build +++ b/layout/xul/tree/moz.build @@ -27,7 +27,7 @@ EXPORTS.mozilla.dom += [ 'TreeBoxObject.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsTreeBodyFrame.cpp', 'nsTreeColFrame.cpp', 'nsTreeColumns.cpp', -- cgit v1.2.3 From 18b2328bb632c2eb02513dea8f310482131fe377 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 1 May 2020 11:14:26 +0000 Subject: Issue #80 - Resolve issues with compiling on insane gcc configurations with no optimizations in layout/ (and fix a typo for cs fs) --- layout/generic/nsBRFrame.cpp | 2 +- layout/style/Declaration.cpp | 1 + layout/style/nsCSSScanner.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/layout/generic/nsBRFrame.cpp b/layout/generic/nsBRFrame.cpp index 12c258674..08c0fe3dd 100644 --- a/layout/generic/nsBRFrame.cpp +++ b/layout/generic/nsBRFrame.cpp @@ -6,7 +6,7 @@ /* rendering object for HTML
elements */ #include "nsCOMPtr.h" -#include "nsContainerframe.h" +#include "nsContainerFrame.h" #include "nsFontMetrics.h" #include "nsFrame.h" #include "nsPresContext.h" diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index b2de159ed..9d7ca312c 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -14,6 +14,7 @@ #include "mozilla/css/Declaration.h" #include "nsPrintfCString.h" #include "gfxFontConstants.h" +#include "nsCSSRules.h" #include "nsStyleUtil.h" namespace mozilla { diff --git a/layout/style/nsCSSScanner.cpp b/layout/style/nsCSSScanner.cpp index 2110be78c..b1524a3bb 100644 --- a/layout/style/nsCSSScanner.cpp +++ b/layout/style/nsCSSScanner.cpp @@ -14,6 +14,8 @@ #include "mozilla/Likely.h" #include +using mozilla::IsNaN; + /* Character class tables and related helper functions. */ static const uint8_t IS_HEX_DIGIT = 0x01; -- cgit v1.2.3 From 0c175b93cfe4e4bb1e399c35c9e0259b43a2dab8 Mon Sep 17 00:00:00 2001 From: adeshkp Date: Fri, 1 May 2020 23:43:15 +0530 Subject: Issue #80 - Include nsIContentInlines.h in layout/base/PositionedEventTargeting.cpp --- layout/base/PositionedEventTargeting.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/layout/base/PositionedEventTargeting.cpp b/layout/base/PositionedEventTargeting.cpp index 8374ab9d2..668ff2938 100644 --- a/layout/base/PositionedEventTargeting.cpp +++ b/layout/base/PositionedEventTargeting.cpp @@ -8,6 +8,7 @@ #include "mozilla/EventStates.h" #include "mozilla/MouseEvents.h" #include "mozilla/Preferences.h" +#include "nsIContentInlines.h" #include "nsLayoutUtils.h" #include "nsGkAtoms.h" #include "nsFontMetrics.h" -- cgit v1.2.3