Commit Graph

54122 Commits

Author SHA1 Message Date
Timothy Flynn
2c096486a4 LibWeb: Extract changing an attribute to its own method
This will be needed outside of this the method to set an existing
attribute, so do not inline this implementation.
2023-09-02 01:46:37 +03:30
Tim Ledbetter
889e6ab43d find: Add the -empty option
This predicate returns true for empty regular files or directories.
2023-09-01 23:48:44 +02:00
Liav A
db2701f2e2 Ports: Add libwebp
This library includes webp converter to other formats as well and could
be used as reference implementation for performance improvements.
2023-09-01 23:01:34 +02:00
Tim Ledbetter
64bb5652a1 find: Add the -newer, -anewer and -cnewer options
These return true if the last modification time, last access time or
creation time of a file is greater than the given reference file.

If the `-L` option is in use and the given reference file is a
symbolic link then the timestamp of the file pointed to by the
symbolic link will be used.
2023-09-01 21:19:22 +02:00
Bastiaan van der Plaat
57a1d99cf4 LibWeb: Fix DOMMatrix Gfx::Matrix row/column ordering
The matrix used in the spec is column-major but Gfx::Matrix4x4 is
row-major so we need to transpose the values. This will fix internal
operations on that matrix. Because we also transposed the readonly
matrix property getters the matrix is again transposed when reading
so the JavaScript world only sees a column-major matrix.
2023-09-01 20:58:13 +02:00
Bastiaan van der Plaat
b4ae719664 LibWeb: Add DOMPoint matrixTransform and DOMMatrix transformPoint 2023-09-01 20:58:13 +02:00
Bastiaan van der Plaat
38bc8836d6 LibWeb: Remove exceptions from DOMPoint because allocate is unfailable 2023-09-01 20:58:13 +02:00
kleines Filmröllchen
271bfa63f3 LibAudio: Fix uncommon 16-bit block size symbol
This was a silly typo :^)
2023-09-01 20:04:55 +02:00
Andrew Kaster
1cd3826ad6 Userland+Tests: Don't use MAP_FILE when mmap-ing
MAP_FILE is not in POSIX, and is simply in most LibCs as a "default"
mode. Our own LibC defines it as 0, meaning "no flags". It is also not
defined in some OS's, such as Haiku. Let's be more portable and not use
the unnecessary flag.
2023-09-01 19:50:35 +02:00
Nathan Ell
f642b54b5e Ports/dos2unix: Update to 7.5.1
Version 7.5.1 fixes a problem of converting a symbolic link target that
is on another filesystem, and updates Chinese and Serbian translations.
2023-09-01 15:03:13 +02:00
Andreas Kling
ef9b6c25fa LibWeb: Consolidate consecutive inlines in a single anonymous flex item
Before this change, we were creating a new anonymous flex item for every
inline-level child of a flex container, even when we had a sequence of
inline-level children.

The fix here is to simply keep putting things in the last child of the
flex container, if that child is already an anonymous flex item.
2023-09-01 12:45:38 +02:00
Andreas Kling
d54cd23615 LibWeb: Never blockify HTML <br> elements
This is a bit iffy, but since <br> elements can't be implemented in
"just CSS" today, we should also exclude them from the blockification
algorithm. This is important, since <br> is expected to always have
inline-like behavior.
2023-09-01 12:45:38 +02:00
kleines Filmröllchen
a7c770268f Userland: Migrate to String in notification system 2023-09-01 12:06:08 +02:00
Ali Caglayan
f46b393d2d Toolchain: Add Toolchain/nix-profiles/ to .gitignore
Let users save their nix develop derivation in a profile by ignoring
this specific folder. It encourages the following workflow:

```
nix develop Toolchain/ --profile Toolchain/nix-profiles/dev
```

Which stops the dev enviornment being collected in the nix store. Later
devs can come back and do:

```
nix develop Toolchain/nix-profiles/dev
```

To continue where they left off, without having to download everything
from nixpkgs again.
2023-09-01 11:52:04 +02:00
Ali Caglayan
0124d731ce Toolchain: Remove xlibswrapper and add python3 to serenity.nix
xlibswrapper is removed from `Toolchain/serenity.nix` as it is a
wrapper package and has been deprecated. We don't use it in the build
anyway.

This fixes #19286

During the build, python3 is required so we add `python3` as a build
dependency.
2023-09-01 11:52:04 +02:00
Ali Caglayan
47e0ea8e42 Toolchain: Add nix flake
Add a nix flake to `Toolchain/` that wraps the existing nix derivation
`Toolchain/serenity.nix`. This also comes with a lockfile making the nix
developer enviornment setup more reproducible.

