summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-04-29 12:36:53 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-05-06 19:05:49 +0200
commit528abd534ef3e785d4a926a235e58f5c5179aef5 (patch)
tree67d848fa3880b5761ebf26fddf397dbe16880730 /layout/base
parent519030e688dd7075a7cd9f14dd6fb9e210b5a689 (diff)
downloadUXP-528abd534ef3e785d4a926a235e58f5c5179aef5.tar
UXP-528abd534ef3e785d4a926a235e58f5c5179aef5.tar.gz
UXP-528abd534ef3e785d4a926a235e58f5c5179aef5.tar.lz
UXP-528abd534ef3e785d4a926a235e58f5c5179aef5.tar.xz
UXP-528abd534ef3e785d4a926a235e58f5c5179aef5.zip
Issue #80 - De-unify layout/base
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/MaskLayerImageCache.h1
-rw-r--r--layout/base/MobileViewportManager.h3
-rw-r--r--layout/base/RestyleManager.cpp7
-rw-r--r--layout/base/RestyleManager.h6
-rw-r--r--layout/base/RestyleManagerBase.cpp18
-rw-r--r--layout/base/ServoRestyleManager.cpp1
-rw-r--r--layout/base/TouchManager.cpp2
-rw-r--r--layout/base/moz.build11
-rw-r--r--layout/base/nsFrameTraversal.cpp1
-rw-r--r--layout/base/nsLayoutUtils.cpp1
-rw-r--r--layout/base/nsPresShell.cpp6
11 files changed, 42 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 124b5535e..a5a4e1237 100644
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -239,11 +239,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).
nsresult
@@ -1008,7 +1003,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 e22fe9058..4886d77bc 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<ReframingStyleContexts*> mRestorePointer;
@@ -880,6 +881,11 @@ private:
AutoTArray<mozilla::dom::Element*, 4> 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 6ef048a19..e2145934b 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 42ca23bb1..82c81ea46 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<nsUint32HashKey, TouchManager::TouchInfo>* 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 40fb5ff30..ab07d07df 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 21d20c69f..04ac9ef52 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 264b52b18..2615bbc49 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 */ };