Bug 1447827: Remove ServoRestyleManager. r=xidorn

MozReview-Commit-ID: CFafQsb4rQn
This commit is contained in:
Emilio Cobos Álvarez 2018-04-05 21:12:37 +02:00
parent 7839e70676
commit e128bf7b1a
35 changed files with 27 additions and 126 deletions

View File

@ -21,7 +21,6 @@
#include "mozilla/EffectSet.h"
#include "mozilla/LayerAnimationInfo.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "mozilla/ServoBindings.h" // Servo_GetProperties_Overriding_Animation
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleAnimationValue.h"

View File

@ -7,7 +7,6 @@
#include "EffectSet.h"
#include "mozilla/dom/Element.h" // For Element
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
#include "nsCycleCollectionNoteChild.h" // For CycleCollectionNoteChild
#include "nsPresContext.h"

View File

@ -69,7 +69,7 @@
#include "mozilla/EventStates.h"
#include "mozilla/InternalMutationEvent.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/SizeOfState.h"
#include "mozilla/TextEditor.h"
#include "mozilla/TextEvents.h"

View File

@ -24,7 +24,7 @@
#include "mozilla/EventListenerManager.h"
#include "mozilla/EventStates.h"
#include "mozilla/HTMLEditor.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/TextEditor.h"
#include "mozilla/URLExtraData.h"
#include "mozilla/dom/Attr.h"

View File

@ -270,7 +270,7 @@
#include "nsIURIClassifier.h"
#include "nsIURIMutator.h"
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/ClearOnShutdown.h"
#include "nsHTMLTags.h"
@ -13191,7 +13191,7 @@ nsIDocument::ClearStaleServoData()
{
DocumentStyleRootIterator iter(this);
while (Element* root = iter.GetNextStyleRoot()) {
ServoRestyleManager::ClearServoDataFromSubtree(root);
RestyleManager::ClearServoDataFromSubtree(root);
}
}

View File

@ -12,7 +12,6 @@
#include "mozilla/RestyleManager.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsContentUtils.h"
#include "nsCSSProps.h"
#include "nsIDocument.h"

View File

@ -57,7 +57,6 @@
#include "mozilla/DeclarationBlockInlines.h"
#include "mozilla/Unused.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
using namespace mozilla;
using namespace mozilla::dom;

View File

@ -54,7 +54,7 @@
#include "mozilla/EventListenerManager.h"
#include "mozilla/Preferences.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/dom/ChildIterator.h"
#include "mozilla/dom/Event.h"
#include "mozilla/dom/Element.h"
@ -450,8 +450,8 @@ public:
{
MOZ_ASSERT(mResolveStyle);
if (mHadData) {
ServoRestyleManager::ClearServoDataFromSubtree(
mElement, ServoRestyleManager::IncludeRoot::No);
RestyleManager::ClearServoDataFromSubtree(
mElement, RestyleManager::IncludeRoot::No);
}
}

View File