We also update the documentation for "other builds" to mention the
flake.
2023-09-01 11:52:04 +02:00
Andrew Kaster
4641af7873 AK: Always use our assertion failure method, and add backtrace to it
On platforms that support it, enable using ``<execinfo.h>`` to get
backtrace(3) to dump a backtrace on assertion failure. This should make
debugging things like WebContent crashes in Lagom much easier.
2023-09-01 11:50:47 +02:00
circl
3056ff6b11 LibWeb: Add presentational hints to the canvas element
There is only one, width/height -> aspect-ratio. This brings us
very slightly closer to spec and triggers a re-layout after
updating these values from JavaScript, which wasn't the case
before.
2023-09-01 10:43:37 +01:00
circl
22220cf116 LibWeb: Bring parsing of width/height attributes in canvas up to spec 2023-09-01 10:43:37 +01:00
Andrew Kaster
e6b8c2bd59 LibCore: Don't print class_name() from EventReceiver::stop_timer()
If stop_timer() is called from ~EventReceiver(), then the virtual
functions will end up calling the overload from the base class. As
EventReceiver::class_name() is pure virtual, this calls
__cxa_pure_virtual and crashes. We should not be calling virtual
functions from the destructor, and especially not pure virtual ones.

This "fixes" a crash in Piano, but the root cause of the problem is
still unfixed.
2023-09-01 11:19:18 +02:00
Zaggy1024
50bb785306 Tests/LibWeb: Add a test for clipping text with CSS clip 2023-09-01 09:40:14 +02:00
Zaggy1024
709767cc4b LibWeb: Don't convert to floating point in CSS::EdgeRect 2023-09-01 09:40:14 +02:00
Zaggy1024
9d4a1ac2b3 LibWeb: Apply CSS clip property to an element as well as its children
d06d4eb made the `clip` property apply to children of an absolute-
positioned element, but caused it not to be applied to the element the
property was applied to directly.

To fix this, apply the clip in new `before_paint()` and `after_paint()`
functions. Doing so keeps painter state from leaking from `paint()`,
but still allows subclasses of `PaintableBox` clip their contents
correctly without repeating the application of the clip rectangle.
2023-09-01 09:40:14 +02:00
Andreas Kling
2e45306d42 Ladybird: Update set of User-Agent spoofs to current versions 2023-09-01 09:16:55 +02:00
Sebastian Zaha
8dcb7c29ad Meta: Port recent build changes to gn build
This ports the following commits:

