Commit Graph

44028 Commits

Author SHA1 Message Date
Thomas Queiroz
7c82713ecb test-test262: Use HashMap::try_ensure_capacity 2022-12-10 14:29:46 +01:00
Thomas Queiroz
eacfcac932 LibWeb: Use HashMap::try_ensure_capacity in StyleComputer 2022-12-10 14:29:46 +01:00
Thomas Queiroz
6debd967ba Lagom/CodeGenerators: Use HashMap::try_ensure_capacity 2022-12-10 14:29:46 +01:00
Andreas Kling
a3a5d2b27d SpaceAnalyzer: Consolidate the node context menus
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! :^)
2022-12-10 14:28:38 +01:00
Andreas Kling
49f5767789 LibGUI+WindowServer: Add "visible" state to GUI actions
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! :^)
2022-12-10 14:28:38 +01:00
Snow
df7c0eacd4 TextEditor: Fix commenting shortcut <Ctrl-/>
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.
2022-12-10 14:04:51 +01:00
Tim Schumacher
b0af53749d Meta: Switch to the Lagom directory before building fuzzers
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.
2022-12-10 14:03:46 +01:00
DragonAlex98
b8706729ba LibGUI: Disable corresponding Scrollbar button when reaching min or max 2022-12-10 14:03:27 +01:00
Andreas Oppebøen
4b12def5d8 LibWeb: Use start-of-line in hit test of position directly to the left
This fixes a bug where selecting from the left within a line would
begin the selection from the right, as pointed out by @AtkinsSJ in
https://github.com/SerenityOS/serenity/pull/16245#pullrequestreview-1197595820
2022-12-10 13:19:49 +01:00
Andreas Oppebøen
9cab5059f8 LibWeb: Use correct end-of-fragment node index for HitTestResult
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.
2022-12-10 13:19:49 +01:00
thankyouverycool
31f4ec66c5 Magnifier: Add a manual to Help menu and propagate construction errors 2022-12-10 13:15:35 +01:00
thankyouverycool
5e96ad0345 Magnifier: Standardize File menu
File->Quit should appear as the final item in its menu
2022-12-10 13:15:35 +01:00
thankyouverycool
0c2f36966c WindowServer: Update checked state of m_window_menu_always_on_top_item
when setting it programmatically.
2022-12-10 13:15:35 +01:00
thankyouverycool
f8e0bcbedf Magnifier: Remove always_on_top_action
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.
2022-12-10 13:15:35 +01:00
Sergey Lisov
18af8be0e6 Kernel: Set EFLAGS/RFLAGS to a known-good value on signal entry 2022-12-10 13:11:49 +01:00
Lucas CHOLLET
839c1a574d CI: Add a check to report git merge commit 2022-12-10 12:07:06 +00:00
Tim Schumacher
f93c7fbb5e LibCompress: Port GzipDecompressor to Core::Stream 2022-12-10 12:05:55 +00:00
Tim Schumacher
4e7da96d58 LibCore: Add a wrapper for adapting Core::Stream to AK::InputStream 2022-12-10 12:05:55 +00:00
Tim Schumacher
35bcdefdf7 AK: Add Byte accessors for BigEndian and LittleEndian 2022-12-10 12:05:55 +00:00
Sam Atkins
56422e37e0 LibWeb: Allow creating Lengths from CSSPixels 2022-12-10 12:03:19 +00:00
Sam Atkins
8a5c50f59d LibWeb: Use ceilf() instead of ceil() for float values 2022-12-10 12:03:19 +00:00
Sam Atkins
d3476c28ba LibWeb+WebContent+headless-browser: Remove PaintContext::scroll_offset()
Nobody uses this. They get the scroll_offset from the BlockContainer
instead.
2022-12-10 12:03:19 +00:00
Sam Atkins
3c7bd5a317 LibWeb+WebContent+headless-browser: Use CSSPixels for PageClient events
...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:
2022-12-10 12:03:19 +00:00
Sam Atkins
045aa8530c LibWeb: Rename some variables to avoid shadowing 2022-12-10 12:03:19 +00:00
Sam Atkins
8dfeb67f8c LibWeb+WebContent+headless-browser: Make Page aware of the display scale
For now, we just report it as "1" everywhere.

Replaced `screen_rect()` with `web_exposed_screen_area()` from the spec.
2022-12-10 12:03:19 +00:00
Arda Cinar
6361584d4a KeyboardSettings: Disable "activate keymap" button if keymap is active 2022-12-10 12:00:30 +00:00
Andrew Kaster
0e90b0921e Meta: Use absolute paths in Meta/analyze-qemu-coverage.sh
This is a bit easier to read in the output when running locally, and a
bit better script hygiene overall.
2022-12-10 11:51:16 +00:00
Andrew Kaster
8356677868 CMake: Force-link clang_rt.profile.a to LibC when building with coverage
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 :^).
2022-12-10 11:51:16 +00:00
Andrew Kaster
bee31d2f90 Base: Add extra sync to run-tests-and-shutdown.sh
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.
2022-12-10 11:51:16 +00:00
Tim Schumacher
8940f2da7f LibCore: Use Core::Stream for ProcessStatisticsReader 2022-12-10 11:49:24 +00:00
Karol Kosek
e338a0656d LibWeb: Remove unused StyleProperties::length_or_fallback function 2022-12-10 11:46:12 +00:00
Karol Kosek
586a7dca88 LibWeb: Support special border width identifiers
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
2022-12-10 11:46:12 +00:00
Linus Groh
ff5882291f LibJS: Rename same_value_non_{numeric => number}() and handle BigInts
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.
2022-12-10 11:35:20 +00:00
Linus Groh
78895984e9 LibJS: Add spec comments to Value::invoke_internal() 2022-12-10 11:23:23 +00:00
Linus Groh
14e5003ece LibJS: Add spec comments to is_less_than() 2022-12-10 11:23:23 +00:00
Linus Groh
f1d8a64510 LibJS: Add spec comments to is_strictly_equal() 2022-12-10 11:23:23 +00:00
Linus Groh
abf1ba89cd LibJS: Add spec comments to same_value_non_numeric() 2022-12-10 11:23:23 +00:00
Linus Groh
625ad4192f LibJS: Add spec comments to same_value_zero() 2022-12-10 11:23:23 +00:00
Linus Groh
44a243cae4 LibJS: Add spec comments to same_value() 2022-12-10 11:23:23 +00:00
Linus Groh
c892b1c2b6 LibJS: Add spec comments to ordinary_has_instance() 2022-12-10 11:23:23 +00:00
Linus Groh
0b35c24c9c LibJS: Add spec comments to instance_of() 2022-12-10 11:23:23 +00:00
Linus Groh
d74ce90e74 LibJS: Add spec comments to exp{,_double}() 2022-12-10 11:23:23 +00:00
Linus Groh
eb4ea557f1 LibJS: Add spec comments to mod() 2022-12-10 11:23:23 +00:00
Linus Groh
dc747b3dd4 LibJS: Add spec comments to div() 2022-12-10 11:23:23 +00:00
Linus Groh
f0f476079b LibJS: Add spec comments to mul() 2022-12-10 11:23:23 +00:00
Linus Groh
51cdf2cdef LibJS: Add spec comments to sub() 2022-12-10 11:23:23 +00:00
Linus Groh
d5359164b1 LibJS: Add spec comments to add() 2022-12-10 11:23:23 +00:00
Linus Groh
e27ef63217 LibJS: Add spec comments to unsigned_right_shift() 2022-12-10 11:23:23 +00:00
Linus Groh
b66f9a8718 LibJS: Add spec comments to right_shift() 2022-12-10 11:23:23 +00:00
Linus Groh
8aa19a8a60 LibJS: Add spec comments to left_shift() 2022-12-10 11:23:23 +00:00