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>
This commit is contained in:
Martin Robinson 2023-07-17 11:11:09 +02:00 committed by GitHub
parent c86faae371
commit cf78bd7a0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 15 deletions

View file

@ -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;