Morten Sørvig a9bbcdd7bf wasm: support foreign windows
Add support for embedding native html elements using
QWindow::fromWinId().

WId is an emscripten::val *, e.g. a pointer to val which
holds a html element. The element can be created either from
C++ using emscripten::val, or from JavaScript. User code
owns the val * as usual for WId; ownership is not passed to the
QWindow instance.

Set QWasmWindow::m_window to be the native element when
fromWinId() is used, and skip the rest of the QWasmWindow
implementation in that case: We don't need to install event
handlers or provide accessibility elements.

Make key and pointer event handlers stop propagation only
if the event was not accepted. This makes sure that input
events reach the embedded native element.

Limit setPointerCapture calls to when the event is targeted
for Qt elements only. Determining the true target can be
a bit tricky when shadow DOM is in use since the browsers
may retarget the event. Use composedPath() to get the true
event target.

Task-number: QTBUG-128804
Task-number: QTBUG-128732
Change-Id: I5ce66e93bacb06abfd042916687cd45fc9588c51
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2025-01-29 13:59:09 +01:00
..
2025-01-29 13:59:09 +01:00
2025-01-29 13:59:09 +01:00
2024-11-05 14:36:16 +01:00
2023-04-13 18:30:58 +02:00

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.