Bug 1374235: style: Remove the for reconstruction traversals. r=bholley
One less hack, a few more to go. MozReview-Commit-ID: 6katL1EGn2U
This commit is contained in:
@@ -7597,22 +7597,6 @@ nsCSSFrameConstructor::StyleNewChildRange(nsIContent* aStartChild,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsCSSFrameConstructor::StyleChildRangeForReconstruct(nsIContent* aStartChild,
|
||||
nsIContent* aEndChild)
|
||||
{
|
||||
ServoStyleSet* styleSet = mPresShell->StyleSet()->AsServo();
|
||||
|
||||
// We take a parallelism hit here, since we don't have a great API to pass
|
||||
// a range of elements to style to Servo.
|
||||
for (nsIContent* child = aStartChild; child != aEndChild;
|
||||
child = child->GetNextSibling()) {
|
||||
if (child->IsElement()) {
|
||||
styleSet->StyleSubtreeForReconstruct(child->AsElement());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
nsIContent* aFirstNewContent,
|
||||
@@ -7702,12 +7686,8 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
}
|
||||
|
||||
// We couldn't construct lazily. Make Servo eagerly traverse the new content.
|
||||
if (aContainer->IsStyledByServo()) {
|
||||
if (aForReconstruction) {
|
||||
StyleChildRangeForReconstruct(aFirstNewContent, nullptr);
|
||||
} else {
|
||||
StyleNewChildRange(aFirstNewContent, nullptr);
|
||||
}
|
||||
if (isNewlyAddedContentForServo) {
|
||||
StyleNewChildRange(aFirstNewContent, nullptr);
|
||||
}
|
||||
|
||||
if (isNewShadowTreeContent) {
|
||||
@@ -8191,12 +8171,8 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||
}
|
||||
|
||||
// We couldn't construct lazily. Make Servo eagerly traverse the new content.
|
||||
if (aContainer->IsStyledByServo()) {
|
||||
if (aForReconstruction) {
|
||||
StyleChildRangeForReconstruct(aStartChild, aEndChild);
|
||||
} else {
|
||||
StyleNewChildRange(aStartChild, aEndChild);
|
||||
}
|
||||
if (isNewlyAddedContentForServo) {
|
||||
StyleNewChildRange(aStartChild, aEndChild);
|
||||
}
|
||||
|
||||
if (isNewShadowTreeContent) {
|
||||
|
||||
Reference in New Issue
Block a user