Commit graph

5936 commits

Author SHA1 Message Date
sideshowbarker
3ba7c53668 LibWeb: Ensure spaces get added where expected within accessible names
This change implements the https://w3c.github.io/accname/#comp_append
step in the “Accessible Name and Description Computation” spec — so that
when an accessible name is computed from multiple sources in a document
subtree, the parts of the computed text are joined together with spaces.

Otherwise without this change, in accessible names computed from
multiple sources in a document subtree, the parts of the computed text
are unexpectedly run together, with no spaces between the parts.
2024-11-11 14:56:46 -07:00
Andreas Kling
b3b97d2049 LibWeb: Unregister network requests *after* invoking callbacks
This ensures that the network request actually gets unreffed and deleted
at the right time.
2024-11-11 21:40:56 +01:00
Andreas Kling
b397a0d535 LibWeb: Make Document::m_intersection_observers a weak mapping
These registrations are not meant to keep the observers alive.
This fixes a handful of world leaks on Speedometer.
2024-11-11 21:40:56 +01:00
Andreas Kling
6a6618f5ea LibJS: Add RawNonnullGCPtr<T>
This is really just a type alias for NonnullGCPtr<T>, but it provides
a way to have non-owning non-visited NonnullGCPtr<T> without getting
yelled at by the Clang plugin for catching GC errors.
2024-11-11 21:40:56 +01:00
Andreas Kling
e240084437 LibJS: Use correct cell address for HeapFunction captures in GC dumps
We were previously dumping the address of the cell pointer instead of
the address of the cell itself. This was causing mysterious orphans
in GC dumps, and it took me way too long to figure this out.
2024-11-11 21:40:56 +01:00
Aliaksandr Kalenik
7efc89e92b LibWeb: Remove usage of containing_block to get available height in GFC
There is no need to do containing block lookup when this value is
provided in argument of ::run()
2024-11-11 20:20:39 +01:00
Aliaksandr Kalenik
a073e35562 LibWeb: Delete unused functions in FormattingContext 2024-11-11 20:20:39 +01:00
Aliaksandr Kalenik
a8c1d12e84 LibWeb: Fix percentage insets resolution for grid items
compute_inset() was incorrectly retrieving the containing block size
because containing_block() is unaware of grid areas that form a
containing block for grid items but do not exist in the layout tree.
With this change, we explicitly pass the containing block into
compute_inset(), allowing it to correctly provide the containing block
sizes for grid items.
2024-11-11 20:20:39 +01:00
Aliaksandr Kalenik
07d8ddb5fa LibWeb: Reduce usage of Node::containing_block() in BFC
Explicitly pass containing block width in
resolve_vertical_box_model_metrics() instead of doing containing block
box lookup.

This is a part of refactoring towards removing containing_block() usage
that will allow us introduce partial layout.
2024-11-11 20:20:39 +01:00
Sam Atkins
20a78a42d6 LibWeb/DOM: Combine implementations of scope-matching a selectors string 2024-11-11 20:19:41 +01:00
Luke Wilde
bd4c29322c LibJS: Allow division after IdentifierNames in optional chain
The following syntax is valid:
```js
e?.example / 1.2
```

Previously, the `/` would be treated as a unterminated regex literal,
because it was calling the regular `consume` instead of
`consume_and_allow_division`.

This is what is done when parsing IdentifierNames in
parse_secondary_expression when a period is encountered.

