mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Remove text storage from TextPaintable
Instead of copying the layout node's text, retrieve the text from the layout node directly.
This commit is contained in:
parent
e6474778c6
commit
d1076c1e6e
Notes:
github-actions[bot]
2025-09-12 19:35:17 +00:00
Author: https://github.com/gmta
Commit: d1076c1e6e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6169
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/trflynn89
5 changed files with 8 additions and 13 deletions
|
|
@ -986,7 +986,7 @@ EventResult EventHandler::handle_doubleclick(CSSPixelPoint viewport_position, CS
|
|||
next_boundary = hit_dom_node.length_in_utf16_code_units();
|
||||
} else {
|
||||
auto& segmenter = word_segmenter();
|
||||
segmenter.set_segmented_text(hit_paintable.text_for_rendering());
|
||||
segmenter.set_segmented_text(hit_paintable.layout_node().text_for_rendering());
|
||||
|
||||
previous_boundary = segmenter.previous_boundary(result->index_in_node, Unicode::Segmenter::Inclusive::Yes).value_or(0);
|
||||
next_boundary = segmenter.next_boundary(result->index_in_node).value_or(hit_dom_node.length());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue