Commit graph

55608 commits

Author SHA1 Message Date
Shannon Booth e9670862a0 AK: Simplify "cannot have a username/password/port"
This is an editorial change in the URL spec, see:

https://github.com/whatwg/url/commit/f78785
2023-10-26 11:11:41 +02:00
lanmonster e5c9d7ce26 Calendar: Add inputs to change event end date/time 2023-10-26 11:10:23 +02:00
lanmonster a7c3d39bab Calendar: Add end date/time to events 2023-10-26 11:10:23 +02:00
lanmonster 4984faa108 Calendar: Rename m_date_time to m_start_date_time
This is in preparation to add m_end_date_time
2023-10-26 11:10:23 +02:00
lanmonster a4fcec6815 Calendar: Rename input variables
These were named foo_combo, when in reality there more spinboxes than
comboboxes. Change to foo_input to accomodate whatever type of input
they may be.
2023-10-26 11:10:23 +02:00
lanmonster edee914093 Calendar: Update day range when the month changes
Previously it was possible to create an event on Feb 31(!)
2023-10-26 11:10:23 +02:00
lanmonster 97cc5b2da4 Calendar: Use GML for AddEventDialog 2023-10-26 11:10:23 +02:00
Adam Harald Jørgensen 1a6affc64b LibGUI: Reify new child when handling child creation in FileSystemMode
This ensures that new files added after the setup of the
FileSystemModel are also are watched.
2023-10-26 11:09:24 +02:00
Adam Harald Jørgensen d1da5b1f0d LibGUI: Reify children of root when invalidating in FileSystemModel
This ensures that the children of root also get watched
2023-10-26 11:09:24 +02:00
Adam Harald Jørgensen 1ab318b391 LibGUI: Add ability to watch file Nodes when traversing them
This makes it possible to also capture changes to files, not just
directories. We only need to watch for metadata changes on files
because child created/deleted is not possible with nodes other than
directories, and deletion will be captured by the file's parent
2023-10-26 11:09:24 +02:00
Adam Harald Jørgensen 4d3c06ffe3 LibGUI: Fetch data on a Node before traversing it, instead of after
Before this it wouldn't be possible to make decisions in
Node::traverse_if_needed based on the Node data because it would be
invalid.
2023-10-26 11:09:24 +02:00
Adam Harald Jørgensen 60f9aa5cb8 LibGUI: Handle metadata changes in FileSystemModel 2023-10-26 11:09:24 +02:00
Adam Harald Jørgensen cbfa363b2b LibGUI: Preserve correct child order in FileSystemModel
When handling child creation in FileSystemModel, the new child should
be inserted such that the children still follow the correct order of
being grouped by directory-and-file and then sorted alphabetically,
instead of just being appended at the end.
2023-10-26 11:09:24 +02:00
Nico Weber c25538b2e3 LibGfx/ICC: Implement conversion to PCS for AToB*Tags using mAB
...as long as the mAB tag doesn't have A curves and a CLUT.

With this, we can convert images that use AToB* tags to the profile
connection space (and then from there to, say, sRGB), if the AToB* tag
uses the mAB format.

We can't yet do this if the mAB tag has A curves or a CLUT.

We can't convert back from PCS to this space yet.

We don't yet handle AToB* tags that use mft1 or mft2 instead of mAB.
2023-10-26 11:07:43 +02:00
Nico Weber 15bddf5de3 LibGfx/ICC: Gently rewrite CurveTagData::evaluate()
One less redundant expression. No behavior change.
2023-10-26 11:07:43 +02:00
Timothy Flynn a39eebeb74 LibWebView: Reject cookies whose domain is on the Public Suffix List 2023-10-26 11:06:49 +02:00
Timothy Flynn 9f9e5c0f55 LibWebView: Add an API to query if a host is on the Public Suffix List 2023-10-26 11:06:49 +02:00
Timothy Flynn d4615c47a4 LibWebView: Generate the Public Suffix List as a compile-time array
No need for this to be a vector on the heap.
2023-10-26 11:06:49 +02:00
Timothy Flynn ae3e0d97b5 LibWebView: Wrap retrieving public suffix data in a helper
This lets outside callers use this API but primarily is to fix the build
when the ENABLE_PUBLIC_SUFFIX_DOWNLOAD CMake option is disabled.
2023-10-26 11:06:49 +02:00
Tim Ledbetter b4296e1c9b LibPDF: Don't use unsanitized values in error messages
Previously, constructing error messages with unsanitized input could
fail because error message strings must be UTF-8.
2023-10-26 11:05:32 +02:00
Nico Weber f8bf9c6506 LibPDF: Sketch out DeviceN color spaces a bit
Documents using them now show render-time diagnostics instead
of asserting that number of parameters passed to a color don't
match whatever number of channels the previously-set color space
had.

Fixes two asserts on the `-n 500` 0000.zip test set.
2023-10-26 11:05:00 +02:00
Aliaksandr Kalenik f915aa70cd LibWeb/Painting: Introduce PaintingCommandExecutor
Decoupling painting command executor from RecordingPainter allows to
introduce painters other than CPU Gfx::Painter :)
2023-10-26 11:02:04 +02:00
Timothy Flynn 1682e46df9 Ladybird+Meta: Make the AppKit chrome the default on macOS
The Qt chrome is still available and may be enabled with CMake.
2023-10-26 11:00:56 +02:00
Nico Weber 4549d6cf1b LibPDF: Add a FIXME comment to the inline image data skipping path 2023-10-26 10:59:45 +02:00
Nico Weber 2878af5968 LibPDF: Sketch out Lab color space
Same as other recent color spaces: Enough to make us not assert,
but not enough to actually produce color.

Fixes 2 asserts on the `-n 500` 0000.zip pdfa dataset.
2023-10-26 10:59:45 +02:00
Tim Ledbetter 1a4df4ffe7 LibGfx/ICC: Avoid overflow when constructing NamedColor2TagData 2023-10-26 10:59:22 +02:00
Nico Weber a65d8ff2ea LibPDF: Tolerate page rotation being an indirect object
Needed e.g. for 0000196.pdf in 0000.zip in the pdfa dataset.
2023-10-26 10:58:45 +02:00
Nico Weber 8b806183f6 LibPDF: Tolerate indirect objects in various image dict values
0000101.pdf from 0000.zip from the pdfa dataset has /Height set to
an indirect object that contains an int.

Make that work, and make sure various other similar places getting
values of the image dict also resolve indirect references.
2023-10-26 10:58:45 +02:00
Nico Weber 5dd7639386 LibPDF: Tolerate indirect references in Type0 /W array
Makes e.g. 0000236.pdf in 0000.zip in the pdfa dataset work.
2023-10-26 10:58:45 +02:00
Nico Weber b928fadba7 LibPDF: Swap int and array branches in outline item reading
No intended behavior change.