Allows us to parse clients-main-[hash].js on https://ubereats.com/
2024-11-11 20:19:26 +01:00
Pavel Shliak
1bdc41faa1 LibWeb: Reduce SelectItemOption struct from 40 to 32 bytes
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-11-11 17:06:20 +01:00
Pavel Shliak
566870b2bd LibWeb: Reduce PaintTextShadow struct from 72 to 64 bytes 2024-11-11 17:06:20 +01:00
Pavel Shliak
d1c7c0ba19 LibWeb: Reduce DrawGlyphRun struct from 56 to 48 bytes 2024-11-11 17:06:20 +01:00
Pavel Shliak
ddc3017464 LibWeb: Reduce ShadowData struct from 80 to 72 bytes 2024-11-11 17:06:20 +01:00
Timothy Flynn
0ff91a5273 LibWebView+Services+UI: Move process helpers to LibWebView 2024-11-11 07:35:43 -05:00
Timothy Flynn
a14937c45e LibWebView+Services+UI: Move the Web plugins to LibWebView 2024-11-11 07:35:43 -05:00
Timothy Flynn
9e1f001ffe LibWebView+Services+UI: Move the EventLoop implementations to LibWebView
We currently compile the Qt event loop files multiple times, for every
target which wants to use them. This patch moves these to LibWebView as
a central location to avoid this.
2024-11-11 07:35:43 -05:00
Aliaksandr Kalenik
7460f0c6e2 LibGfx: Delete unused DisjointRectSet
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
2024-11-11 02:46:35 +01:00
Aliaksandr Kalenik
1e05457cd1 LibGfx: Delete unused paint styles
These are no longer used after we've switched to using Skia.
2024-11-11 02:46:35 +01:00
Gingeh
6862d33e7c LibWeb: Don't crash from clipping grid spans 2024-11-11 00:57:10 +01:00
Pavel Shliak
b4e5afa8d5 LibGfx: Remove OffsetPaintStyle 2024-11-11 00:07:11 +01:00
rmg-x
9ee7d4d90a LibWeb: Add builtin Float16Array type and remove related FIXME 2024-11-10 14:48:20 -07:00
rmg-x
ea20545853 LibJS: Add support for Float16Array
Implements TC39 stage three proposal for Float16Arrays:
https://tc39.es/proposal-float16array
2024-11-10 14:48:20 -07:00
Shannon Booth
653c8f231d LibWeb: Implement HTMLElement.innerText setter 2024-11-10 21:31:30 +01:00
Shannon Booth
a1a740bb3e LibWeb: Make rendered_text_fragment return a DocumentFragment
This closer matches the spec and is needed in the implementation of the
innerText setter.
2024-11-10 21:31:30 +01:00
Aliaksandr Kalenik
dd11d48a1d LibWeb: Use available space to resolve sizes in FFC
If available space is definite it should always match the size of the
containing block. Therefore, there is no need to do containing block
node lookup.
2024-11-10 19:14:54 +01:00
Andreas Kling
5aa1d7837f LibJS: Don't leak class field initializers
We were storing these in Handle (strong GC roots) hanging off of
ECMAScriptFunctionObject which effectively turned into world leaks.
2024-11-10 19:12:59 +01:00
Andreas Kling
8c809fa5ee LibCore: Don't reserve 2 KiB of stack memory when processing event queue
The inline capacity on ThreadEventQueue::Private::queued_events caused
us to reserve (and importantly, not initialize!) 2 KiB of stack memory
when entering ThreadEventQueue::process().

This was causing any leftover pointers to GC-allocated objects within
that memory range to keep those objects alive, even when all other
references were gone.
2024-11-10 19:12:59 +01:00
Aliaksandr Kalenik
68f58b23ce LibWeb: Save Gfx::ImmutableBitmap in ApplyBitmapMask display list item
Some checks are pending
Lint Code / lint (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Push notes / build (push) Waiting to run
This allows to delete duplicated code between DisplayListPlayerSkia.cpp
and ImmutableBitmap.cpp responsible for wrapping Gfx::Bitmap in SkImage.
2024-11-10 17:20:34 +01:00
Shannon Booth
e02ca0480f LibJS: Allow unpaired surrogates in String.prototype.replace
This was resulting in a crash for the WPT test case:

https://wpt.live/xhr/send-data-string-invalid-unicode.any.html
2024-11-10 09:14:03 -05:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Andreas Kling
52b05a08c7 LibCrypto: Reduce use of ByteBuffer in AES code
Use Bytes/ReadonlyBytes more where possible.
2021-01-12 09:34:04 +01:00
Lenny Maiorani
e6f907a155 AK: Simplify constructors and conversions from nullptr_t
Problem:
- Many constructors are defined as `{}` rather than using the ` =
  default` compiler-provided constructor.
- Some types provide an implicit conversion operator from `nullptr_t`
  instead of requiring the caller to default construct. This violates
  the C++ Core Guidelines suggestion to declare single-argument
  constructors explicit
  (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit).

Solution:
- Change default constructors to use the compiler-provided default
  constructor.
- Remove implicit conversion operators from `nullptr_t` and change
  usage to enforce type consistency without conversion.
2021-01-12 09:11:45 +01:00
Nick Vella
4b3c61fad8 LibGUI: Add 'on_doubleclick' event to BreadcrumbBar. 2021-01-12 08:58:49 +01:00
Andreas Kling
127ce32d9e LibGfx: Adjust margin between window title/stripes by 1px
This makes it symmetrical with the margin between window icon/title.
2021-01-11 22:15:09 +01:00
asynts
843ebbd2c3 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-11 21:49:29 +01:00
asynts
6fa42af567 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.

The modifications in this commit were automatically made using the
following command:

    find . -name '*.h' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2021-01-11 21:49:29 +01:00
asynts
a410bb8fd5 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-11 21:49:29 +01:00
AnotherTest
510030971b LibLine: Handle history across multiple concurrent sessions better
- Store history entries as (timestamp)::(entry)\n\n
- Merge the entries together when saving to avoid loss of history
  entries

To ideally make having two concurrently open shells
(or `js` repls or whatever) not overwrite each others' history entries.
2021-01-11 21:09:36 +01:00
AnotherTest
711ced80c0 LibCore: Add line iterators to IODevice 2021-01-11 21:09:36 +01:00
Sahan Fernando
9bf76a85c8 Everywhere: Fix incorrect uses of String::format and StringBuilder::appendf
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-11 21:06:32 +01:00
Sahan Fernando
fe2b8906d4 Everywhere: Fix incorrect uses of String::format and StringBuilder::appendf
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-11 21:06:32 +01:00
Sahan Fernando
6d97b623cd Everywhere: Fix incorrect uses of String::format and StringBuilder::appendf
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
2021-01-11 21:06:32 +01:00
Nico Weber
009c753a12 Playground: Show placeholders for unregistered widgets
With this, Playground can be used to interactively edit e.g.
DisplaySettingsWindow.gml.
2021-01-11 20:12:26 +01:00
Lenny Maiorani
f99d1d3bd7 Vector: Implement find, find_if, find_first_matching in terms of AK::find*
Problem:
- The implementation of `find` is coupled to the implementation of `Vector`.
- `Vector::find` takes the predicate by value which might be expensive.

Solution:
- Decouple the implementation of `find` from `Vector` by using a
  generic `find` algorithm.
- Change the name of `find` with a predicate to `find_if` so that a
  binding reference can be used and the predicate can be forwarded to
  avoid copies.
- Change all the `find(pred)` call sites to use `find_if`.
2021-01-11 19:45:05 +01:00
Andreas Kling
04c6245fe8 LibGfx: Fail PBM decode if there isn't enough color data in image
Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29417
2021-01-11 19:24:54 +01:00
asynts
723effd051 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.Everything:
2021-01-11 11:55:47 +01:00
campital
c7fc9d185d
LibGUI: Update TextEditor after triple-click to select (#4897)
Previously, it was "relying" on the cursor blink timer to update
the visual selection.

This caused some delay after the whole line was selected by
triple-clicking specifically the last word in a line.

Now, the widget is updated after triple-clicking.
2021-01-11 11:42:06 +01:00
Andreas Kling
5dafb72370 Kernel+Profiler: Make profiling per-process and without core dumps
This patch merges the profiling functionality in the kernel with the
performance events mechanism. A profiler sample is now just another
perf event, rather than a dedicated thing.

Since perf events were already per-process, this now makes profiling
per-process as well.

Processes with perf events would already write out a perfcore.PID file
to the current directory on death, but since we may want to profile
a process and then let it continue running, recorded perf events can
now be accessed at any time via /proc/PID/perf_events.

This patch also adds information about process memory regions to the
perfcore JSON format. This removes the need to supply a core dump to
the Profiler app for symbolication, and so the "profiler coredump"
mechanism is removed entirely.

There's still a hard limit of 4MB worth of perf events per process,
so this is by no means a perfect final design, but it's a nice step
forward for both simplicity and stability.

Fixes #4848
Fixes #4849
2021-01-11 11:36:00 +01:00
Linus Groh
f369229770 LibJS: Replace all uses of to_size_t() and remove it :^)
Yay for more spec compliance! This is pretty easy as everything using
to_size_t() should just be using one of the other abstract operations we
already have implemented.
This allows us to get rid of get_length() in ArrayPrototype, which is
basically a slightly incorrect implementation of length_of_array_like(),
and then finally remove to_size_t()!
Also fixes a couple of "argument is undefined" vs "argument isn't given"
issues along the way.
2021-01-10 21:57:03 +01:00
Linus Groh
9be0b664e3 LibJS: Make length_of_array_like() take an Object rather than Value
The pseudo-code from the spec says "Assert: Type(obj) is Object.", so we
can just enforce this at compile time rather than taking it literally
and doing "ASSERT(value.is_object())".

Also fix an issue where the absence of a "length" property on the object
would cause a crash (to_number() on empty value).
2021-01-10 21:57:03 +01:00
Marcin Gasperowicz
b24ce0b5ee LibJS: Implement String.prototype.split
This adds a String.prototype.split implementation modelled after 
ECMA262 specification. 

Additionally, `Value::to_u32` was added as an implementation of
the standard `ToUint32` abstract operation.

There is a tiny kludge for when the separator is an empty string. 
Basic tests and visiting google.com prove that this is working.
2021-01-10 21:27:59 +01:00
AnotherTest
43199e5613 LibLine: Implement support for C-V<key>
This commit adds support for inserting in a "verbatim" mode where a
single uninterpreted key is appended to the buffer.
As this allows the user to input control characters, all control
characters except \n (^M) are rendered in their caret form, with
reverse video (SGR 7) applied to it.
To not break cursor movement, the concept of "masked" characters is
introduced to the StringMetrics interface, which can be mostly ignored
by the rest of the system.

It should be noted that unlike some other line editing libraries,
LibLine does _not_ render a hard tab as a tab, but rather as '^I',
which greatly simplifies cursor handling.
2021-01-10 16:58:08 +01:00
AnotherTest
44305ea214 LibVT: Respect the Negative attribute when drawing text
This makes the "reverse video" SGR actually work.
2021-01-10 16:58:08 +01:00
Andreas Kling
2f3b901f7f AK: Make MappedFile heap-allocated and ref-counted
Let's adapt this class a bit better to how it's actually being used.

Instead of having valid/invalid states and storing an error in case
it's invalid, a MappedFile is now always valid, and the factory
function that creates it will return an OSError if mapping fails.
2021-01-10 16:49:13 +01:00
Andreas Kling
70fce5c4c7 LibCore: Use OSError in get_password() return type 2021-01-10 16:48:43 +01:00
Emanuele Torre
91222a67c8 LibCore: get_password() now removes the trailing '\n' read by getline()
This avoids unintentionally adding a newline character at the end of
user passwords when they are set using passwd(1).

I also fixed these two issues:

- The return value of getline() was being saved in an `int` variable
instead of in a `ssize_t` variable; I replaced the `int` keyword with
`auto` to fix this issue.

- Prior to this patch, get_password() could potentially return
tcsetattr()'s errno instead of getline()'s errno in case of an error.
We now make sure it always returns the right errno in case of an error.
2021-01-10 16:40:05 +01:00
Andreas Kling
f152b6f7ed LibCore: Don't try to unlink stale sockets in /tmp/rpc/
This was very obviously racy and would only succeed if we already own
the socket anyway. (And if we do, we can bind to it without unlinking!)

Work towards #4876.
2021-01-10 11:25:59 +01:00
Andreas Kling
d38b9916c9 SystemServer+LibCore: Move /tmp/rpc/ directory creation to SystemServer
This doesn't solve half of the problems with /tmp/rpc, but this way we
can at least make it sticky instead of having it fully world-writable
and owned by whoever was the first to bind an RPC socket.
2021-01-10 10:34:45 +01:00
Andreas Kling
f35a723f61 Everywhere: Convert a bunch of dbgprintf() to dbgln() 2021-01-10 10:02:20 +01:00
Andreas Kling
13e8a2a671 LibVT: Don't assert if ioctl(TIOCSWINSZ) fails
This ioctl can fail if we're resizing the terminal right when the shell
inside it has exited. Instead of throwing up a crash reporter, whine a
little bit in the debug log and exit cleanly moments later.
2021-01-10 09:40:59 +01:00
Andreas Kling
e855aac1f5 LibELF: Convert many dbgprintf() to dbgln() and tweak debug macro name 2021-01-10 09:40:47 +01:00
AnotherTest
d3f51ee5c3 LibLine: It's okay to be interrupted while reading the DSR response
Fixes #4855.
2021-01-10 00:03:52 +01:00
AnotherTest
7059ca9b15 LibLine: Don't clear the displayed buffer when interrupted
Since we always restart on a new line, there's no reason to clear the
previous lines.
2021-01-10 00:03:52 +01:00
AnotherTest
9b126a2250 LibLine: Unregister signal handlers on destruction
This fixes an issue that shows up as a nice crash when "^R<enter>^C",
which is actually the event loop trying to call into a deleted object
(the search editor).
2021-01-10 00:03:52 +01:00
Tom
21e6f5176c LibCore: Harden signal handling code to be called in global destrcutors
Move some more complex globals into a Singleton, which allows it being
used from global destructors. It solves problems where some global
variables, such as HashMaps may already be deleted, triggering crashes
trying to use them.
2021-01-09 21:12:31 +01:00
Tom
8548ec357c LibCore: Allow adding/removing signal handlers while handling signals
This allows adding and removing of asynchronous signal handlers while
executing signal handlers, even if it is for the same signal that is
being handled right now.
2021-01-09 21:12:31 +01:00
asynts
938e5c7719 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.Everything:

The modifications in this commit were automatically made using the
following command:

    find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2021-01-09 21:11:09 +01:00
asynts
7235ddfd98 LibGUI: Add formatter for Widget. 2021-01-09 21:11:09 +01:00
asynts
1160817a9e AK: Add Formatter<FormatString> as helper class. 2021-01-09 21:11:09 +01:00
Andreas Kling
9a842ec419 LibC: Add explicit_bzero()
This is a variant of bzero() that is guaranteed to not get optimized
away by the compiler. Useful for clearing out sensitive data.
2021-01-09 20:04:18 +01:00
Andreas Kling
b4918bbe2f LibC: Move bzero() and bcopy() per Dr. POSIX 2021-01-09 19:56:59 +01:00
Andreas Kling
9a688af4b1 LibCore+passwd+su+Base: Add /etc/shadow to hide hashes from users :^)
This patch moves the user account password hashes from /etc/passwd,
where they were world-readable, to /etc/shadow, where only root can
access them.

