servo: Merge #18342 - style: Remove the for reconstruction traversals (from emilio:die-forreconstruct-die); r=bholley

One less hack, a few more to go.

Bug: 1374235
Reviewed-by: bholley
MozReview-Commit-ID: 6katL1EGn2U
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

Source-Repo: https://github.com/servo/servo
Source-Revision: 876b70b02c7a3c8aad26b26dcbcfddaa5c747493

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c421be7da780736f47930015ff021477f04fcef7
This commit is contained in:
Emilio Cobos Álvarez 2017-09-01 08:56:58 -05:00
Родитель caed9a66be
Коммит 7b31481d83
2 изменённых файлов: 1 добавлений и 11 удалений

Просмотреть файл

@ -290,13 +290,7 @@ pub trait DomTraversal<E: TElement> : Sync {
// Servo uses the post-order traversal for flow construction, so we need
// to traverse any element with damage so that we can perform fixup /
// reconstruction on our way back up the tree.
//
// In aggressively forgetful traversals (where we seek out and clear damage
// in addition to not computing it) we also need to traverse nodes with
// explicit damage and no other restyle data, so that this damage can be cleared.
if (cfg!(feature = "servo") ||
traversal_flags.contains(traversal_flags::AggressivelyForgetful)) &&
!data.restyle.damage.is_empty() {
if cfg!(feature = "servo") && !data.restyle.damage.is_empty() {
return true;
}

Просмотреть файл

@ -24,9 +24,6 @@ bitflags! {
/// pre-traversal. A forgetful traversal is usually the right thing if you
/// aren't going to do a post-traversal.
const Forgetful = 1 << 3,
/// Actively seeks out and clears change hints that may have been posted into
/// the tree. Nonsensical without also passing Forgetful.
const AggressivelyForgetful = 1 << 4,
/// Clears all the dirty bits on the elements traversed.
const ClearDirtyBits = 1 << 5,
/// Clears the animation-only dirty descendants bit in the subtree.
@ -66,7 +63,6 @@ pub fn assert_traversal_flags_match() {
ServoTraversalFlags_ForCSSRuleChanges => ForCSSRuleChanges,
ServoTraversalFlags_UnstyledOnly => UnstyledOnly,
ServoTraversalFlags_Forgetful => Forgetful,
ServoTraversalFlags_AggressivelyForgetful => AggressivelyForgetful,
ServoTraversalFlags_ClearDirtyBits => ClearDirtyBits,
ServoTraversalFlags_ClearAnimationOnlyDirtyDescendants =>
ClearAnimationOnlyDirtyDescendants,