Issue #80 - De-unify layout/base

This commit is contained in:
Moonchild 2020-04-29 12:36:53 +00:00 committed by Roy Tam
commit 118743b970
12 changed files with 43 additions and 15 deletions

View file

@ -10,6 +10,7 @@
#include "nsAutoPtr.h"
#include "nsPresContext.h"
#include "mozilla/gfx/Matrix.h"
#include "mozilla/layers/ShadowLayers.h"
namespace mozilla {

View file

@ -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;

View file

@ -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)

View file

@ -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 */

View file

@ -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 {

View file

@ -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"

View file

@ -12,6 +12,8 @@
#include "nsPresShell.h"
#include "nsView.h"
using namespace mozilla::dom;
namespace mozilla {
nsDataHashtable<nsUint32HashKey, TouchManager::TouchInfo>* TouchManager::sCaptureTouchList;

View file

@ -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']

View file

@ -10,6 +10,7 @@
#include "nsPlaceholderFrame.h"
#include "nsContainerFrame.h"
using namespace mozilla;
class nsFrameIterator : public nsIFrameEnumerator
{

View file

@ -118,6 +118,7 @@
#include "mozilla/StyleSetHandleInlines.h"
#include "RegionBuilder.h"
#include "SVGSVGElement.h"
#include "nsDocument.h"
#ifdef MOZ_XUL
#include "nsXULPopupManager.h"

View file

@ -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 */ };

View file

@ -8,6 +8,7 @@
#include "gfxRect.h"
#include "nsQueryFrame.h"
#include "imgIContainer.h"
class gfxContext;
class gfxMatrix;