The Core::Account class is extended to support both authentication
against, and modification of /etc/shadow.

The default password for "anon" as of this commit is "foo" :^)
2021-01-09 19:41:12 +01:00
Linus Groh
7b2fdd08ce LibJS: Add tests for bitwise NOT operator 2021-01-09 19:09:02 +01:00
Linus Groh
9fca86109b LibJS: Make bitwise NOT work correctly with NaN and Infinity
This was missing a "toInt32()" which returns 0 for NaN and Infinity.
From the spec:

    6.1.6.1.2 Number::bitwiseNOT ( x )

    The abstract operation Number::bitwiseNOT takes argument x (a Number).
    It performs the following steps when called:

        Let oldValue be ! ToInt32(x).
        Return the result of applying bitwise complement to oldValue.
        The mathematical value of the result is exactly representable as
        a 32-bit two's complement bit string.

Fixes #4868.
2021-01-09 19:09:02 +01:00
Linus Groh
c55cb7843a LibJS: Use INVALID some more in abstract operations 2021-01-09 19:09:02 +01:00
Andreas Kling
e08e1a89d9 LibWeb: No need to report that we encountered <svg> or <math>
These things happen, and it's not particularly noteworthy.
2021-01-09 15:22:23 +01:00
Andreas Kling
1d75e82101 LibWeb: Coalesce layouts that happen in response to style changes
Instead of doing a forced layout synchronously whenever an element's
style is changed, use a zero-timer to do the forced relayout on next
event loop iteration.