@ -172,7 +172,6 @@
#include "nsTransitionManager.h"
#include "ChildIterator.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsIDragSession.h"
#include "nsIFrameInlines.h"
#include "mozilla/gfx/2D.h"
@ -2925,11 +2924,11 @@ PresShell::CancelAllPendingReflows()
static bool
DestroyFramesAndStyleDataFor(Element* aElement,
nsPresContext& aPresContext,
ServoRestyleManager::IncludeRoot aIncludeRoot)
RestyleManager::IncludeRoot aIncludeRoot)
{
bool didReconstruct =
aPresContext.FrameConstructor()->DestroyFramesFor(aElement);
ServoRestyleManager::ClearServoDataFromSubtree(aElement, aIncludeRoot);
RestyleManager::ClearServoDataFromSubtree(aElement, aIncludeRoot);
return didReconstruct;
}
@ -2953,7 +2952,7 @@ nsIPresShell::SlotAssignmentWillChange(Element& aElement,
// Ensure the new element starts off clean.
DestroyFramesAndStyleDataFor(&aElement,
*mPresContext,
ServoRestyleManager::IncludeRoot::Yes);
RestyleManager::IncludeRoot::Yes);
if (aNewSlot) {
// If the new slot will stop showing fallback content, we need to reframe it
@ -3032,8 +3031,8 @@ nsIPresShell::DestroyFramesForAndRestyle(Element* aElement)
// Clear the style data from all the flattened tree descendants, but _not_
// from us, since otherwise we wouldn't see the reframe.
ServoRestyleManager::ClearServoDataFromSubtree(
aElement, ServoRestyleManager::IncludeRoot::No);
RestyleManager::ClearServoDataFromSubtree(
aElement, RestyleManager::IncludeRoot::No);
auto changeHint = didReconstruct
? nsChangeHint(0)

View File

@ -1,17 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#ifndef mozilla_RestyleManagerInlines_h
#define mozilla_RestyleManagerInlines_h
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/ServoUtils.h"
namespace mozilla {
} // namespace mozilla
#endif // mozilla_RestyleManagerInlines_h

View File

@ -1,39 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/ServoRestyleManager.h"
#include "mozilla/AutoRestyleTimelineMarker.h"
#include "mozilla/AutoTimelineMarker.h"
#include "mozilla/ComputedStyle.h"
#include "mozilla/ComputedStyleInlines.h"
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoStyleSetInlines.h"
#include "mozilla/Unused.h"
#include "mozilla/ViewportFrame.h"
#include "mozilla/dom/ChildIterator.h"
#include "mozilla/dom/ElementInlines.h"
#include "nsBlockFrame.h"
#include "nsBulletFrame.h"
#include "nsIFrameInlines.h"
#include "nsImageFrame.h"
#include "nsPlaceholderFrame.h"
#include "nsContentUtils.h"
#include "nsCSSFrameConstructor.h"
#include "nsPrintfCString.h"
#include "nsRefreshDriver.h"
#include "nsStyleChangeList.h"
#ifdef ACCESSIBILITY
#include "nsAccessibilityService.h"
#endif
using namespace mozilla::dom;
namespace mozilla {
} // namespace mozilla

View File

@ -1,18 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#ifndef mozilla_ServoRestyleManager_h
#define mozilla_ServoRestyleManager_h
namespace mozilla {
/**
* Restyle manager for a Servo-backed style system.
*/
typedef RestyleManager ServoRestyleManager;
} // namespace mozilla
#endif // mozilla_ServoRestyleManager_h

View File

@ -81,8 +81,6 @@ EXPORTS.mozilla += [
'PresShell.h',
'RestyleLogging.h',
'RestyleManager.h',
'RestyleManagerInlines.h',
'ServoRestyleManager.h',
'ShapeUtils.h',
'StaticPresData.h',
'UndisplayedNode.h',
@ -117,7 +115,6 @@ UNIFIED_SOURCES += [
'PresShell.cpp',
'RestyleManager.cpp',
'ScrollbarStyles.cpp',
'ServoRestyleManager.cpp',
'ShapeUtils.cpp',
'StackArena.cpp',
'StaticPresData.cpp',

View File

@ -89,7 +89,6 @@
#include "nsStyleStructInlines.h"
#include "nsPageContentFrame.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "StickyScrollContainer.h"
#include "nsFieldSetFrame.h"
#include "nsInlineFrame.h"

View File

@ -7,7 +7,7 @@
/* container for a document and its presentation */
#include "gfxContext.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/ServoStyleSet.h"
#include "nsAutoPtr.h"
#include "nscore.h"

View File

@ -139,7 +139,6 @@
#include "nsAnimationManager.h"
#include "nsTransitionManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "LayoutLogging.h"
// Make sure getpid() works.

View File

@ -38,7 +38,6 @@
#include "nsLayoutUtils.h"
#include "nsViewManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "SurfaceCacheUtils.h"
#include "nsMediaFeatures.h"
#include "gfxPlatform.h"
@ -836,7 +835,7 @@ nsPresContext::Init(nsDeviceContext* aDeviceContext)
// FIXME(emilio): I'm pretty sure this doesn't happen after bug 1414999.
Element* root = mDocument->GetRootElement();
if (root && root->HasServoData()) {
ServoRestyleManager::ClearServoDataFromSubtree(root);
RestyleManager::ClearServoDataFromSubtree(root);
}
if (mDeviceContext->SetFullZoom(mFullZoom))
@ -964,7 +963,7 @@ nsPresContext::AttachShell(nsIPresShell* aShell)
MOZ_ASSERT(!mShell);
mShell = aShell;
mRestyleManager = new ServoRestyleManager(this);
mRestyleManager = new mozilla::RestyleManager(this);
// Since CounterStyleManager is also the name of a method of
// nsPresContext, it is necessary to prefix the class with the mozilla
@ -2001,7 +2000,7 @@ nsPresContext::RebuildAllStyleData(nsChangeHint aExtraHint,
// TODO(emilio): It's unclear to me why would these three calls below be
// needed. In particular, RebuildAllStyleData doesn't rebuild rules or
// specified style information and such (note the comment in
// ServoRestyleManager::RebuildAllStyleData re. the funny semantics), so I
// RestyleManager::RebuildAllStyleData re. the funny semantics), so I
// don't know why should we rebuild the user font set / counter styles /
// etc...
mDocument->MarkUserFontSetDirty();

View File

@ -52,7 +52,6 @@
#include "mozilla/dom/Selection.h"
#include "mozilla/dom/WindowBinding.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "Layers.h"
#include "imgIContainer.h"
#include "mozilla/dom/ScriptSettings.h"
@ -1236,7 +1235,7 @@ TimeStamp
nsRefreshDriver::MostRecentRefresh() const
{
// In case of stylo traversal, we have already activated the refresh driver in
// ServoRestyleManager::ProcessPendingRestyles().
// RestyleManager::ProcessPendingRestyles().
if (!ServoStyleSet::IsInServoTraversal()) {
const_cast<nsRefreshDriver*>(this)->EnsureTimerStarted();
}

View File

@ -12,7 +12,7 @@
#include "mozilla/ViewportFrame.h"
#include "mozilla/ComputedStyleInlines.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "nsGkAtoms.h"
#include "nsIScrollableFrame.h"
#include "nsSubDocumentFrame.h"

View File

@ -53,8 +53,7 @@
#include "nsISelection.h"
#include "mozilla/dom/HTMLDetailsElement.h"
#include "mozilla/dom/HTMLSummaryElement.h"
#include "mozilla/RestyleManagerInlines.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/Telemetry.h"

View File

@ -15,7 +15,6 @@
#include "mozilla/ServoStyleSet.h"
#include "nsFrameManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsPlaceholderFrame.h"
#include "nsCSSFrameConstructor.h"

View File

@ -47,7 +47,6 @@
#include "nsLayoutUtils.h"
#include "LayoutLogging.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsInlineFrame.h"
#include "nsIDOMNode.h"
#include "nsISelection.h"
@ -10767,7 +10766,7 @@ nsIFrame::UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame,
// Assuming anon boxes don't have ::backdrop associated with them... if that
// ever changes, we'd need to handle that here, like we do in
// ServoRestyleManager::ProcessPostTraversal
// RestyleManager::ProcessPostTraversal
// We do need to handle block pseudo-elements here, though. Especially list
// bullets.

View File

@ -3373,7 +3373,7 @@ public:
virtual ComputedStyle* GetParentComputedStyle(nsIFrame** aProviderFrame) const = 0;
/**
* Called by ServoRestyleManager to update the style of anonymous boxes
* Called by RestyleManager to update the style of anonymous boxes
* directly associated with this frame.
*
* The passed-in ServoRestyleState can be used to create new ComputedStyles as
@ -3409,7 +3409,7 @@ protected:
public:
// A helper both for UpdateStyleOfChildAnonBox, and to update frame-backed
// pseudo-elements in ServoRestyleManager.
// pseudo-elements in RestyleManager.
//
// This gets a ComputedStyle that will be the new style for `aChildFrame`, and
// takes care of updating it, calling CalcStyleDifference, and adding to the

View File

@ -16,7 +16,6 @@
#include "nsPresContext.h"
#include "nsCSSAnonBoxes.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsDisplayList.h"
#include "mozilla/Likely.h"
#include "SVGTextFrame.h"

View File

@ -17,7 +17,6 @@
#include "celldata.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include <algorithm>
#include "nsIScriptError.h"

View File

@ -7,7 +7,6 @@
#include "mozilla/AnimationCollection.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsAnimationManager.h" // For dom::CSSAnimation
#include "nsPresContext.h"
#include "nsTransitionManager.h" // For dom::CSSTransition

View File

@ -56,7 +56,7 @@
#include "mozilla/Mutex.h"
#include "mozilla/Preferences.h"
#include "mozilla/ServoElementSnapshot.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/SizeOfState.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/SystemGroup.h"

View File

@ -12,9 +12,8 @@
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/IntegerRange.h"
#include "mozilla/LookAndFeel.h"
#include "mozilla/RestyleManagerInlines.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/ServoStyleRuleMap.h"
#include "mozilla/ServoTypes.h"
#include "mozilla/StyleAnimationValue.h"
@ -84,7 +83,7 @@ class MOZ_RAII AutoPrepareTraversal
public:
explicit AutoPrepareTraversal(ServoStyleSet* aSet)
// For markers for animations, we have already set the markers in
// ServoRestyleManager::PostRestyleEventForAnimations so that we don't need
// RestyleManager::PostRestyleEventForAnimations so that we don't need
// to care about animation restyles here.
: mTimelineMarker(aSet->mDocument->GetDocShell(), false)
, mSetInServoTraversal(aSet)

View File

@ -38,8 +38,7 @@
#include "mozilla/EffectSet.h"
#include "mozilla/IntegerRange.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "mozilla/RestyleManager.h"
#include "imgIRequest.h"
#include "nsLayoutUtils.h"
#include "nsCSSKeywords.h"

View File

@ -17,7 +17,6 @@
#include "nsAttrValueInlines.h"
#include "nsCSSPseudoElements.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
using namespace mozilla;
using namespace mozilla::dom;

View File

@ -23,7 +23,6 @@
#include "nsHashKeys.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "mozilla/ServoStyleSet.h"
using namespace mozilla;

View File

@ -34,7 +34,6 @@
#include "nsRFPService.h"
#include "nsStyleChangeList.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsDOMMutationObserver.h"
using mozilla::TimeStamp;

View File

@ -9,7 +9,6 @@
// Keep others in (case-insensitive) order:
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsCSSFrameConstructor.h"
#include "nsISupportsImpl.h"
#include "nsSVGClipPathFrame.h"

View File

@ -10,7 +10,6 @@
// Keep others in (case-insensitive) order:
#include "ImgDrawResult.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/RestyleManagerInlines.h"
#include "nsCSSFrameConstructor.h"
#include "SVGObserverUtils.h"
#include "nsSVGElement.h"

View File

@ -39,7 +39,7 @@
#include "nsError.h"
#include "nsCSSFrameConstructor.h"
#include "mozilla/Range.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/ServoStyleSet.h"
#include "nsDisplayList.h"
#include "nsIScrollableFrame.h"