When we open a background tab, it gets a hardcoded size (800x600 or so) because
it doesn't get resized by the layout yet.
By resizing it to the size it'll actually have later, we make sure scrolling to
an anchor in an background tab works, and JS also gets the correct size for
background tabs.
Fixes#1190Fixes#2495
See #1417
The test fails on Ubuntu Xenial because QtOpenGL is not installed.
This isn't a problem with real-life usage though, as we only call it with
QtWebEngine, and that ensures that QtOpenGL is available.
With general -> save-session on and only private windows open, we can easily get
a session file with "windows: []" in it. If we loaded such a file, we got no
windows at all when qutebrowser started.
Fixes#2664
In a48ea597d0 we fixed settings in private
QtWebEngine windows.
However, this means we also enable local storage for private windows, which was
disabled in QtWebEngine by default:
4ef5831a39 (diff-44ac7d27348388501944f6a8e2e67d8dR207)
It should be safe to enable it, as we get the same behavior as in Chromium, i.e.
a working local storage which entirely lives in RAM.
This also makes those tests work on QtWebKit-NG, presumably because private
browsing for cookies is implemented there.
It also adds a test to at least check whether local storage is isolated from
non-private tabs. I tried writing a test which ensures nothing lands on the hard
disk, but due to QTBUG-52121 this might not happen at all:
https://bugreports.qt.io/browse/QTBUG-52121
Turns out QWebEngineSettings.globalSettings() only sets things on the default
profile. We now get everything from the default profile settings, but set it on
both the default and the private profile.
Fixes#2638
(cherry picked from commit b11a4388cd10b6ff2fd917fca689ebdc50d581ae)
If we don't wait here, we might end up running the subsequent commands (like
:command-history-prev) on the old window while it's still closing, causing an
exception at least on AppVeyor:
Traceback (most recent call last):
File "C:\projects\qutebrowser\qutebrowser\app.py", line 110, in <lambda>
target_arg=target_arg))
File "C:\projects\qutebrowser\qutebrowser\app.py", line 265, in process_pos_args
win_id = mainwindow.get_window(via_ipc, force_tab=True)
File "C:\projects\qutebrowser\qutebrowser\mainwindow\mainwindow.py", line 89, in get_window
window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
RuntimeError: wrapped C/C++ object of type MainWindow has been deleted