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>