e26ead0995
5c5a00dd3a
2023-09-01 09:00:03 +02:00
Jonatan Klemets
0adda642a6 LibWeb: Fix int parsing in Element::tab_index
We now have functions for parsing integers in a spec-compliant way. This
patch replaces the `to_int` call with a call to the spec-compliant
`Web::HTML::parse_integer` function.
2023-08-31 22:27:48 +01:00
Jonatan Klemets
acd46b5974 LibWeb: Fix int parsing in Document::shared_declarative_refresh_steps
We now have functions for parsing integers in a spec-compliant way. This
patch replaces the `to_uint` call with a call to the spec-compliant
`Web::HTML::parse_non_negative_integer` function.
2023-08-31 22:27:48 +01:00
Andrew Kaster
088af86c90 LibWeb: Implement Navigable::target_name() 2023-08-31 22:23:39 +01:00
Aliaksandr Kalenik
a482166087 LibWeb: Bring html element height calculation closer to the spec
Previously we always set the height of the HTML element equal to the
viewport height but now this will only happen in quirks mode as it is
intended. Otherwise the html element height will be computed as auto.
2023-08-31 21:43:58 +02:00
Shannon Booth
6e9aeccf90 LibWeb: Implement releaseLock interface for ReadableStreamBYOBReader 2023-08-31 19:28:56 +02:00
Shannon Booth
b06d80e6fd LibWeb: Implement ReadableStreamBYOBReaderRelease Streams AO 2023-08-31 19:28:56 +02:00
Shannon Booth
8ce4f5597c LibWeb: Implement ReadableStreamBYOBReaderErrorReadIntoRequests AO 2023-08-31 19:28:56 +02:00
Shannon Booth
e08072ac2b LibWeb: Explicitly clear read requests for default stream reader
Expecting the list to be cleared from the move() is quite strange and
not particularly clear. Explicitly clear the requests instead.
2023-08-31 19:28:56 +02:00
Shannon Booth
c279d514e9 LibWeb: Implement ReadableStreamBYOBReader constructor 2023-08-31 19:28:56 +02:00
Timothy Flynn
2418a033d4 Ladbird: Remove LibSQL dependency from Ladybird's WebContent
It is not used in WebContent or any of its dependencies.
2023-08-31 19:19:45 +02:00
Timothy Flynn
e26ead0995 Ladybird+LibWebView: Move creation of the SQL client to LibWebView
This lets us remove the direct dependency from Ladybird to LibSQL.
2023-08-31 19:19:45 +02:00
Timothy Flynn
5c5a00dd3a Ladybird+LibWebView: Move CookieJar, Database, and History to LibWebView
These classes are used as-is in all chromes. Move them to LibWebView so
that non-Serenity chromes don't have to awkwardly reach into its headers
and sources.
2023-08-31 19:19:45 +02:00
Xexxa
7d313ff83d Base: Add more emoji
🙈 - U+1F648 SEE-NO-EVIL MONKEY
🙉 - U+1F649 HEAR-NO-EVIL MONKEY
🙊 - U+1F64A SPEAK-NO-EVIL MONKEY
🚉 - U+1F689 STATION
🛩️ - U+1F6E9 SMALL AIRPLANE
🛫 - U+1F6EB AIRPLANE DEPARTURE
🛬 - U+1F6EC AIRPLANE ARRIVAL
2023-08-31 11:16:44 -04:00
Bastiaan van der Plaat
43f81f1d0c Ladybird: Remove save button from settings dialog
Save new tab page value on change when valid and
show red error border when URL is not valid
2023-08-31 15:46:21 +02:00
Bastiaan van der Plaat
9510df6eab Ladybird: Move new_tab_page along to set_new_tab_page 2023-08-31 15:46:21 +02:00
Timothy Flynn
f7adc3320d Meta: Replace Lagom's LibWebView setup with LibWebView's CMakeLists.txt
This lets us add new sources to LibWebView in a single location.
2023-08-31 06:33:04 -04:00
Timothy Flynn
8d66b9ea3f Ladybird: Hook up console history into the AppKit console 2023-08-31 12:20:10 +02:00
Timothy Flynn
204a6f9241 Ladybird+LibWebView: Move console history tracking to ConsoleClient
This will allow other chromes to make use of history in their console
implementations.
2023-08-31 12:20:10 +02:00
Liav A
ed315dd950 Kernel: Move m_uid and m_gid from the Device class to SlavePTY
No other device needs to store the UID/GID of the process that created
them, so only store these values within the SlavePTY class.
2023-08-31 11:59:18 +02:00
Karol Kosek
8d81b08f6d Mail: Simplify reading message headers by issuing ENVELOPE items
`BODY[HEADER.FIELDS (...)]` gives us a part of a message that we have to
parse ourselves. Looking at the FIXME, we didn't do much good job doing
it, so let's better replace it with much simpler and probably preferred
way (FETCH command has ALL and FULL macro types that also include it.)

The tradeoff is that we get more data than we use currently (CC, BCC,
unparsed date format, message id, etc.).

Additionally this commit will try to decode 'encoded-words' in sender
names, because they are here more common.
2023-08-31 11:53:34 +02:00
Karol Kosek
1e282762a7 Mail: Allow sorting columns 2023-08-31 11:53:34 +02:00
Karol Kosek
ea70b96cf8 Mail: Use set_activates_on_selection and on_activation callback
Preparation for a sortable mailbox. Otherwise the model would resort
itself and select mail again forever.

Arrow keys will no longer load mail automatically, now you also need to
hit Enter.
2023-08-31 11:53:34 +02:00
Karol Kosek
59968c97f0 Mail: Make Date the first column 2023-08-31 11:53:34 +02:00
Karol Kosek
392fcc0ce6 Mail: Get message date using INTERNALDATE
Parsing mail headers and its date format is a rather tedious task,
especially if you want to support the obsolete syntax, so let's ask the
server to do it for us!

This will convert the date to our local time and display it in a
sortable and fixed-width format "%Y-%m-%d %H:%M:%S".
2023-08-31 11:53:34 +02:00
Karol Kosek
0132c30eda Mail: Fetch mails with their sequence number
The FETCH response doesn't have return the sequence in order, or at very
least one of my mail providers doesn't do it.
2023-08-31 11:53:34 +02:00