Commit Graph

29036 Commits

Author SHA1 Message Date
Adam Harald Jørgensen
491d61a2fd Shell: Add support for escaping backslash in prompt sequence 2023-10-26 22:33:38 +03:30
Adam Harald Jørgensen
050c73d301 Shell: Add support for showing custom format time in prompt with "\D{}" 2023-10-26 22:33:38 +03:30
Adam Harald Jørgensen
e40955e9c6 Shell: Add support for showing current time in prompt with "\{t|T|@}" 2023-10-26 22:33:38 +03:30
Adam Harald Jørgensen
3d42e68265 Shell: Add support for showing number of jobs in prompt with "\j" 2023-10-26 22:33:38 +03:30
Adam Harald Jørgensen
f81bc8b045 Shell: Add support for showing the history number in prompt with "\!" 2023-10-26 22:33:38 +03:30
Adam Harald Jørgensen
f597d7c730 Shell: Add command to history before running, instead of after 2023-10-26 22:33:38 +03:30
Adam Harald Jørgensen
78b3703586 Shell: Refactor Shell::prompt to use GenericLexer to read the PROMPT var 2023-10-26 22:33:38 +03:30
Ali Mohammad Pur
cc43a7ecda Shell: Add a 'in_parallel' builtin for easy concurrency 2023-10-26 11:15:57 +02:00
Ali Mohammad Pur
22d411345d LibWasm: Implement the multi-memory proposal 2023-10-26 11:15:11 +02:00
Gabriel Nava Marino
f4515aae80 Userland: Draw tooltip over glyph to show UTF-8 code point
Currently finding a particular glyph with a given code point is
a bit tedious as it requires clicking on the glyph to update the
status bar and display the glyph's name and codepoint. A more
convenient way to know where we are in the Glyph Map is by seeing
a tooltip over the glyph where the mouse is currently hovering over.
This patch adds that support by setting the Widget tooltip with the
glyph found at the current position in GlyphMapWidget::mousemove_event.
2023-10-26 11:12:49 +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
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
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
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
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