зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1512112: Remove redundant includes from source files in layout. r=TYLin
All of the removed includes are redundant (i.e. they're #included elsewhere in the same file). In most cases, I'm removing the second (redundant) copy of the #include, except when that copy makes more sense (i.e. if it's in better sorted order, or if it's paired alongside a closely-associated header while the earlier copy is not). Here's the script that I used to generate candidates here -- I ran this in every subdirectory of layout, on my linux machine (warning, this writes two files to your /tmp directory): for FILE in *.h *.cpp; do nonunique=$(grep \#include $FILE | grep -v List\.h | cut -f2 -d'"' | cut -f2- -d'/'| cut -f2- -d'/' | sort | wc -l) unique=$( grep \#include $FILE | grep -v List\.h | cut -f2 -d'"' | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq | wc -l) if [[ "$unique" != "$nonunique" ]]; then echo "$FILE: $nonunique / $unique" grep \#include $FILE | cut -f2 -d'"' | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort > /tmp/nonunique.txt grep \#include $FILE | cut -f2 -d'"' | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq > /tmp/unique.txt diff /tmp/nonunique.txt /tmp/unique.txt echo fi done Depends on D13773 Differential Revision: https://phabricator.services.mozilla.com/D13774 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0211b2854b
Коммит
7c3b31a25d
|
@ -12,7 +12,6 @@
|
|||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/EventStateManager.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "mozilla/dom/HTMLBodyElement.h"
|
||||
|
||||
#include "Layers.h"
|
||||
#include "LayerAnimationInfo.h" // For LayerAnimationInfo::sRecords
|
||||
#include "nsAnimationManager.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsBulletFrame.h"
|
||||
|
@ -44,7 +43,6 @@
|
|||
#include "StickyScrollContainer.h"
|
||||
#include "mozilla/EffectSet.h"
|
||||
#include "mozilla/IntegerRange.h"
|
||||
#include "mozilla/ViewportFrame.h"
|
||||
#include "SVGObserverUtils.h"
|
||||
#include "SVGTextFrame.h"
|
||||
#include "ActiveLayerTracker.h"
|
||||
|
|
|
@ -104,7 +104,6 @@
|
|||
#include "nsBackdropFrame.h"
|
||||
#include "nsTransitionManager.h"
|
||||
#include "DetailsFrame.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsIPopupContainer.h"
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
#include "nsIPageSequenceFrame.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIContentViewerEdit.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
#include "mozilla/css/Loader.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
#include "ImageRegion.h"
|
||||
#include "gfxRect.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxContext.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include "nsTextFragment.h"
|
||||
|
@ -117,7 +116,6 @@
|
|||
#include "mozilla/layers/APZUtils.h" // for apz::CalculatePendingDisplayPort
|
||||
#include "mozilla/layers/CompositorBridgeChild.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/StyleAnimationValue.h"
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "mozilla/WheelHandlingHelper.h" // for WheelHandlingUtils
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "mozilla/ReflowOutput.h"
|
||||
#include "ImageContainer.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "SVGImageContext.h"
|
||||
#include <limits>
|
||||
#include <algorithm>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "nsTObserverArray.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsTObserverArray.h"
|
||||
#include "nsClassHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsCheckboxRadioFrame.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "mozilla/AsyncEventDispatcher.h"
|
||||
#include "mozilla/dom/HTMLInputElement.h"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "nsIPresShell.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
#include "nsFloatManager.h"
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#include "nsStyleConsts.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "LayoutLogging.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
|
@ -116,9 +115,6 @@
|
|||
#include "ActiveLayerTracker.h"
|
||||
|
||||
#include "nsITheme.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
||||
#include "ImageLoader.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::css;
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
|
||||
#include "nsTextFrame.h"
|
||||
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "nsLayoutUtils.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "FrameLayerBuilder.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
#include "nsIURIMutator.h"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "nsIPresShell.h"
|
||||
#include "nsPageContentFrame.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsLayoutUtils.h" // for function BinarySearchForPosition
|
||||
#include "nsSimplePageSequenceFrame.h" // for nsSharedPageData
|
||||
#include "nsTextFormatter.h" // for page number localization formatting
|
||||
#include "nsBidiUtils.h"
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/gfx/DrawTargetRecording.h"
|
||||
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "inLayoutUtils.h"
|
||||
|
||||
#include "BindingStyleRule.h"
|
||||
#include "InspectorUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "nsCSSRendering.h"
|
||||
#include "nsCSSColorUtils.h"
|
||||
#include "nsITheme.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsStyleStructInlines.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "nsClassHashtable.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsStyleStruct.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxGradientCache.h"
|
||||
#include "mozilla/layers/StackingContextHelper.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "gfxContext.h"
|
||||
#include "mozilla/ArenaAllocator.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Array.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/EnumSet.h"
|
||||
|
@ -37,7 +36,6 @@
|
|||
#include "ImgDrawResult.h"
|
||||
#include "mozilla/EffectCompositor.h"
|
||||
#include "mozilla/EnumeratedArray.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/gfx/UserData.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "nsSVGDisplayableFrame.h"
|
||||
#include "SVGObserverUtils.h"
|
||||
#include "nsSVGIntegrationUtils.h"
|
||||
#include "mozilla/layers/WebRenderLayerManager.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
|
|
|
@ -47,7 +47,6 @@ static const char sPrintSettingsServiceContractID[] =
|
|||
|
||||
// Print Preview
|
||||
#include "imgIContainer.h" // image animation mode constants
|
||||
#include "nsIWebBrowserPrint.h" // needed for PrintPreview Navigation constants
|
||||
|
||||
// Print Progress
|
||||
#include "nsIPrintProgress.h"
|
||||
|
@ -94,7 +93,6 @@ static const char kPrintingPromptService[] =
|
|||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsDeviceContextSpecProxy.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsView.h"
|
||||
|
||||
#include "nsIPageSequenceFrame.h"
|
||||
#include "nsIURL.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
#include "mozilla/ResultExtensions.h"
|
||||
#include "mozilla/URLPreloader.h"
|
||||
|
@ -65,7 +64,6 @@
|
|||
#include "mozilla/dom/SRICheck.h"
|
||||
|
||||
#include "mozilla/Encoding.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "mozilla/Tuple.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "nsCSSKeywords.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsStyleConsts.h" // For system widget appearance types
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "nsLayoutStylesheetCache.h"
|
||||
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Omnijar.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "nsStyleStruct.h"
|
||||
#include "nsStyleStructInlines.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsString.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIAppShellService.h"
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "nsIDocument.h"
|
||||
#include "nsSVGPaintServerFrame.h"
|
||||
#include "SVGObserverUtils.h"
|
||||
#include "nsSVGPaintServerFrame.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::image;
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "nsSVGUtils.h"
|
||||
#include "SVGContentUtils.h"
|
||||
#include "FilterSupport.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "nscore.h"
|
||||
#include "celldata.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAlgorithm.h"
|
||||
#include "nsRect.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче