Bug 1510116. Fix some unified build issues in layout code. r=emilio

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

--HG--
extra : rebase_source : f0b6516484ed97ed52b92e04617f89e4ee8189ff
This commit is contained in:
Jonathan Watt 2018-11-12 22:20:52 +00:00
parent d794437a17
commit 4c1b207664
67 changed files with 129 additions and 7 deletions

View File

@ -14,6 +14,7 @@
#include "mozilla/gfx/Types.h" // for SamplingFilter, SurfaceFormat
#include "mozilla/layers/CompositorTypes.h" // for TextureFlags
#include "mozilla/layers/WebRenderLayersLogging.h"
#include "mozilla/layers/ZoomConstraints.h"
#include "nsAString.h"
#include "nsPrintfCString.h" // for nsPrintfCString
#include "nsRegion.h" // for nsRegion, nsIntRegion

View File

@ -9,6 +9,7 @@
#include "mozilla/layers/WebRenderMessages.h"
#include "mozilla/layers/RefCountedShmem.h"
#include "mozilla/layers/TextureClient.h"
#include "mozilla/webrender/WebRenderTypes.h"
namespace mozilla {

View File

@ -13,6 +13,7 @@
#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/gfx/CompositorHitTestInfo.h"
#include "mozilla/layers/IpcResourceUpdateQueue.h"
#include "mozilla/layers/ScrollableLayerGuid.h"
#include "mozilla/layers/SyncObject.h"
#include "mozilla/Range.h"

View File

@ -13,6 +13,7 @@
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/GeckoBindings.h"
#include "mozilla/LayerAnimationInfo.h"
#include "mozilla/layers/AnimationInfo.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoStyleSetInlines.h"
#include "mozilla/Unused.h"
@ -53,6 +54,8 @@
#include "nsAccessibilityService.h"
#endif
using mozilla::layers::AnimationInfo;
using namespace mozilla::dom;
using namespace mozilla::layers;

View File

@ -10,6 +10,8 @@
#include "nscore.h"
#include "DateTimeFormat.h"
#include "MediaManager.h"
#include "mozilla/dom/ServiceWorkerRegistrar.h"
#include "nsAttrValue.h"
#include "nsColorNames.h"
#include "nsComputedDOMStyle.h"

View File

@ -15,6 +15,7 @@
#include "mozilla/dom/HTMLInputElement.h"
#include "nsIDocument.h"
using namespace mozilla;
using mozilla::dom::Element;
using mozilla::dom::HTMLInputElement;
using mozilla::dom::CallerType;

View File

@ -8,6 +8,7 @@
#include "nsContainerFrame.h"
#include "nsIFormControlFrame.h"
#include "nsIFrameInlines.h"
#include "nsPresContext.h"
#include "nsGkAtoms.h"
#include "nsButtonFrameRenderer.h"

View File

@ -5,6 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsLegendFrame.h"
#include "ComputedStyle.h"
#include "nsIContent.h"
#include "nsGenericHTMLElement.h"
#include "nsAttrValueInlines.h"
@ -12,6 +14,9 @@
#include "nsGkAtoms.h"
#include "nsStyleConsts.h"
#include "nsCheckboxRadioFrame.h"
#include "WritingModes.h"
using namespace mozilla;
nsIFrame*
NS_NewLegendFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)

View File

