Recent changes in the completion highlighter mandate that
config.val.colors.completion.match be changed from a QssColor to a
QtColor. However, the latter accepts fewer formats. To avoid breaking
configs, this allows QtColors to be specified using all the same formats
as QssColors, excluding gradients.
I separated the QssColor and QtColor tests as the previous approach of
generating the tests made adding tests for QtColor more complicated.
While working on this I discovered that Qt's css parser is potentially
broken around parsing hsv percentages and filed
https://bugreports.qt.io/browse/QTBUG-70897.
For consistency, I made our parser similarly broken.
You can show the bug in qutebrowser right now by noting that the
following have different effects:
```
set colors.completion.odd.bg 'hsv(100%, 100%, 100%)'
set colors.completion.odd.bg 'hsv(358, 255, 255)'
```
Since Qt 5.11.2, various crash logs like this popped up after clicking a
<select> element:
Traceback (most recent call last):
File ".../browser/mouse.py", line 239, in eventFilter
return self._handlers[evtype](event)
File ".../browser/mouse.py", line 121, in _handle_mouse_press
self._mousepress_insertmode_cb)
File ".../browser/webengine/webenginetab.py", line 624, in find_at_pos
assert pos.x() >= 0
AssertionError
This is probably caused by https://codereview.qt-project.org/#/c/193908/ in
some way...
We call search.clear() a lot, even before the stylesheet JS was initialized.
After we've done a search, we can be sure that it is inited, and we only need
to hide the scrollbar there.