forked from mirrors/gecko-dev
Bug 1785310 - Remove mozilla/StaticPrefs_layout.h includes from other headers. r=dholbert
Adding layout prefs cause massive rebuilds because of this. Differential Revision: https://phabricator.services.mozilla.com/D154928
This commit is contained in:
parent
20606b0590
commit
534f39ed75
18 changed files with 37 additions and 24 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include "mozilla/dom/SVGLengthBinding.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/SVGContentUtils.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "mozilla/dom/SVGPathElementBinding.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/SVGContentUtils.h"
|
||||
|
||||
NS_IMPL_NS_NEW_SVG_ELEMENT(Path)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "mozilla/layers/CompositorBridgeParent.h"
|
||||
#include "mozilla/layers/CompositorThread.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
|
|
|||
|
|
@ -15,13 +15,14 @@
|
|||
#include "mozilla/gfx/PrintTarget.h"
|
||||
#include "mozilla/Preferences.h" // for Preferences
|
||||
#include "mozilla/Services.h" // for GetObserverService
|
||||
#include "mozilla/mozalloc.h" // for operator new
|
||||
#include "nsCRT.h" // for nsCRT
|
||||
#include "nsDebug.h" // for NS_ASSERTION, etc
|
||||
#include "nsFont.h" // for nsFont
|
||||
#include "nsFontCache.h" // for nsFontCache
|
||||
#include "nsFontMetrics.h" // for nsFontMetrics
|
||||
#include "nsAtom.h" // for nsAtom, NS_Atomize
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/mozalloc.h" // for operator new
|
||||
#include "nsCRT.h" // for nsCRT
|
||||
#include "nsDebug.h" // for NS_ASSERTION, etc
|
||||
#include "nsFont.h" // for nsFont
|
||||
#include "nsFontCache.h" // for nsFontCache
|
||||
#include "nsFontMetrics.h" // for nsFontMetrics
|
||||
#include "nsAtom.h" // for nsAtom, NS_Atomize
|
||||
#include "nsID.h"
|
||||
#include "nsIDeviceContextSpec.h" // for nsIDeviceContextSpec
|
||||
#include "nsLanguageAtomService.h" // for nsLanguageAtomService
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include "nsLayoutUtils.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include "mozilla/FloatingPoint.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/WritingModes.h"
|
||||
#include "nsBlockFrame.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
|
|
|||
|
|
@ -71,6 +71,10 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
RetainedDisplayListData::RetainedDisplayListData()
|
||||
: mModifiedFrameLimit(
|
||||
StaticPrefs::layout_display_list_rebuild_frame_limit()) {}
|
||||
|
||||
void RetainedDisplayListData::AddModifiedFrame(nsIFrame* aFrame) {
|
||||
MOZ_ASSERT(!aFrame->IsFrameModified());
|
||||
Flags(aFrame) += RetainedDisplayListData::FrameFlag::Modified;
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@ struct RetainedDisplayListData {
|
|||
enum class FrameFlag : uint8_t { Modified, HasProps, HadWillChange };
|
||||
using FrameFlags = mozilla::EnumSet<FrameFlag, uint8_t>;
|
||||
|
||||
RetainedDisplayListData() : mModifiedFrameCount(0) {
|
||||
mModifiedFrameLimit =
|
||||
StaticPrefs::layout_display_list_rebuild_frame_limit();
|
||||
}
|
||||
RetainedDisplayListData();
|
||||
|
||||
/**
|
||||
* Adds the frame to modified frames list.
|
||||
|
|
@ -86,8 +83,8 @@ struct RetainedDisplayListData {
|
|||
|
||||
private:
|
||||
nsTHashMap<nsPtrHashKey<nsIFrame>, FrameFlags> mFrames;
|
||||
uint32_t mModifiedFrameCount;
|
||||
uint32_t mModifiedFrameLimit;
|
||||
uint32_t mModifiedFrameCount = 0;
|
||||
uint32_t mModifiedFrameLimit; // initialized to a pref value in constructor
|
||||
};
|
||||
|
||||
enum class PartialUpdateResult { Failed, NoChange, Updated };
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include "mozilla/CSSEnabledState.h"
|
||||
#include "mozilla/Compiler.h"
|
||||
#include "mozilla/PseudoStyleType.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
|
||||
// Is this pseudo-element a CSS2 pseudo-element that can be specified
|
||||
// with the single colon syntax (in addition to the double-colon syntax,
|
||||
|
|
|
|||
|
|
@ -3311,6 +3311,15 @@ nsChangeHint nsStyleUIReset::CalcDifference(
|
|||
return hint;
|
||||
}
|
||||
|
||||
StyleScrollbarWidth nsStyleUIReset::ScrollbarWidth() const {
|
||||
if (MOZ_UNLIKELY(StaticPrefs::layout_css_scrollbar_width_thin_disabled())) {
|
||||
if (mScrollbarWidth == StyleScrollbarWidth::Thin) {
|
||||
return StyleScrollbarWidth::Auto;
|
||||
}
|
||||
}
|
||||
return mScrollbarWidth;
|
||||
}
|
||||
|
||||
//-----------------------
|
||||
// nsStyleEffects
|
||||
//
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/ServoStyleConstsInlines.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "nsColor.h"
|
||||
#include "nsCoord.h"
|
||||
|
|
@ -1795,15 +1794,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUIReset {
|
|||
public:
|
||||
mozilla::StyleUserSelect ComputedUserSelect() const { return mUserSelect; }
|
||||
|
||||
mozilla::StyleScrollbarWidth ScrollbarWidth() const {
|
||||
if (MOZ_UNLIKELY(
|
||||
mozilla::StaticPrefs::layout_css_scrollbar_width_thin_disabled())) {
|
||||
if (mScrollbarWidth == mozilla::StyleScrollbarWidth::Thin) {
|
||||
return mozilla::StyleScrollbarWidth::Auto;
|
||||
}
|
||||
}
|
||||
return mScrollbarWidth;
|
||||
}
|
||||
mozilla::StyleScrollbarWidth ScrollbarWidth() const;
|
||||
|
||||
nsCSSPropertyID GetTransitionProperty(uint32_t aIndex) const {
|
||||
return mTransitions[aIndex % mTransitionPropertyCount].GetProperty();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "gfxUtils.h"
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/Helpers.h"
|
||||
#include "nsTableFrame.h"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsIContent.h"
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "nsTableRowGroupFrame.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsTableRowFrame.h"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "ThemeColors.h"
|
||||
|
||||
#include "mozilla/RelativeLuminanceUtils.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
#include "ThemeDrawing.h"
|
||||
#include "nsNativeTheme.h"
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
#include "mozilla/ProfilerLabels.h"
|
||||
#include "mozilla/ScopeExit.h"
|
||||
#include "mozilla/StaticPrefs_apz.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/StaticPrefs_mozilla.h"
|
||||
#include "mozilla/StaticPrefs_ui.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include "mozilla/ServoCSSParser.h"
|
||||
#include "mozilla/StaticPrefs_browser.h"
|
||||
#include "mozilla/StaticPrefs_editor.h"
|
||||
#include "mozilla/StaticPrefs_layout.h"
|
||||
#include "mozilla/StaticPrefs_ui.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
|
|
|
|||
Loading…
Reference in a new issue