Instead of having two separate context menus and popping up either the
"file" or "directory" one depending on the selected node, we now have a
single context menu and update it (before popping it up) to show the
context-appropriate actions.
This is achieved by simply updating the visibility of the actions.
This takes care of one TODO! :^)
This patch adds a visibility state to GUI::Action. All actions default
to being visible. When invisible, they do not show up in toolbars on
menus (and importantly, they don't occupy any space).
This can be used to hide/show context-sensitive actions dynamically
without rebuilding menus and toolbars.
Thanks to Tim Slater for assuming that action visibility was a thing,
which gave me a reason to implement it! :^)
When you select a text area in "bottom-up" way (e.g. from line 10
to line 5), then type the shortcut, the text editor will not
comment those text for you.
Normalize the text range can easily fix this minor bug.
This confused quite a number of people in the past, and it is still
slightly annoying to always switch the directory when testing both the
OS and the fuzzer build. Instead, let's just switch to the correct
directory automatically.
The indexes are into the _node_, not in the fragment, so when a node is
split into multiple fragments, simply taking the length of the fragment
is incorrect. This patch corrects this mistake.
This action was originally added so that Magnifier's window would
always be on top by default, but it's a redundant menu item and wasn't
actually setting itself at start-up. Instead, rely on the same menu
item provided to all Modeless windows by default for a more consistent
UX, and set the option after show() so it takes effect.
...and also for hit testing, which is involved in most of them.
Much of this is temporary conversions and other awkwardness, which
should resolve itself as the rest of LibWeb is converted to these new
types. Hopefully. :thousandyakstare:
This used to be in place until 671712cae6.
I had commented on that PR that "yeah should be good to remove". Turns
out that's not the case. A future patch to the clang driver might make
this obsolete :^).
This shouldn't be necessary but reproducing the odd corrupted profile
data from the nightly Azure runs is proving tricky locally. Hopefully
this will mitigate the issue.
Previously identifiers were resolved to zero length. This could be seen
when a border declaration doesn't have specified width (e.g. `border:
solid`), as the initial border width is 'medium'.
The spec doesn't specify what the identifiers should really resolve to,
but it gives us some example values and that's what I've used here. :^)
Spec link: https://www.w3.org/TR/css-backgrounds-3/#border-width
This is an editorial change in the ECMA-262 spec.
See: https://github.com/tc39/ecma262/commit/f660b14
Note that the explicit check for zero sign equality is no longer needed
as of b0d6399, which removed the ability of Crypto::SignedBigInteger to
represent negative zero.