Bug 1331294 - Part 6: Remove RestyleManager::HasPendingRestyles and Servo_Element_ShouldTraverse. r=bholley

MozReview-Commit-ID: 2ST5i7M4QZ4
This commit is contained in:
Cameron McCormack 2017-02-10 10:42:30 +08:00
parent 115c6f2cf4
commit 41cbd56383
11 changed files with 1 additions and 58 deletions

View File

@ -447,8 +447,6 @@ public:
UnsetFlags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO);
}
inline bool ShouldTraverseForServo();
inline void NoteDirtyDescendantsForServo();
#ifdef DEBUG

View File

@ -51,12 +51,6 @@ Element::GetFlattenedTreeParentElementForStyle() const
return nullptr;
}
inline bool
Element::ShouldTraverseForServo()
{
return HasDirtyDescendantsForServo() || Servo_Element_ShouldTraverse(this);
}
inline void
Element::NoteDirtyDescendantsForServo()
{

View File

@ -264,9 +264,6 @@ public:
// itself.
void ProcessPendingRestyles();
// Returns whether there are any pending restyles.
bool HasPendingRestyles() { return mPendingRestyles.Count() != 0; }
private:
// ProcessPendingRestyles calls into one of our RestyleTracker
// objects. It then calls back to these functions at the beginning

View File

@ -147,7 +147,6 @@ public:
int32_t aModType,
const nsAttrValue* aOldValue);
inline nsresult ReparentStyleContext(nsIFrame* aFrame);
inline bool HasPendingRestyles();
inline uint64_t GetRestyleGeneration() const;
inline uint32_t GetHoverGeneration() const;
inline void SetObservingRefreshDriver(bool aObserving);

View File

@ -9,7 +9,6 @@
#include "mozilla/RestyleManager.h"
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/ServoRestyleManagerInlines.h"
#define FORWARD_CONCRETE(method_, geckoargs_, servoargs_) \
if (IsGecko()) { \
@ -158,12 +157,6 @@ RestyleManagerHandle::Ptr::ReparentStyleContext(nsIFrame* aFrame)
FORWARD(ReparentStyleContext, (aFrame));
}
bool
RestyleManagerHandle::Ptr::HasPendingRestyles()
{
FORWARD(HasPendingRestyles, ());
}
uint64_t
RestyleManagerHandle::Ptr::GetRestyleGeneration() const
{

View File

@ -8,7 +8,6 @@
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoRestyleManagerInlines.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/dom/ChildIterator.h"
#include "nsContentUtils.h"

View File

@ -79,9 +79,6 @@ public:
nsresult ReparentStyleContext(nsIFrame* aFrame);
inline bool HasPendingRestyles();
/**
* Gets the appropriate frame given a content and a pseudo-element tag.
*

View File

@ -1,33 +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 ServoRestyleManagerInlines_h
#define ServoRestyleManagerInlines_h
#include "ServoRestyleManager.h"
#include "mozilla/dom/ElementInlines.h"
namespace mozilla {
using namespace dom;
inline bool
ServoRestyleManager::HasPendingRestyles()
{
nsIDocument* doc = PresContext()->Document();
DocumentStyleRootIterator iter(doc);
while (Element* root = iter.GetNextStyleRoot()) {
if (root->ShouldTraverseForServo()) {
return true;
}
}
return false;
}
} // namespace mozilla
#endif // ServoRestyleManagerInlines_h

View File

@ -80,7 +80,6 @@ EXPORTS.mozilla += [
'RestyleManagerHandle.h',
'RestyleManagerHandleInlines.h',
'ServoRestyleManager.h',
'ServoRestyleManagerInlines.h',
'ShapeUtils.h',
'StaticPresData.h',
]

View File

@ -82,6 +82,7 @@
#include "nsTArray.h"
#include "nsGenericDOMDataNode.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ElementInlines.h"
#include "nsAutoLayoutPhase.h"
#include "nsStyleStructInlines.h"
#include "nsPageContentFrame.h"

View File

@ -20,7 +20,6 @@
// Element data
SERVO_BINDING_FUNC(Servo_Element_ClearData, void, RawGeckoElementBorrowed node)
SERVO_BINDING_FUNC(Servo_Element_ShouldTraverse, bool, RawGeckoElementBorrowed node)
// Styleset and Stylesheet management
SERVO_BINDING_FUNC(Servo_StyleSheet_Empty, RawServoStyleSheetStrong,