It does have the effect that indirect object references now go down
the array path instead of the number path. They still fall over there,
but now that's easy to fix.
2023-10-26 10:58:45 +02:00
Nico Weber 208a058eab LibPDF: Tolerate integer outline item colors
0000296.pdf from 0000.zip from the pdfa dataset contains
`/C [0 0 0]` (as opposed to `/C [0.0 0.0 0.0]`). Make that work.
(It's fine per spec.)
2023-10-26 10:58:45 +02:00
Dan Klishch c2c37de201 JSSpecCompiler: Support Cpp::StringLiteral in C++ AST converter 2023-10-26 10:57:03 +02:00
Dan Klishch d7b4dc2a6a JSSpecCompiler: Support Cpp::BinaryExpression in C++ AST converter 2023-10-26 10:57:03 +02:00
Aliaksandr Kalenik 9f1e0209e8 Tests/LibWeb: Add missing test-shadow.html
Missing input file for e48b3b39cf
2023-10-26 10:56:30 +02:00
Tim Ledbetter 7096ea82f9 LibGfx: Use count_leading_zeroes to calculate nearest power of 2
This removes the possibility of an infinite loop.
2023-10-26 08:39:26 +02:00
Tim Ledbetter 6e4c97a328 LibGfx/WOFF: Return error if numTables is 0
This is consistent with WOFF2.
2023-10-26 08:39:26 +02:00
Tim Ledbetter 52f78d07b8 LibGfx/WOFF2: Ensure numTables is within expected range
An error is now returned if `numTables` is zero or greater than 4096.
While this isn't explicitly mentioned in the specification, subsequent
calculations will be incorrect if the value falls outside this range.
2023-10-26 08:39:26 +02:00
Aliaksandr Kalenik e48b3b39cf Tests/LibWeb: Add ref test for text-shadow
Based on Base/res/html/misc/text-shadow.html demo page.
2023-10-26 08:38:16 +02:00
Aliaksandr Kalenik 437442719d LibWeb: Fix coordinate translation for PaintTextShadow command
Fixes regression introduced in 4318bcf447

`shadow_bounding_rect` is used on bitmap allocated for shadow and is
not supposed to be in coordinate system of stacking context. Same for
`text_rect`.

Fixes https://github.com/SerenityOS/serenity/issues/21587
2023-10-26 08:38:16 +02:00
Aliaksandr Kalenik 58f8068853 LibWeb: Handle fit-content in calculate_max_content_contribution in GFC
Fixes https://github.com/SerenityOS/serenity/issues/21569
2023-10-26 08:37:42 +02:00
Aliaksandr Kalenik 04a4ffaa3d LibWeb/Painting: Remove Save and Restore commands in RecordingPainter
Removing State and Restore reduces painting commands count by 30-50%
on an average website.

Due to this change, it was also necessary to replace AddClipRect with
SetClipRect command.
2023-10-26 07:51:32 +02:00
networkException 0388766531 LibWeb: Set module map entry before invoking callbacks
This patch fixes the value of a module map entry being wrong in the
callbacks invoked in the set call. Previously we would set the value
in only after invoking the callbacks, leading to crashes when a
callback implementation would rightfully assume the value to be set
already.

Resolves #20994
2023-10-25 21:29:21 +02:00
Bastiaan van der Plaat 169d24ae2e LibWeb: Add comments and missing items of various IDL files 2023-10-25 19:45:41 +02:00
Bastiaan van der Plaat fc46def2f5 LibWeb: Reorder and add missing HTML elements IDL items 2023-10-25 19:45:41 +02:00
Nico Weber 54cdcd0d06 LibPDF: Reject non-hexdigits in hex string with error
...instead of VERIFY()ing input data.

I haven't seen this in the wild, but since I'm here anyways,
might as well fix this.
2023-10-25 10:44:26 +02:00
Nico Weber 4675700057 LibPDF: Reject unterminated literal strings with an error
0000459.pdf in 0000.zip in the pdfa dataset contains this as the
very first object:

```
1 0 obj
<<
/Creator (Developer 2000)
/CreatorDate (
/Author (Oracle Reports)
/Producer (Oracle PDF driver)
/Title (2021_06_29 Tutoritzacions APTES.PDF)
>>
endobj
```

The `/CreatorDate` value string is unterminated.

Before, we'd assert when trying to check if the first object is
a linearization dict.

Now, we never read the first object (an error during the linearization
dict reading is treated as "file is not linearized") unless we try
to print the document's metadata -- and there we now show an error
instead of asserting.
2023-10-25 10:44:26 +02:00
Nico Weber c0f3f1674c LibPDF: Make string literal parsing fallible
...and make running out of data after a \ an error instead of silently
returning an empty string.
2023-10-25 10:44:26 +02:00
Aliaksandr Kalenik 4318bcf447 LibWeb: Record painting commands in coordinates of stacking context
By storing painting command coordinates relative to the nearest
stacking context we can get rid of the Translate command.

Additionally, this allows us to easily check if the bounding
rectangles of the commands cover or intersect within a stacking
context. This should be useful if we decide to optimize by avoiding
the execution of commands that will be overpainted by the results of
subsequent commands.
2023-10-25 05:53:36 +02:00
Nico Weber 311cc7d9b9 LibPDF: Implement two SeparationColorSpace methods
Actually using separation color spaces still doesn't work, but we
now no longer assert on them when they're used.

Fixes 2 crashes on the `-n 500` 0000.zip pdfa dataset.
2023-10-25 05:52:47 +02:00
Tim Ledbetter 2311e28d63 LibGfx/BMPLoader: Mitigate potential overflows when decoding bitmap DIB 2023-10-25 05:52:29 +02:00