aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/node.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-12-09 19:39:40 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-12-09 19:40:08 -0800
commit30bbaa49b700140574c5848955abba4b8d2dc48c (patch)
tree0f1ef97233c8509d2eeb43e00b8f968544376d88 /src/components/script/dom/node.rs
parente8ffac13d7e0ebc0701b87b774491b2b1b895607 (diff)
downloadservo-30bbaa49b700140574c5848955abba4b8d2dc48c.tar.gz
servo-30bbaa49b700140574c5848955abba4b8d2dc48c.zip
Revert "auto merge of #1356 : ksh8281/servo/remove_@_in_LayoutTask.FontContext, r=pcwalton"
This reverts commit e8ffac13d7e0ebc0701b87b774491b2b1b895607, reversing changes made to db923feffe4ef1f15c34c2a50acdf74a4321e2d4. Reverting this change because FreeType is *not* thread safe. See the documentation here: http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html "In multi-threaded applications, make sure that the same FT_Library object or any of its children doesn't get accessed in parallel." We will need to use a `MutexArc` instead.
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r--src/components/script/dom/node.rs39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index a3edd1eb054..b0394528d95 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -1217,20 +1217,6 @@ pub trait PostorderNodeTraversal {
}
}
-/// A bottom-up, parallelizable traversal.
-pub trait PostorderNodeMutTraversal {
- /// The operation to perform. Return true to continue or false to stop.
- fn process(&mut self, node: AbstractNode<LayoutView>) -> bool;
-
- /// Returns true if this node should be pruned. If this returns true, we skip the operation
- /// entirely and do not process any descendant nodes. This is called *before* child nodes are
- /// visited. The default implementation never prunes any nodes.
- fn should_prune(&self, _node: AbstractNode<LayoutView>) -> bool {
- false
- }
-}
-
-
impl AbstractNode<LayoutView> {
/// Traverses the tree in postorder.
///
@@ -1255,29 +1241,4 @@ impl AbstractNode<LayoutView> {
traversal.process(self)
}
-
- /// Traverses the tree in postorder.
- ///
- /// TODO(pcwalton): Offer a parallel version with a compatible API.
- pub fn traverse_postorder_mut<T:PostorderNodeMutTraversal>(mut self, traversal: &mut T) -> bool {
- if traversal.should_prune(self) {
- return true
- }
-
- let mut opt_kid = self.first_child();
- loop {
- match opt_kid {
- None => break,
- Some(kid) => {
- if !kid.traverse_postorder_mut(traversal) {
- return false
- }
- opt_kid = kid.next_sibling()
- }
- }
- }
-
- traversal.process(self)
- }
-
}