| Commit message (Collapse) | Author | Age | Files | Lines |
---|
|||||||||| | contenteditable on the window caused characters to be inserted. Instead create a div as a child element, and set contenteditable on that. Fixes: QTBUG-136050 Change-Id: I4ccf3589ea19876f68bb9c7077c3a13ae5f989e6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
|||||||| | This is how it used to be. More changes are needed to fix cut/copy/paste. Change-Id: Ib5073b82a568a391581f0b4d8369eaab57fd8f19 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||||||| | Use QWasmEventHandler instead of calling addEventListener() directly (using QWasmEventHandler also allows supporting JSPI). The QWasmEventHandler destructor calls removeEventListener(), which should make sure everything gets cleaned up. Keep the Chrome-specific global (document) event handler code path, but register once at startup instead of once per window. Change-Id: If4314df738afc0dcfdb0f6f1ab9e1f176e1812ac Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||| | This element is not a part of the accessibility implementation, and should not be visible to the screen reader. Change-Id: Ifb8c404f7dd5a916cd42856b1f6b4529f2fb3ae0 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> |
||||||| | This amends 593c7b9be40f3fa876ffadd7518795a333dc5b74. Change-Id: Iae1e46cb9b85eb1c47e02b286aa832d2e3b92dac Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||| | It is not always required, limit it to the cases where it is explicitly given, or if it is necessary. Fixes: QTBUG-135024 Change-Id: I451379d86543e2297574d4cda09ef825736f9c5d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||| | Pick-to: 6.9 6.8 Fixes: QTBUG-135874 Change-Id: I84459af06d34682ca3bed1e2e1dab773c77bbcae Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||| | Pick-to: 6.9 6.8 Fixes: QTBUG-135875 Change-Id: Ibf0a51ff0e1268f32d32511dff64003c28137795 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||| | innerHTML does not work too well with type input. Instead use attribute 'aria-label' Task-number: QTBUG-135590 Change-Id: Ibec36a133c650bb51b1f1a84580a5ce35531c137 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||||| | The accessibility code uses a shared event handler installed on several elements. Register the event handler in the constructor and then add it to the a11y elements as needed. Change-Id: I9bfc49a3358f15cc62de9c8140cab96cf0b23161 Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@qt.io> |
||||| | Change-Id: Ieddd4b6a0e948c65679cc66ba1f4ea22c9ec5fc5 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> |
|||||||||||| | Follow-up to 13e92283, change the clipboard event handlers to use QWasmEventHandler as well. The removed addEventListener calls set capturing to false, but this is already the default (also for QWasmEventHandler), Change-Id: Ibecaa22099fecd371a5d243cf391d3ce6f562400 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> |
|||||||||||| | Listen for "focus" javascript events.. Listen for QAccessible::Focus a11y events. When receiving QAccessible::PopupMenuStart set focus to first item. Task-number: QTBUG-135096 Change-Id: I676e53e77169cc1643765210318b460193042c53 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
|||||||||| | m_inputContext and other fields depends on the lifetime of m_suspendResume, but the latter gets destroyed first. Make sure that m_suspendResume is initialized first. Fixes: QTBUG-135378 Change-Id: Ifa2d58ec06a1f832549478bece3a8f651276ac8f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
|||||| | Task-number: QTBUG-133596 Change-Id: I4482fe5a3457579867bd870cb2c8d371dd08e1a0 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> |
|||||| | Fixes: QTBUG-134585 Change-Id: Ib82ee6f59b7b2ca16ad4d84980cbd27ba13b6dd0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
|||||||| | If QT_WASM_ENABLE_ACCESSIBILITY is set to "1" when the application starts, accessibility is enabled right away. Change-Id: I5b0118dc8ae19f446c64be33fe3c03b45c5b4527 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||| | There are various tests for this within the accessibility system. Without it, it is not consistent what works and what does not work. Task-number: QTBUG-134657 Change-Id: Idfa8905f377e2ef00a4d1af26cbf001064bc75dc Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
|||||| | Change-Id: Ia6d7b9972c126b926e1d7d458ef4e034edbc924a Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||| | Also saves one malloc call per event handler. Change-Id: I33a72916b101e27d2e4139ebb1dc5227b0793273 Reviewed-by: Lorn Potter <lorn.potter@qt.io> |
||||||||| | Make it test for null QWindow and handle(), use it instead of C-style casting handle(). Change-Id: I7ffb1ef5d3d3c09c8ae44ec0141e93530a04abe6 Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> |
|||||| | Task-number: QTBUG-115926 Change-Id: I04ccf9371af4eb4890a9cfe21cc6d8f005a3cc44 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||||||||||||||||||||||||||| | Rewrite the event dispatcher to use QWasmSuspendResumeControl for asyncify suspend/resume. This includes using the following helper classes which provides additional functionality on top of QWasmSuspendResumeControl. - QWasmTimer: manages native timers on the main thread - QWasmEventHandler and qstdweb::EventCallback: input events - QWasmAnimationFrameHandler: animation frame events Initialization differs slightly, depending on if QtGui and the QPA machinery is in use, or of the app is a QtCore only application. In the former case, QWasmSuspendResumeControl is created early by QWasmIntegration in order to support registering event handlers at startup, before the event dispatcher has been created. processEvents() now actually processes native events. This is done by running a suspend-resume loop until the native event queue has been exhausted. If WaitForMoreEvents is specified then processEvents() will, in addition, also suspend and wait for additional native events. Timers on secondary threads are now managed by modifying the wait condition timeout, instead of proxying timers to the main thread. In effect secondary threads will now sleep until the next timer should fire, and then wake up and process that timer. Change-Id: I20e8afb6b67c64a7c52dbd89e9c50ffadba39594 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> |
||||||||||||| | We used to call focus on the input element even for things like pushbuttons. This will display a keyboard on android, instead call focus on the focus window. Fixes: QTBUG-133781 Pick-to: 6.9 6.8 Change-Id: Ide4d6ec21a14f17b40d3d3de077c0ab073682f19 Reviewed-by: Lorn Potter <lorn.potter@qt.io> |
|||||||||||||||||||||||| | Having the input field length too wide causes the view to scroll to contain it. Since it is not visible, setting it to 1px width and height should work. Further, input field contents where set on the showInputPanel call. At this point in time we do not necessarily have an updated focus object. Hence the input contents is now set on the setFocusObject call. Ignore input on showInputPanel/hideInputPanel. This reflects the current design where showInputPanel do not act unless inputMethodAccepted(), and hideInputPanel do not act if m_focusObject. Still hideInputPanel used to set m_usingTextInput to false, this behavior is not kept. Fixes: QTBUG-132057 Pick-to: 6.8 6.9 Change-Id: I2d7088def8060df267c5da9e045824decd913faa Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
|||||||||||||| | isActive() may return true if a (transient) parent window is active (has focus). Compare against QGuiApplication::focusWindow() instead. Fixes: QTBUG-129233 Pick-to: 6.8 6.9 Change-Id: I834a5814a5db161bdea2ba3524d1010e0c0e3e6e Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Lorn Potter <lorn.potter@qt.io> |
||||||||||||||||||||||||||||||| | 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> |
|||||||||| | This allows us to keep all event handlers in one place. Move event handler registration to registerEventHandlers(), which is called from the QWasmWindow constructor. Change-Id: I31f22d6eb876b92bb15d4a140e0569f0288a5915 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||||||| | Set the event type from the event handler instead of determining the event type at run-time based on string comparison. QWasmDeadKeySupport adds a complication. This can't be easily simplified or removed since it maintains state. Change-Id: Iad6f02ee7e2dc22817d7ac606514a2b4022f8fb0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> |
||||||||||||||||||| | qdebug.h includes many Qt and STL headers, so if you include a Qt header you get all those transitive includes, which may affect build time. - Where appropriate use the printf-like syntax of qDebug() and co., these don't need the QDebug streaming operators - qfloat16 is used in an inline member function, so include it explicitly [ChangeLog][Potentially Source Incompatible Changes] Various Qt public headers don't include QDebug any more; if you need QDebug's streaming you'll have to include it in your code. Task-number: QTBUG-132439 Pick-to: 6.9 Change-Id: I750587e17a3b38fa226cd3af8eaccc8da580f436 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> |
|||||||||||||| | It seems that findChildren does not return every window if called at an inconvenient time. This causes not all windows to be returned, and later the QWasmCompositor will not detect a valid window to compose, and therefor goes to disabled. Fixes: QTBUG-132414 Pick-to: 6.9 Change-Id: I6c872071751d5a2fbdeea36fb8f4c7e9677fd7d0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||| | Wheel events only have one type ("wheel"), which can be specified directly. Change-Id: Icd5adaf262bc4b5159fd1c38acd8041b7e4cda99 Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@qt.io> |
|||||||||| | Set the event type from the event handler instead of determining the event type at run-time based on string comparison. Change-Id: I1df299bd0c8fd1c989e4e283aa1cb04cddafc1ce Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@qt.io> |
|||||||||| | The EmscriptenKeyboardEvent case is not in use and can be removed and replaced with a normal function. Change-Id: Ie887a01947b94f004e960ddebc7597ac1445eddf Reviewed-by: Lorn Potter <lorn.potter@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
||||||||| | The compiler will generate them for us, even if we don't specify "= default". Change-Id: I3d19611fd2d44aed590337b851b26b89d39ea5bd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> |
|||||||||||||||| | We know the type of pointer event based on the callback (down, move, up, etc), which means the code which determines the type based on the type string can be removed. This saves one string comparison per event, and also allows removing the runtime error case where we are unable to determine which type of pointer event we have. Remove PointerEvent::fromWeb(), and construct the pointer event directly in the event handler instead. Change-Id: I4fe566bf076dddd5bf39217f1d6671ba07e25912 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
|||||||||||||||||| | We had input handling enabled as a precondition for setting focus. This is wrong, we need to have the focus for toggle buttons and other non-input things as well. (Also toggle buttons act on spacebar). Also selects a new active window if the window that is active (i.e a dialog) is deleted. Also shift + tab did not always work, fixed to emit Key_Backtab Fixes: QTBUG-130371 Pick-to: 6.8 Change-Id: I3b36a3e200ba9d4b0791865e75235ddfb72bcaa5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||||||||||| | Fixes (Alt + '~') + 'a' -> ã (Compose) + '\'' + e -> é A key change is to look at "isComposing" for events Related bugs: QTBUG-107139 QTBUG-124932 QTBUG-117096 Fixes: QTBUG-130887 Pick-to: 6.8 Change-Id: I0d4641d89952e0b4117226994a91e40039ad8a03 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||| | Colorful emojis in Unicode are not isolated to specific ranges of code points like other writing systems. Instead, there are a set of rules defining whether a sequence of characters should be displayed in color or black/white. http://www.unicode.org/reports/tr51/ For instance, appending a variation selector to a character can turn it into a color emoji, even if it is a code point that predates the invention of emojis. In addition, sequences of joined characters that are determined to be a color emoji sequence should be parsed by a single emoji font, so that it can apply things like skin color, etc. In general, users expect emojis and emoji sequences to be shown in the preferred color font of the system, even if a selected font has black/white characters for the symbols. This patch applies the emoji segmenter to strings to isolate sequences that should be in color. As an implementation hack, we mark this in the QScriptItems as a special "emoji" script. Note that this is not a real Unicode script and only exists internally for this reason, because the "emojiness" of the resulting glyph overrides the original script of the individual characters when selecting fonts. This way, we can use a lot of the same logic for itemizing the strings and looking up fonts, and we don't need to increase the size of the QScriptItem. (It is just an implementation detail and is not exposed to the user, so it can be replaced by other approaches later if we need to.) When matching an emoji sequence, we always try to apply a color font and ignore all others. The exception is if there is no color font at all on the system, then we will find a black and white font which supports the characters instead as a final failsafe. In addition, each platform will put its default emoji font at the top of the fallbacks list in order to make this the preference in case there are more than one. This patch also adds API to override this with an application-defined emoji font, since this is a common use case. Note: The font includes an environment variable to disable the feature as a fail safe. A flag to disable it per QFont will be added in a follow-up. Fixes: QTBUG-111801 Change-Id: I9431ec34d56772ab8688814963073b83b23002ae Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: <carl@carlschwan.eu> |
||||||||||||| | Qt used to accept a canvas created by user code. This is no longer supported and user code should provide a div container element instead. Make this an error case with a qFatal() Change-Id: I5c5ceef85916632bd95347546a8098b9a650afa6 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
||||||||||| | Rename to updateQScreenSize(). QWasmScreen no longer manages the canvas (moved to QWasmWindow). The DPR- handling code can also be deleted. Task-number: QTBUG-128732 Change-Id: Id1c27c7010782b2cb0e36e9a4b535e67569541ac Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> |
|||||||||| | Not in use: QScreen no longer processes events (moved to QWindow), Task-number: QTBUG-128732 Change-Id: I2d20ba0adf42117afad3cdaea0474158f2c1c54a Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
|||||||||| | This element is the main window element and should have the simple name. Task-number: QTBUG-128732 Change-Id: Ia5e38d20468272e8102f516adc596bfdb37e28c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> |
||||||||| | This is the parent element for the window decorations (title bar, resize handles), and also the window contents. Task-number: QTBUG-128732 Change-Id: I9ba814a7cf8477ab767278fe6548cd05e83266ca Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> |
|||||||||||| | This shadows QPlatformWindow::window(), and we don't need it anyway. (also frees up the variable name for later use) Task-number: QTBUG-128732 Change-Id: Ie6e355b3136b106aed4b34cbe7f883008e1b3870 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
||||||||| | This html element should have all input event handling. Task-number: QTBUG-128732 Change-Id: I0da76ec410dad3165212ad5fc06f575acb07c3da Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
||||||||| | Make the canvas and the a11y container element be children of m_windowContents instead. Task-number: QTBUG-128732 Change-Id: I6386eaa02a412888ae92beb8a74036b36b9b03db Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
||||||||||| | The canvas is aria-hidden, and should not take focus or handle events. Move this to the window contents element. Task-number: QTBUG-128732 Change-Id: I54453d067570b9e2c9db9c7293f267f4cfc0aacd Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
|||||||||| | qt-window-content is a bit too generic; the window has other content besides the canvas, like the accessibility elements. Task-number: QTBUG-128732 Change-Id: I9e0ff4393fb8425769e7cfe8618603d87f47b7ab Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
|||||||||| | Fixes a problem where tooltips only worked for the first instance activated. Fixes: QTBUG-129234 Pick-to: 6.8 Change-Id: I45619b1ca8001b74b148b98a8795000630dcacf7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> |