aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2017-01-06 18:51:24 -0800
committerBobby Holley <bobbyholley@gmail.com>2017-01-09 11:51:36 -0800
commit962a4a79bb8526ffdf02029df42167c5a9cce6ad (patch)
tree17f6dadc61d56347236cdd282a3e7e686539e7ff /components/script
parent9482467addebf6469f86331b34aaf7aab72fa0eb (diff)
downloadservo-962a4a79bb8526ffdf02029df42167c5a9cce6ad.tar.gz
servo-962a4a79bb8526ffdf02029df42167c5a9cce6ad.zip
Bug 1325734 - Remove Servo Layout's dependency on the initial-ness of the style. r=emilio
Diffstat (limited to 'components/script')
-rw-r--r--components/script/layout_wrapper.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 5576648b84d..15a110e7d51 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -67,7 +67,7 @@ use style::dom::{LayoutIterator, NodeInfo, OpaqueNode, PresentationalHintsSynthe
use style::dom::UnsafeNode;
use style::element_state::*;
use style::properties::{ComputedValues, PropertyDeclarationBlock};
-use style::selector_parser::{NonTSPseudoClass, PseudoElement, RestyleDamage, SelectorImpl};
+use style::selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl};
use style::sink::Push;
use style::str::is_whitespace;
use style::stylist::ApplicableDeclarationBlock;
@@ -740,6 +740,7 @@ impl<'ln> NodeInfo for ServoThreadSafeLayoutNode<'ln> {
}
impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
+ type ConcreteNode = ServoLayoutNode<'ln>;
type ConcreteThreadSafeLayoutElement = ServoThreadSafeLayoutElement<'ln>;
type ChildrenIterator = ThreadSafeLayoutNodeChildrenIterator<Self>;
@@ -815,15 +816,8 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
}
}
- fn restyle_damage(self) -> RestyleDamage {
- let element = if self.is_text_node() {
- self.node.parent_node().unwrap().as_element().unwrap()
- } else {
- self.node.as_element().unwrap()
- };
-
- let damage = element.borrow_data().unwrap().damage();
- damage
+ unsafe fn unsafe_get(self) -> Self::ConcreteNode {
+ self.node
}
fn can_be_fragmented(&self) -> bool {