diff options
author | Ben <bennyschulenburg@gmx.de> | 2024-09-24 11:45:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:45:33 +0000 |
commit | dbd1666b17b22130bcce75e6255f376e6fbe256c (patch) | |
tree | 698fd6c36e8fbf3c1f2001521beb5412915838bd /components/layout_thread | |
parent | 88ffe9f7a56ef0981805a7b8264f870947cebcf5 (diff) | |
download | servo-dbd1666b17b22130bcce75e6255f376e6fbe256c.tar.gz servo-dbd1666b17b22130bcce75e6255f376e6fbe256c.zip |
Layout: Implement innerText/outerText (#33312)
* Implement outerText on HtmlElement
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* Fixed some innerText/outerText bugs
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* Unified innerText/outerText handling outside of Layout
Before these 2 were treated separately and only within
Layout would they end up calling the same method, now
they are already unified within HTMLElement
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* Address a few nits
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Added innerText support for `inline-flex`
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
---------
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Shane Handley <shanehandley@fastmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/layout_thread')
-rw-r--r-- | components/layout_thread/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index fbf2621c8a9..765b5c3cd28 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -37,8 +37,8 @@ use layout::flow::{Flow, FlowFlags, GetBaseFlow, ImmutableFlowUtils, MutableOwne use layout::flow_ref::FlowRef; use layout::incremental::{RelayoutMode, SpecialRestyleDamage}; use layout::query::{ - process_client_rect_query, process_content_box_request, process_content_boxes_request, - process_element_inner_text_query, process_offset_parent_query, + get_the_text_steps, process_client_rect_query, process_content_box_request, + process_content_boxes_request, process_offset_parent_query, process_resolved_font_style_request, process_resolved_style_request, process_scrolling_area_request, }; @@ -325,12 +325,12 @@ impl Layout for LayoutThread { process_client_rect_query(node, root_flow_ref) } - fn query_element_inner_text( + fn query_element_inner_outer_text( &self, node: script_layout_interface::TrustedNodeAddress, ) -> String { let node = unsafe { ServoLayoutNode::new(&node) }; - process_element_inner_text_query(node, &self.indexable_text.borrow()) + get_the_text_steps(node, &self.indexable_text.borrow()) } fn query_inner_window_dimension( |