Skip to content

Commit

Permalink
Bug 1652017 - Remove unnecessary includes for expensive nsIFrame.h. r…
Browse files Browse the repository at this point in the history
…=emilio

Differential Revision: https://phabricator.services.mozilla.com/D83111
  • Loading branch information
sigiesec committed Jul 15, 2020
1 parent d7fd3be commit f8a52d2
Show file tree
Hide file tree
Showing 23 changed files with 35 additions and 20 deletions.
2 changes: 2 additions & 0 deletions accessible/base/SelectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,5 @@ void SelectionManager::ProcessSelectionChanged(SelData* aSelData) {
nsIAccessibleEvent::EVENT_TEXT_ATTRIBUTE_CHANGED, text);
}
}

SelectionManager::~SelectionManager() = default;
3 changes: 2 additions & 1 deletion accessible/base/SelectionManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef mozilla_a11y_SelectionManager_h__
#define mozilla_a11y_SelectionManager_h__

#include "nsIFrame.h"
#include "nsISelectionListener.h"
#include "mozilla/WeakPtr.h"

Expand Down Expand Up @@ -107,6 +106,8 @@ class SelectionManager : public nsISelectionListener {
mAccWithCaret = nullptr;
}

~SelectionManager();

protected:
SelectionManager();

Expand Down
2 changes: 1 addition & 1 deletion accessible/generic/HyperTextAccessible.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include "nsIAccessibleTypes.h"
#include "nsDirection.h"
#include "WordMovementType.h"
#include "nsIFrame.h"

class nsFrameSelection;
class nsIFrame;
class nsRange;
class nsIWidget;

Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsFrameLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define nsFrameLoader_h_

#include "nsDocShell.h"
#include "nsIFrame.h"
#include "nsStringFwd.h"
#include "nsPoint.h"
#include "nsSize.h"
Expand All @@ -28,7 +29,6 @@
#include "mozilla/layers/LayersTypes.h"
#include "nsStubMutationObserver.h"
#include "Units.h"
#include "nsIFrame.h"
#include "nsPluginTags.h"

class nsIURI;
Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsObjectLoadingContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

#include "mozilla/Attributes.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsIFrame.h" // for WeakFrame only
#include "nsImageLoadingContent.h"
#include "nsIStreamListener.h"
#include "nsIChannelEventSink.h"
#include "nsIObjectLoadingContent.h"
#include "nsIRunnable.h"
#include "nsIFrame.h"
#include "nsFrameLoaderOwner.h"

class nsAsyncInstantiateEvent;
Expand Down
2 changes: 1 addition & 1 deletion dom/events/EventStateManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#include "nsCycleCollectionParticipant.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/layers/APZUtils.h"
#include "nsIFrame.h"
#include "Units.h"
#include "WheelHandlingHelper.h" // for WheelDeltaAdjustmentStrategy

class nsFrameLoader;
class nsIContent;
class nsIDocShell;
class nsIDocShellTreeItem;
class nsIFrame;
class imgIContainer;
class nsIContentViewer;
class nsIScrollableFrame;
Expand Down
3 changes: 2 additions & 1 deletion dom/events/WheelHandlingHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
#include "mozilla/Attributes.h"
#include "mozilla/EventForwards.h"
#include "nsCoord.h"
#include "nsIFrame.h"
#include "nsIFrame.h" // for AutoWeakFrame only
#include "nsPoint.h"

class nsIFrame;
class nsIScrollableFrame;
class nsITimer;

Expand Down
2 changes: 1 addition & 1 deletion layout/base/AccessibleCaret.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "mozilla/dom/Element.h"
#include "nsCOMPtr.h"
#include "nsIDOMEventListener.h"
#include "nsIFrame.h"
#include "nsIFrame.h" // for WeakFrame only
#include "nsISupportsBase.h"
#include "nsISupportsImpl.h"
#include "nsLiteralString.h"
Expand Down
1 change: 0 additions & 1 deletion layout/base/AccessibleCaretEventHub.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "mozilla/WeakPtr.h"
#include "nsCOMPtr.h"
#include "nsDocShell.h"
#include "nsIFrame.h"
#include "nsIReflowObserver.h"
#include "nsIScrollObserver.h"
#include "nsPoint.h"
Expand Down
2 changes: 1 addition & 1 deletion layout/base/nsGenConList.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#define nsGenConList_h___

#include "mozilla/LinkedList.h"
#include "nsIFrame.h"
#include "nsStyleStruct.h"
#include "nsCSSPseudoElements.h"
#include "nsTextNode.h"

class nsGenConList;
class nsIFrame;

struct nsGenConNode : public mozilla::LinkedListElement<nsGenConNode> {
using StyleContentType = mozilla::StyleContentItem::Tag;
Expand Down
3 changes: 2 additions & 1 deletion layout/base/nsIFrameTraversal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#define NSIFRAMETRAVERSAL_H

#include "nsISupports.h"
#include "nsIFrame.h"

class nsIFrame;

#define NS_IFRAMEENUMERATOR_IID \
{ \
Expand Down
2 changes: 1 addition & 1 deletion layout/generic/nsBlockReflowContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#ifndef nsBlockReflowContext_h___
#define nsBlockReflowContext_h___

#include "nsIFrame.h"
#include "mozilla/ReflowOutput.h"

class nsIFrame;
class nsLineBox;
class nsPresContext;
namespace mozilla {
Expand Down
9 changes: 8 additions & 1 deletion layout/generic/nsHTMLParts.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
#define nsHTMLParts_h___

#include "nscore.h"
#include "nsFrameState.h"
#include "nsISupports.h"
#include "nsIFrame.h"

class nsContainerFrame;
class nsComboboxControlFrame;
class nsCheckboxRadioFrame;
class nsAtom;
Expand All @@ -25,8 +27,13 @@ class nsIURI;
class nsIChannel;
class nsTableColFrame;
namespace mozilla {
class ComputedStyle;
class PresShell;
class ViewportFrame;

namespace dom {
class Document;
}
} // namespace mozilla

// Factory methods for creating html layout objects
Expand Down
3 changes: 2 additions & 1 deletion layout/printing/nsPrintJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "nsPrintObject.h"
#include "nsPrintData.h"
#include "nsFrameList.h"
#include "nsIFrame.h"
#include "nsIWebProgress.h"
#include "mozilla/dom/HTMLCanvasElement.h"
#include "nsIFrame.h" // for WeakFrame only
#include "nsIWebProgressListener.h"
#include "nsWeakReference.h"

Expand All @@ -27,6 +27,7 @@
class nsPagePrintTimer;
class nsIDocShell;
class nsIDocumentViewerPrint;
class nsIFrame;
class nsPrintObject;
class nsIDocShell;
class nsPageSequenceFrame;
Expand Down
1 change: 0 additions & 1 deletion layout/style/ImageLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "mozilla/Attributes.h"

class imgIContainer;
class nsIFrame;
class nsPresContext;
class nsIURI;
class nsIPrincipal;
Expand Down
1 change: 1 addition & 0 deletions layout/svg/FilterInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "mozilla/SVGUtils.h"
#include "CSSFilterInstance.h"
#include "SVGFilterPaintCallback.h"
#include "SVGIntegrationUtils.h"

using namespace mozilla::dom;
using namespace mozilla::gfx;
Expand Down
1 change: 0 additions & 1 deletion layout/svg/FilterInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "nsRect.h"
#include "nsSize.h"
#include "nsTArray.h"
#include "nsIFrame.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/webrender/WebRenderTypes.h"

Expand Down
1 change: 0 additions & 1 deletion layout/svg/SVGFilterFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "mozilla/Attributes.h"
#include "mozilla/SVGContainerFrame.h"
#include "nsIFrame.h"
#include "nsQueryFrame.h"

class nsAtom;
Expand Down
4 changes: 3 additions & 1 deletion layout/svg/SVGObserverUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
#include "FrameProperties.h"
#include "mozilla/dom/Element.h"
#include "nsID.h"
#include "nsIFrame.h"
#include "nsIFrame.h" // only for LayoutFrameType
#include "nsIMutationObserver.h"
#include "nsISupportsBase.h"
#include "nsISupportsImpl.h"
#include "nsIReferrerInfo.h"
#include "nsStringFwd.h"
#include "nsStubMutationObserver.h"
#include "nsStyleStruct.h"
#include "nsCycleCollectionParticipant.h"

class nsAtom;
class nsIFrame;
class nsIURI;

namespace mozilla {
Expand Down
1 change: 0 additions & 1 deletion layout/svg/SVGUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class gfxContext;
class nsFrameList;
class nsIContent;

class nsIFrame;
class nsPresContext;
class nsTextFrame;

Expand Down
1 change: 1 addition & 0 deletions layout/xul/grid/nsGrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "nsGrid.h"
#include "nsGridRowGroupLayout.h"
#include "nsIFrame.h"
#include "nsIScrollableFrame.h"
#include "nsSprocketLayout.h"
#include "nsGridLayout2.h"
Expand Down
5 changes: 4 additions & 1 deletion layout/xul/nsSprocketLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
#include "mozilla/Attributes.h"
#include "nsBoxLayout.h"
#include "nsCOMPtr.h"
#include "nsIFrame.h"
#include "nsFrameState.h"

class nsIFrame;
struct nsRect;

class nsBoxSize {
public:
Expand Down
2 changes: 1 addition & 1 deletion widget/gtk/nsWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "nsIDragService.h"
#include "nsGkAtoms.h"
#include "nsRefPtrHashtable.h"
#include "nsIFrame.h"
#include "nsBaseWidget.h"
#include "CompositorWidget.h"
#include "mozilla/widget/WindowSurface.h"
Expand Down Expand Up @@ -81,6 +80,7 @@ void WindowDragLeaveHandler(GtkWidget* aWidget);
#endif

class gfxPattern;
class nsIFrame;

namespace mozilla {
class TimeStamp;
Expand Down

0 comments on commit f8a52d2

Please sign in to comment.