This effectively coalesces a lot of layouts and makes many pages such
as GitHub spend way less time doing redundant layout work.
2021-01-09 15:22:23 +01:00
Andreas Kling
d56f4f635a LibDebug: Convert a bunch of dbg() to dbgln() 2021-01-09 15:22:23 +01:00
Andreas Kling
0a3b834346 LibWeb: Convert a bunch of dbg() to dbgln() 2021-01-09 14:03:06 +01:00
Andreas Kling
6a19542715 LibVT+Terminal: Resize terminal when font changes
When the font is changed in the Terminal application, we now resize the
terminal window to accomodate the new font.
2021-01-09 14:03:06 +01:00
Andreas Kling
9d6198b683 Everywhere: Colour => Color
The system language is US English. :^)
2021-01-09 14:03:06 +01:00
TheMorc
d0adaf4465 LibGUI: Add set_tab_index method
This method sets the current tab index to the value specified.
2021-01-09 13:27:23 +01:00
Andreas Kling
5f364f5dc1 LibGUI: Clear the application's drag-hovered widget on drop event
When we drop something on any window, there's no longer an ongoing drag
so let's forget the drag-hovered widget.
2021-01-09 12:02:07 +01:00
Andreas Kling
9e60fc5006 LibGUI: Add visual indicators for accepted drags to view classes
All the view classes used in FileManager now indicate when they are
ready to accept a drop by showing a rounded rectangle around the item.
2021-01-09 12:02:07 +01:00
Andreas Kling
607c01fad1 LibGUI: Add visual indicator for accepted drags to BreadcrumbBar
BreadcrumbBar segments will now indicate drag acceptance with a rounded
rectangle around the accepting segment.
2021-01-09 12:02:07 +01:00
Andreas Kling
b08ed1b560 LibGUI: Make AbstractView accept drags (and delegate to model) 2021-01-09 12:02:07 +01:00
Andreas Kling
7baaa34490 LibGUI: Make SortingProxyModel proxy accepts_drag() 2021-01-09 12:02:07 +01:00
Andreas Kling
12d0d12a78 FileManager+LibGUI: Make the breadcrumb bar accept text/uri-list drags 2021-01-09 12:02:07 +01:00
Andreas Kling
67b91d51a7 WindowServer+LibGUI: Pass the set of mime types being dragged to client
Previously the client would only learn the mime type of what was being
dropped on it once the drop occurred. To enable more sophisticated
filtering of drag & drop, we now pass along the list of mime types being
dragged to the client with each MouseMove event.

