Bug 1613192: Fix non-unified build bustage in layout/{base,generic} directories. r=TYLin

Summary of the changes/reasons:

- LayoutTelemetryTools.h directly uses several types whose headers it needs to
  include. (These includes were present in its .cpp file; I'm migrating them
  from there to the .h file, and I'm adding a new include for "Saturate.h" to
  provide the SaturateUint8 type.)

- LayoutTelemetryTools.cpp needs an include for MainThreadUtils.h, to provide
  NS_IsMainThread().

- StaticPresData.cpp needs an include for ServoUtils.h, to provide
  AssertIsMainThreadOrServoFontMetricsLocked().

- ZoomConstraintsClient.h needs a forward-decl for mozilla::dom::Document since
  it uses a pointer of that type in a function-decl.

- ScrollSnap.h needs forward-decls of nsPoint/nsRect for some references to
  those types in a method signature.

- nsGridContainerFrame.cpp needs an include for nsBoxLayoutState.h since it
  uses that type (it instantiates a nsBoxLayoutState instance).

- nsPlaceholderFrame.cpp needs a "using" decl for the mozilla::dom namespace in
  order to use the un-namespace-prefixed "Element" type.

Differential Revision: https://phabricator.services.mozilla.com/D61603

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daniel Holbert 2020-02-04 19:34:51 +00:00
parent 2f3c76f02c
commit ae192ec3a5
7 changed files with 13 additions and 3 deletions

View File

@ -6,10 +6,8 @@
#include "mozilla/layout/LayoutTelemetryTools.h"
#include "MainThreadUtils.h"
#include "mozilla/Atomics.h"
#include "mozilla/EnumeratedArray.h"
#include "mozilla/EnumeratedRange.h"
#include "mozilla/FlushType.h"
#include "mozilla/Telemetry.h"
using namespace mozilla;

View File

@ -9,6 +9,10 @@
#ifndef mozilla_LayoutTelemetryTools_h
#define mozilla_LayoutTelemetryTools_h
#include "mozilla/EnumeratedArray.h"
#include "mozilla/EnumeratedRange.h"
#include "mozilla/FlushType.h"
#include "mozilla/Saturate.h"
#include "mozilla/TimeStamp.h"
#define LAYOUT_TELEMETRY_RECORD(subsystem) \

View File

@ -8,7 +8,9 @@
#include "mozilla/Preferences.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoUtils.h"
#include "nsPresContext.h"
namespace mozilla {
static StaticPresData* sSingleton = nullptr;

View File

@ -16,6 +16,7 @@
namespace mozilla {
class PresShell;
namespace dom {
class Document;
class EventTarget;
} // namespace dom
} // namespace mozilla

View File

@ -10,6 +10,9 @@
#include "mozilla/ScrollTypes.h"
#include "mozilla/Maybe.h"
struct nsPoint;
struct nsRect;
namespace mozilla {
namespace layers {

View File

@ -24,6 +24,7 @@
#include "mozilla/PresShell.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsAlgorithm.h" // for clamped()
#include "nsBoxLayoutState.h"
#include "nsCSSAnonBoxes.h"
#include "nsCSSFrameConstructor.h"
#include "nsDataHashtable.h"

View File

@ -26,6 +26,7 @@
#include "nsIContentInlines.h"
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::gfx;
nsPlaceholderFrame* NS_NewPlaceholderFrame(PresShell* aPresShell,