diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-07-17 11:11:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 09:11:09 +0000 |
commit | cf78bd7a0fd75ff391ad98eb281bca5a2a436a44 (patch) | |
tree | 5ed43cc14d93305e6a01def4bbb8d9388256723d /components/layout_2020 | |
parent | c86faae371f1319d136425e2ffcd80def48132fd (diff) | |
download | servo-cf78bd7a0fd75ff391ad98eb281bca5a2a436a44.tar.gz servo-cf78bd7a0fd75ff391ad98eb281bca5a2a436a44.zip |
Use explicit WebRender hit test items in legacy layout (#29981)
Including hit tests in non-hit test display list items is no longer
supported in upstream WebRender, so this change switches legacy layout
to always use explicit hit test display list items.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/layout_2020')
-rw-r--r-- | components/layout_2020/display_list/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/components/layout_2020/display_list/mod.rs b/components/layout_2020/display_list/mod.rs index da65577f34c..80670108991 100644 --- a/components/layout_2020/display_list/mod.rs +++ b/components/layout_2020/display_list/mod.rs @@ -281,8 +281,12 @@ impl Fragment { return; } - let mut common = builder.common_properties(rect.to_webrender(), &fragment.parent_style); - common.hit_info = builder.hit_info(&fragment.parent_style, fragment.base.tag, Cursor::Text); + let common = builder.common_properties(rect.to_webrender(), &fragment.parent_style); + + let hit_info = builder.hit_info(&fragment.parent_style, fragment.base.tag, Cursor::Text); + let mut hit_test_common = common.clone(); + hit_test_common.hit_info = hit_info; + builder.wr().push_hit_test(&hit_test_common); let color = fragment.parent_style.clone_color(); let font_metrics = &fragment.font_metrics; |