(Note that MouseMove is translated to the various Drag* events in LibGUI
on the client side.)
2021-01-09 12:02:07 +01:00
Andreas Kling
3b94af2c07 LibGUI: Have widgets signal willingness to accept drops
If a widget accept()'s a "drag enter" event, that widget now becomes
the application-wide "pending drop" widget. That state is cleared if
the drag moves over another widget (or leaves the window entirely.)
2021-01-09 12:02:07 +01:00
Andreas Kling
dbd090fd95 LibCore: Don't auto-accept events that hit bubbling limit
We were using the "accept" flag on the event to break out of the
bubbling loop, but this had lasting consequences since all events that
bubbled too far came out looking as if someone had accepted them.

If an event is ignored by everyone, it should appear ignored.
2021-01-09 12:02:07 +01:00
Andreas Kling
094b47971b LibGUI: Make Widget::HitTestResult::widget a WeakPtr 2021-01-09 12:02:07 +01:00
Andreas Kling
c17fa67f51 WindowServer+LibGUI: Notify hovered window when drag&drop is cancelled
The hovered window may want to react to a drag being cancelled, even
if the drag originated in some other window.
2021-01-09 12:02:07 +01:00
Andreas Kling
9acb72e804 LibGUI: Add "drag enter" and "drag leave" events
These events allow widgets to react when a drag enters/leaves their
rectangle. The enter event carries position + mime type, while the
leave event has no information.
2021-01-09 12:02:07 +01:00
Itamar
65ffd8de69 LibCoreDump: Add 'library_containing' API to CoreDump::Reader
This API returns info about the library whose range in memory contains
a given address (similar to 'region_containing', but for libraries).
2021-01-09 10:56:04 +01:00
Itamar
399091dec3 LibELF: Fix cached sorted symbols in ELF::Image
Previously, we didn't set the 'symbol' field of SortedSymbol objects in
some code paths that populate the sorted symbol cache.
2021-01-09 10:56:04 +01:00
Itamar
a4b74cba0b Loader.so+LibELF: Do not read environment variables if AT_SECURE is set
AT_SECURE is set in the auxiliary vector when we execute setuid/setgid
programs.
In those cases, we do not want to read environment variables that
influence the logic of the dynamic loader, as they can be controlled
by the user.
2021-01-09 10:55:46 +01:00