Implement element.innerText getter

This commit is contained in:
Fernando Jiménez Moreno 2018-01-09 13:27:32 +01:00
parent 0d7c2271c2
commit 2a4535f43e
16 changed files with 844 additions and 16 deletions

View file

@ -121,6 +121,7 @@ pub enum ReflowGoal {
StyleQuery(TrustedNodeAddress),
TextIndexQuery(TrustedNodeAddress, Point2D<f32>),
NodesFromPointQuery(Point2D<f32>, NodesFromPointQueryType),
ElementInnerTextQuery(TrustedNodeAddress),
}
impl ReflowGoal {
@ -129,12 +130,13 @@ impl ReflowGoal {
pub fn needs_display_list(&self) -> bool {
match *self {
ReflowGoal::NodesFromPointQuery(..) | ReflowGoal::TextIndexQuery(..) |
ReflowGoal::TickAnimations | ReflowGoal::Full => true,
ReflowGoal::TickAnimations | ReflowGoal::ElementInnerTextQuery(_) |
ReflowGoal::Full => true,
ReflowGoal::ContentBoxQuery(_) | ReflowGoal::ContentBoxesQuery(_) |
ReflowGoal::NodeGeometryQuery(_) | ReflowGoal::NodeScrollGeometryQuery(_) |
ReflowGoal::NodeScrollIdQuery(_) |
ReflowGoal::ResolvedStyleQuery(..) | ReflowGoal::OffsetParentQuery(_) |
ReflowGoal::StyleQuery(_) => false,
ReflowGoal::StyleQuery(_) => false,
}
}
@ -148,6 +150,7 @@ impl ReflowGoal {
ReflowGoal::NodeScrollIdQuery(_) | ReflowGoal::ResolvedStyleQuery(..) |
ReflowGoal::OffsetParentQuery(_) => false,
ReflowGoal::NodesFromPointQuery(..) | ReflowGoal::Full |
ReflowGoal::ElementInnerTextQuery(_) |
ReflowGoal::TickAnimations => true,
}
}