@ -9,6 +9,7 @@
#include "mozilla/TimeStamp.h"
#include "nsPoint.h"
#include "Units.h"
namespace mozilla {

View File

@ -9,6 +9,7 @@
#include "inLayoutUtils.h"
#include "gfxTextRun.h"
#include "nsArray.h"
#include "nsAutoPtr.h"
#include "nsIServiceManager.h"

View File

@ -10,11 +10,15 @@
#include "mozilla/dom/CSSImportRule.h"
#include "mozilla/dom/CSSRuleBinding.h"
#include "mozilla/dom/CSSStyleRule.h"
#include "mozilla/dom/ShadowRoot.h"
#include "mozilla/IntegerRange.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleSheetInlines.h"
#include "nsDocument.h"
#include "nsStyleSheetService.h"
#include "nsXBLPrototypeResources.h"
using namespace mozilla::dom;
namespace mozilla {

View File

@ -7,6 +7,8 @@
#include "inDeepTreeWalker.h"
#include "inLayoutUtils.h"
#include "BindingStyleRule.h"
#include "InspectorUtils.h"
#include "nsString.h"
#include "nsIDocument.h"
#include "nsServiceManagerUtils.h"
@ -16,6 +18,8 @@
#include "mozilla/dom/InspectorUtils.h"
#include "mozilla/dom/NodeFilterBinding.h"
using mozilla::dom::InspectorUtils;
/*****************************************************************************
* This implementation does not currently operaate according to the W3C spec.
* In particular it does NOT handle DOM mutations during the walk. It also

View File

@ -8,6 +8,7 @@
#include "nsCOMPtr.h"
#include "nsDataHashtable.h"
#include "nsHashKeys.h"
#include "nsNetUtil.h"
#include "nsTArray.h"
#include "nsIPersistentProperties2.h"

View File

@ -16,6 +16,7 @@
#include "mozilla/gfx/2D.h"
#include "mozilla/dom/Event.h"
using namespace mozilla;
using mozilla::dom::Event;
//

View File

@ -11,6 +11,8 @@
using namespace mozilla;
using mozilla::gfx::DrawTarget;
//
// <mfenced> -- surround content with a pair of fences
//

View File

@ -11,7 +11,7 @@
#include "gfxContext.h"
#include "gfxMathTable.h"
using mozilla::WritingMode;
using namespace mozilla;
//
// <mmultiscripts> -- attach prescripts and tensor indices to a base - implementation

View File

@ -12,6 +12,8 @@
#include "nsMathMLElement.h"
#include <algorithm>
using namespace mozilla;
//
// <mo> -- operator, fence, or separator - implementation
//

View File

@ -11,6 +11,8 @@
#include "mozilla/TextUtils.h"
#include <algorithm>
using namespace mozilla;
//
// <mpadded> -- adjust space around content - implementation
//

View File

@ -7,6 +7,8 @@
#include "nsMathMLmrowFrame.h"
#include "mozilla/gfx/2D.h"
using namespace mozilla;
//
// <mrow> -- horizontally group any number of subexpressions - implementation
//

View File

@ -9,6 +9,7 @@
#include "mozilla/gfx/2D.h"
#include <algorithm>
using namespace mozilla;
//
// <mspace> -- space - implementation

View File

@ -12,6 +12,8 @@
#include "gfxContext.h"
#include "gfxMathTable.h"
using namespace mozilla;
//
// <munderover> -- attach an underscript-overscript pair to a base - implementation
// <mover> -- attach an overscript to a base - implementation

View File

@ -9,6 +9,8 @@
#include "nsMimeTypes.h"
#include "mozilla/gfx/2D.h"
using namespace mozilla;
//
// <semantics> -- associate annotations with a MathML expression
//

View File

@ -22,6 +22,8 @@
#include "mozilla/dom/HTMLCanvasElement.h"
#include "mozilla/dom/KeyframeEffect.h"
#include "mozilla/dom/Selection.h"
#include "mozilla/dom/ServiceWorkerRegistrar.h"
#include "mozilla/dom/ServiceWorkerRegistration.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/ShapeUtils.h"
@ -32,6 +34,7 @@
#include "nsRegion.h"
#include "nsStyleStructInlines.h"
#include "nsStyleTransformMatrix.h"
#include "nsTransitionManager.h"
#include "gfxMatrix.h"
#include "gfxPrefs.h"
#include "nsSVGIntegrationUtils.h"

View File

@ -9,6 +9,7 @@
#include <istream>
#include "DrawEventRecorder.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/Filters.h"
#include "mozilla/gfx/RecordedEvent.h"

View File

@ -19,11 +19,12 @@
class nsDeviceContext;
class nsIPrintSettings;
class nsIWebProgressListener;
class PrintTranslator;
namespace mozilla {
namespace layout {
class PrintTranslator;
class RemotePrintJobParent final : public PRemotePrintJobParent
{
public:

View File

@ -8,6 +8,7 @@
#include "nsIStringBundle.h"
#include "nsIServiceManager.h"
#include "nsIWidget.h"
#include "nsPrintObject.h"
#include "nsPrintPreviewListener.h"
#include "nsIWebProgressListener.h"

View File

@ -137,7 +137,7 @@ using namespace mozilla::dom;
#define DUMP_LAYOUT_LEVEL (static_cast<mozilla::LogLevel>(9))
#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

View File

@ -5,10 +5,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsPrintObject.h"
#include "nsIContentViewer.h"
#include "nsContentUtils.h" // for nsAutoScriptBlocker
#include "nsIInterfaceRequestorUtils.h"
#include "nsPIDOMWindow.h"
#include "nsPresContext.h"
#include "nsGkAtoms.h"
#include "nsComponentManagerUtils.h"
#include "nsIDocShellTreeItem.h"
@ -17,6 +19,10 @@
#include "nsDocShell.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/Element.h"
using mozilla::dom::BrowsingContext;
using mozilla::dom::Element;
//---------------------------------------------------
//-- nsPrintObject Class Impl

View File

@ -9,6 +9,7 @@
#include "mozilla/dom/CSSKeyframesRuleBinding.h"
#include "mozilla/dom/CSSRuleList.h"
#include "mozilla/ServoBindings.h"
#include "nsCOMArray.h"
#include <limits>

View File

@ -12,6 +12,7 @@
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Types.h"
#include "mozilla/WritingModes.h"
#include "nsPresContext.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"

View File

@ -20,6 +20,7 @@
#include "mozilla/ResultExtensions.h"
#include "mozilla/URLPreloader.h"
#include "nsIRunnable.h"
#include "nsITimedChannel.h"
#include "nsSyncLoadService.h"
#include "nsCOMPtr.h"
#include "nsString.h"

View File

@ -4,7 +4,11 @@
* 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 "mozilla/MappedDeclarations.h"
#include "MappedDeclarations.h"
#include "nsAttrValue.h"
#include "nsIDocument.h"
#include "nsPresContext.h"
namespace mozilla {

View File

@ -13,6 +13,7 @@
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleSheetInlines.h"
#include "nsPresContext.h"
namespace mozilla {
namespace dom {

View File

@ -11,6 +11,7 @@
#include "mozilla/gfx/Types.h"
#include "mozilla/RefPtr.h"
#include "mozilla/ServoStyleConsts.h"
#include "mozilla/ServoTypes.h"
#include "nsColor.h"
#include "nsCSSPropertyID.h"

View File

@ -22,6 +22,7 @@
#include "mozilla/IntegerRange.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StyleSheet.h"
#include "nsIDocument.h"
using namespace mozilla::dom;

View File

@ -10,6 +10,7 @@
#include "gfxPlatformFontList.h"
#include "mozilla/AutoRestyleTimelineMarker.h"
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/EffectCompositor.h"
#include "mozilla/IntegerRange.h"
#include "mozilla/LookAndFeel.h"
#include "mozilla/ServoBindings.h"

View File

@ -8,6 +8,7 @@
#include "nsDOMCSSValueList.h"
#include "nsString.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/Move.h"
using namespace mozilla;

View File

@ -5,12 +5,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Keep in (case-insensitive) order:
#include "ComputedStyle.h"
#include "nsContainerFrame.h"
#include "nsFrame.h"
#include "nsGkAtoms.h"
#include "SVGObserverUtils.h"
#include "nsSVGFilters.h"
using namespace mozilla;
/*
* This frame is used by filter primitive elements that don't
* have special child elements that provide parameters.

View File

@ -11,6 +11,8 @@
#include "SVGObserverUtils.h"
#include "nsSVGFilters.h"
using namespace mozilla;
class SVGFEUnstyledLeafFrame final : public nsFrame
{
friend nsIFrame*

View File

@ -13,6 +13,7 @@
#include "nsCSSFrameConstructor.h"
#include "nsISupportsImpl.h"
#include "nsSVGClipPathFrame.h"
#include "nsSVGMarkerFrame.h"
#include "nsSVGPaintServerFrame.h"
#include "nsSVGFilterFrame.h"
#include "nsSVGMaskFrame.h"
@ -24,6 +25,7 @@
#include "ImageLoader.h"
#include "mozilla/net/ReferrerPolicy.h"
using namespace mozilla;
using namespace mozilla::dom;
static already_AddRefed<URLAndReferrerInfo>

View File

@ -11,6 +11,7 @@
#include "mozilla/dom/SVGSVGElement.h"
#include "mozilla/dom/SVGViewElement.h"
using namespace mozilla;
using namespace mozilla::dom;
/**

View File

@ -7,6 +7,7 @@
#ifndef __NS_CSSCLIPPATHINSTANCE_H__
#define __NS_CSSCLIPPATHINSTANCE_H__
#include "gfxPoint.h"
#include "nsStyleStruct.h"
#include "nsRect.h"
#include "mozilla/gfx/2D.h"

View File

@ -15,6 +15,7 @@
#include "nsSVGIntegrationUtils.h"
#include "nsSVGUtils.h"
using namespace mozilla;
using namespace mozilla::dom;
//----------------------------------------------------------------------

View File

@ -8,6 +8,8 @@
#include "nsSVGGenericContainerFrame.h"
#include "nsSVGIntegrationUtils.h"
using namespace mozilla;
//----------------------------------------------------------------------
// nsSVGGenericContainerFrame Implementation

View File

@ -7,6 +7,8 @@
// Main header first:
#include "nsSVGInnerSVGFrame.h"
using namespace mozilla;
nsIFrame*
NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
{

View File

@ -14,6 +14,7 @@
#include "SVGGeometryElement.h"
#include "SVGGeometryFrame.h"
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::gfx;
using namespace mozilla::image;

View File

@ -22,6 +22,7 @@
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::gfx;
using namespace mozilla::image;
//----------------------------------------------------------------------

View File

@ -11,6 +11,8 @@
#include "mozilla/ComputedStyle.h"
#include "SVGObserverUtils.h"
using namespace mozilla;
// This is a very simple frame whose only purpose is to capture style change
// events and propagate them to the parent. Most of the heavy lifting is done
// within the nsSVGGradientFrame, which is the parent for this frame

View File

@ -11,6 +11,7 @@
#include "mozilla/dom/SVGSwitchElement.h"
#include "nsSVGUtils.h"
using namespace mozilla;
using namespace mozilla::gfx;
using namespace mozilla::image;

View File

@ -7,6 +7,8 @@
// Main header first:
#include "nsSVGSymbolFrame.h"
using namespace mozilla;
nsIFrame*
NS_NewSVGSymbolFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
{

View File

@ -10,11 +10,15 @@
*/
#include "FixedTableLayoutStrategy.h"
#include "nsStyleConsts.h"
#include "nsTableFrame.h"
#include "nsTableColFrame.h"
#include "nsTableCellFrame.h"
#include "WritingModes.h"
#include <algorithm>
using namespace mozilla;
FixedTableLayoutStrategy::FixedTableLayoutStrategy(nsTableFrame *aTableFrame)
: nsITableLayoutStrategy(nsITableLayoutStrategy::Fixed)
, mTableFrame(aTableFrame)

View File

@ -13,6 +13,8 @@
#include "nsIPresShell.h"
#include "mozilla/HashFunctions.h"
using namespace mozilla;
//#define DEBUG_SPANNING_CELL_SORTER
SpanningCellSorter::SpanningCellSorter()

View File

@ -4,6 +4,10 @@
* 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 "nsTableFrame.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/Helpers.h"
#include "mozilla/Likely.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/IntegerRange.h"
@ -11,7 +15,6 @@
#include "gfxContext.h"
#include "nsCOMPtr.h"
#include "nsTableFrame.h"
#include "mozilla/ComputedStyle.h"
#include "nsStyleConsts.h"
#include "nsIContent.h"
@ -54,6 +57,11 @@ using namespace mozilla;
using namespace mozilla::image;
using namespace mozilla::layout;
using mozilla::gfx::AutoRestoreTransform;
using mozilla::gfx::DrawTarget;
using mozilla::gfx::Float;
using mozilla::gfx::ToDeviceColor;
/********************************************************************************
** TableReflowInput **
********************************************************************************/

View File

@ -17,6 +17,8 @@
#include "nsBoxLayoutState.h"
#include "nsGridLayout2.h"
using namespace mozilla;
already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout();
nsIFrame*

View File

@ -17,6 +17,8 @@
#include "nsBoxLayoutState.h"
#include "nsGridLayout2.h"
using namespace mozilla;
already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout();
nsIFrame*

View File

@ -22,7 +22,7 @@
#include "mozilla/TextEvents.h"
using namespace mozilla;
using namespace mozilla::dom;
NS_IMPL_ISUPPORTS(nsButtonBoxFrame::nsButtonBoxListener, nsIDOMEventListener)

View File

@ -33,6 +33,8 @@
#include "nsAccessibilityService.h"
#endif
using namespace mozilla;
nsIFrame*
NS_NewDeckFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
{

View File

@ -23,6 +23,7 @@
//#define DEBUG_REFLOW
using namespace mozilla;
using namespace mozilla::dom;
class nsDocElementBoxFrame final : public nsBoxFrame

View File

@ -8,6 +8,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/EventForwards.h"
#include "nsIContent.h"
#include "nsIDOMEventListener.h"
// X.h defines KeyPress

View File

@ -14,6 +14,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/gfx/Types.h"
#include "nsAtom.h"
#include "nsIDOMXULSelectCntrlEl.h"
#include "nsGkAtoms.h"
#include "nsCOMPtr.h"
#include "nsMenuFrame.h"

View File

@ -15,6 +15,9 @@ class nsIBaseWindow;
class nsResizerFrame final : public nsTitleBarFrame
{
protected:
typedef mozilla::LayoutDeviceIntPoint LayoutDeviceIntPoint;
typedef mozilla::LayoutDeviceIntRect LayoutDeviceIntRect;
struct Direction {
int8_t mHorizontal;
int8_t mVertical;

View File

@ -40,6 +40,8 @@
using namespace mozilla;
using mozilla::dom::Event;
class nsSplitterInfo {
public:
nscoord min;

View File

@ -18,6 +18,8 @@
#include "nsTreeBodyFrame.h"
#include "nsXULElement.h"
using namespace mozilla;
//
// NS_NewTreeColFrame
//

View File

@ -5,12 +5,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/Attributes.h"
#include "mozilla/ComputedStyle.h"
#include "nsBoxFrame.h"
class nsITreeBoxObject;
nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell,
ComputedStyle* aStyle);
mozilla::ComputedStyle* aStyle);
class nsTreeColFrame final : public nsBoxFrame
{

View File

@ -18,6 +18,7 @@
#include "mozilla/dom/TreeColumnsBinding.h"
using namespace mozilla;
using namespace mozilla::dom;
// Column class that caches all the info about our column.
nsTreeColumn::nsTreeColumn(nsTreeColumns* aColumns, dom::Element* aElement)

View File

@ -16,11 +16,13 @@
#include "nsTreeColumns.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/TreeBoxObject.h"
#include "mozilla/dom/TreeContentViewBinding.h"
#include "nsServiceManagerUtils.h"
#include "nsIDocument.h"
using namespace mozilla;
using namespace mozilla::dom;
// A content model view implementation for the tree.

View File

@ -11,9 +11,12 @@
#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "nsCOMArray.h"
#include "nsDataHashtable.h"
#include "nsRefPtrHashtable.h"
#include "mozilla/ComputedStyle.h"
class nsIContent;
class nsTreeStyleCache
{
public: