When the user pressed esc during an SSL prompt, the message.ask call
returned None, which was handled fine by QtWebKit (which simply used an
'if') but failed with QtWebEngine (which returned the value to Qt).
Fixes#2123.
webelem.text() was only used without use_js=True from webelem.__str__.
Now we instead default to the use_js=True behavior and renamed the
method from text() to value().
The old behavior is instead directly implemented in __str__.
This changes how webelem.value (aka text) handles elements for which
is_content_editable() returns True, but I haven't found any cases where
this makes a difference.
This also fixes getting existing text from elements with QtWebEngine,
which closes#1957.
With QtWebEngine, handling a click (e.g. createWindow being called)
happens some time after a click event has been handled.
When setting override_target, that means we don't know when to set the
override target back, and we can't simply only unset it in createWindow
as elements not causing a new tab to be opened (like an input field) can
be hinted too.
Instead, we now only use override_target with QtWebKit, and simply
generate fake key events with the right modifiers to do the right thing
in createWindow for QtWebEngine.
Fixes#2119.
There were actually two issues here:
- The override_target was reset too early - now
acceptNavigationRequest/createWindow is responsible for resetting it.
- The QTBUG-54419 workaround opened any tabs in the background instead
of preserving their position/focus.
Fixes#2086.
Before, we used the same logic for QtWebKit and QtWebEngine, where we
simply set an attribute on the tab on a mousePressEvent and then handled
opening links in acceptNavigationRequest.
However, this caused random links to pop up in new tabs (probably to
things being much more async?) on QtWebEngine, so we now handle those
cases in createWindow and only use override_target from the tab there.
Fixes#2102.