aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-08-03 19:02:26 -0500
committerGitHub <noreply@github.com>2016-08-03 19:02:26 -0500
commitcbf71a2cf39e792f75309e68f7cabe862d4a70eb (patch)
tree5e5ec838fca5c5abc51090f73739a5e0bb02249e /components/script/layout_wrapper.rs
parent85536900885911fae58207f63e956b4148a4861a (diff)
parent444e8f85c8f5d0c1815f7227ec63c6b5a91f946a (diff)
downloadservo-cbf71a2cf39e792f75309e68f7cabe862d4a70eb.tar.gz
servo-cbf71a2cf39e792f75309e68f7cabe862d4a70eb.zip
Auto merge of #12645 - emilio:stylo, r=bholley
stylo: Allow computing change hints during the traversal. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests because geckolib :-( <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @bholley cc @heycam <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12645) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 83245efe9f1..544eb00a560 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -51,6 +51,7 @@ use selectors::matching::{DeclarationBlock, ElementFlags};
use selectors::parser::{AttrSelector, NamespaceConstraint};
use std::marker::PhantomData;
use std::mem::{transmute, transmute_copy};
+use std::sync::Arc;
use string_cache::{Atom, BorrowedAtom, BorrowedNamespace, Namespace};
use style::attr::AttrValue;
use style::computed_values::display;
@@ -58,7 +59,7 @@ use style::context::SharedStyleContext;
use style::data::PrivateStyleData;
use style::dom::{PresentationalHintsSynthetizer, OpaqueNode, TDocument, TElement, TNode, UnsafeNode};
use style::element_state::*;
-use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
+use style::properties::{ComputedValues, PropertyDeclaration, PropertyDeclarationBlock};
use style::refcell::{Ref, RefCell, RefMut};
use style::selector_impl::{ElementSnapshot, NonTSPseudoClass, ServoSelectorImpl};
use style::sink::Push;
@@ -262,6 +263,13 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
self.node.next_sibling_ref().map(|node| self.new_with_this_lifetime(&node))
}
}
+
+ #[inline]
+ fn existing_style_for_restyle_damage<'a>(&'a self,
+ current_cv: Option<&'a Arc<ComputedValues>>)
+ -> Option<&'a Arc<ComputedValues>> {
+ current_cv
+ }
}
impl<'ln> LayoutNode for ServoLayoutNode<'ln> {