mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
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>
This commit is contained in:
parent
88ffe9f7a5
commit
dbd1666b17
26 changed files with 617 additions and 1625 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue