mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Introduce a dedicated data structure for text queries
Add an IndexableText structure for text queries. Instead of linear search for a node this now uses a HashMap. Remove the now irrelevant fields from TextDisplayItem.
This commit is contained in:
parent
a5115139ba
commit
2d74bcfea5
6 changed files with 70 additions and 49 deletions
|
@ -7,6 +7,7 @@
|
|||
use app_units::Au;
|
||||
use construct::ConstructionResult;
|
||||
use context::LayoutContext;
|
||||
use display_list::IndexableText;
|
||||
use euclid::{Point2D, Vector2D, Rect, Size2D};
|
||||
use flow::{Flow, GetBaseFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
|
||||
|
@ -51,6 +52,8 @@ pub struct LayoutThreadData {
|
|||
/// The root stacking context.
|
||||
pub display_list: Option<Arc<DisplayList>>,
|
||||
|
||||
pub indexable_text: IndexableText,
|
||||
|
||||
/// A queued response for the union of the content boxes of a node.
|
||||
pub content_box_response: Option<Rect<Au>>,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue