Commit graph

55568 commits

Author SHA1 Message Date
Edwin Rijkee
8388fe51b5 Kernel: Add a framebuffer driver for 3Dfx Voodoo 3
A bit old but a relatively uncomplicated device capable of outputting
1920x1080 video with 32-bit color. Tested with a Voodoo 3 3000 16MB
PCI card. Resolution switching from DisplaySettings also works.

If the requested mode contains timing information, it is used directly.
Otherwise, display timing values are selected from the EDID. First the
detailed timings are checked, and then standard and established
timings for which there is a matching DMT mode. The driver does not
(yet) read the actual EDID, so the generic EDID in DisplayConnector now
includes a set of common display modes to make this work.

The driver should also be compatible with the Voodoo Banshee, 4 and 5
but I don't have these cards to test this with. The PCI IDs of these
cards are included as a commented line in case someone wants to give it
a try.
2023-10-16 01:25:45 +02:00
Liav A
77441079dd Kernel/HID: Introduce initial USB mouse support 2023-10-15 22:56:30 +02:00
Liav A
430e987078 Kernel/USB: Don't invoke async callback if transfer data size is 0
We can't do anything valuable with such "transfer" so just discard it.
2023-10-15 22:56:30 +02:00
Liav A
e7c1148ec6 Kernel/USB: Handle NAK correctly in a transfer status bits 2023-10-15 22:56:30 +02:00
Liav A
62c2c9df69 Kernel/HID: Add methods to attach and detach standalone devices 2023-10-15 22:56:30 +02:00
Liav A
83835c7256 Kernel/HID: Add boot option to disable PS2 Mouse 2023-10-15 22:56:30 +02:00
MacDue
95bf6ddb8e LibGfx: Fix serializing Gfx::Bitmaps
a396bb0 removed the palette field but did not update the allocation size
in `Bitmap::serialize_to_byte_buffer()`. This led to a few crashes (I
noticed this from a drag/drop crash in the file manager).

Fixes #21434
2023-10-15 20:34:29 +02:00
MacDue
f0cd7adaf8 LibGUI: Fix FileSystemModel/FileManager after aeee98b
Previously, the null state of m_root_path was use to (subtly) mark the
parent of the root. The empty path is always replaced with "." so after
aeee98b there was no "parent of root" node. This lead to the file
manager crashing when opened.
2023-10-15 21:34:15 +03:30
Nico Weber
6f783929dd LibPDF: Implement support for CFF charset format 2
I haven't seen this being used in the wild (yet), but it's easy
to implement, and with this we support all charset formats.

So we can now mention if we see a format we don't know about.
2023-10-15 15:27:15 +02:00
Nico Weber
5b915fb15c LibPDF: Add more spec comments to parse_charset() 2023-10-15 15:27:15 +02:00
Nico Weber
49275c4b17 LibPDF: Don't overflow SIDs in type 1 charset parsing
first_sid has type SID (aka u16), so don't store it in an u8.

This fixes (among other things) page 24 on the PDF 1.7 spec.
2023-10-15 15:27:15 +02:00
Jelle Raaijmakers
403d3bbdaf LibSoftGPU: Optimize GPU::Vertex lists
On my machine, benchmarking 3DFileViewer revealed ~2.5% of CPU time
spent in `Vector<GPU::Vertex>::try_append`. By carefully managing list
capacities, we can remove this method from profiles altogether.
2023-10-15 12:14:07 +02:00
Jelle Raaijmakers
c978891dda LibGL: Optimize appends in gl_vertex
Optimize a very hot function by always performing unchecked appends.
When benchmarking 3DFileViewer on my machine, this takes the time spent
in `gl_vertex` down from ~8% to ~2%.
2023-10-15 12:14:07 +02:00
Jelle Raaijmakers
edcb6176ce LibGL+Lib*GPU: Set model view and projection matrices separately
LibSoftGPU used to calculate the normal transformation based on the
model view transformation for every primitive, because that's when we
sent over the matrix. By making LibGL a bit smarter and only update the
matrices when they could have changed, we only need to calculate the
normal transformation once on every matrix update.

When viewing `Tuba.obj` in 3DFileViewer, this brings the percentage of
time spent in `FloatMatrix4x4::inverse()` down from 15% to 0%. :^)
2023-10-15 12:14:07 +02:00
Jelle Raaijmakers
126adfc392 3DFileViewer: Set timer to 15ms instead of 20ms
This approaches 60FPS and feels a bit smoother.
2023-10-15 12:14:07 +02:00
Jelle Raaijmakers
77c16d2ae7 3DFileViewer: Show correct framerate
We were confusing the time spent rendering with the time spent rendering
_and_ waiting for the next frame, which is important since we render
frames on a timer.
2023-10-15 12:14:07 +02:00
kleines Filmröllchen
40fb41322e Kernel: Fix SipHash aarch64 boot regression
Moving the DeviceManagement initialization, which is only needed by
userland in the first place, to after interrupt and time management
initialization (like other things that require randomness) allows the
SipHash initialization to access good randomness without problems.

Note: There currently is another, unrelated boot problem on aarch64,
which is not caused by SipHash as far as we know. This commit therefore
only fixes the SipHash regression.
2023-10-15 09:40:04 +02:00
Nico Weber
23d6e9f577 LibPDF: Implement CFF built-in charsets ISOAdobe, Expert, Expert Subset 2023-10-15 09:33:34 +02:00
Nico Weber
8060957d8d LibPDF: Use Appendix A instead of Appendix C for standard names
From "10 String INDEX":

"Further space saving is obtained by allocating commonly occurring
strings to predefined SIDs. These strings, known as the standard
strings, describe all the names used in the ISOAdobe and Expert
character sets along with a few other strings common to Type 1 fonts. A
complete list of standard strings is given in Appendix A.  The client
program will contain an array of standard strings with nStoStrings
elements. Thus, the standard strings take SIDs in the range 0 to
(nStaStrings-1)."

And "13 Charsets" says that charsets store SIDs.

Fixes all

    "Couldn't find string for SID $n, going with space"

messages when going through the encoding pages (page 1010 and
thereabouts) in the PDF 1.7 spec.
2023-10-15 09:33:34 +02:00
Nico Weber
aba787a441 LibPDF: Implement reading of CFF String Index
Only really useful for reading SIDs in the Top DICT (copyright
text etc), which we currently don't do.

I haven't seen a difference from looking things up in the string
table. The only real effect from the commit that I need is that
it pulls a local resolve() labmda into a real function
resolve_sid(), which I want to call in a future commit.

But it makes things more spec-compliant, and if we ever want to
read SIDs in metadata in the future, now we can.
2023-10-15 09:33:34 +02:00
Tim Ledbetter
9e3ee0e2b5 LibGfx/ILBM: Avoid buffer overrun when reading header chunk 2023-10-15 08:37:27 +02:00
Cubic Love
f2b7224d93 GamesSettings+LibCards: Make 'Red' the default card back
The red back is a more suitable default as it's a traditional vanilla
design and red is one of Serenity's brand colors.
2023-10-15 07:25:20 +02:00
Cubic Love
bd5296d6bb Base: Rename and update card backs
CobyCat has very kindly remastered their card backs to fit the new card
back dimensions of 72 x 102px with 3px rounded corners. This gives
cards 3px of inner border which looks much neater.

Also, all card names have been capitalized and the suffix '-deck'
removed to improve their appearance in GamesSettings.

Co-authored-by: Tom L <lemtom@users.noreply.github.com>
2023-10-15 07:25:20 +02:00
Timothy Flynn
94e4d59a08 LibWeb: Remove use of UnicodeData header from DOM::Element
The UnicodeData header cannot be included by any file other than .cpp
files within LibUnicode itself. Outside users cannot assume the header
will exist, as it will not be generated if the CMake option to do so is
disabled (ENABLE_UNICODE_DATABASE_DOWNLOAD).
2023-10-15 07:23:30 +02:00
Kenneth Myhra
4f0af7b4de Ports: Update mc to 4.8.30 2023-10-15 07:16:04 +02:00
Kenneth Myhra
44865a8482 Ports: Update glib to 2.78.0 2023-10-15 07:16:04 +02:00
Kenneth Myhra
12bdac92e5 Ports: Update curl to 8.4.0 2023-10-15 07:16:04 +02:00
Sam Atkins
c9c99b3c42 LibWeb: Produce resolved transform value according to spec algorithm
We now produce a `matrix3d()` value when appropriate.

Some sites (such as gsap.com) request the resolved style for `transform`
when there's no viewport paintable, but the element itself does already
have a stacking context. This fixes crashes in that case, because we now
do not access the stacking context at all.

We also do not wrap the result as a StyleValueList any more. The
returned StyleValue is only serialized and exposed to JS, so making it a
StyleValueList has no effect.
2023-10-15 07:14:39 +02:00
Sam Atkins
c65d6964ea LibWeb: Update layout if we lack a node when getting computed style
As noted, there are two situations where an element will have no layout
node here:
1. The element is invisible in a way that it generates no layout node.
2. We haven't built the layout yet.

This protects against the second case, which would otherwise incorrectly
send us down the path of looking directly at the computed style.
2023-10-15 07:14:39 +02:00
Sam Atkins
642ad80960 LibWeb: Make CSS Transformation struct a proper class
Move it out of ComputedValues.h into its own files, and take the
transformation-to-matrix code from StackingContext.
2023-10-15 07:14:39 +02:00
Nico Weber
3c49d0dad3 LibPDF: Add a CFF_DEBUG toggle
I'd like to put some debug prints behind this soon.

No behavior change.
2023-10-15 07:14:29 +02:00
MacDue
11f7db8f34 LibWeb: Fix null optional dereference in Node::name_or_description()
Regression/typo from aeee98b, this lead to a crash when opening the DOM
inspector.
2023-10-14 18:36:32 -04:00
Luke Wilde
7467307377 LibWeb: Use "POST" instead of "post" for POST resources in navigables
HTTP methods are case sensitive and the Fetch layer treats it as such.
For example, http_redirect_fetch case sensitively checks if the method
is "POST" to change the method to "GET" and nullify the body.
9d7e217566/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp (L1125-L1135)

Fixes https://github.com/SerenityOS/serenity/issues/21347
2023-10-14 14:26:31 -04:00
Sönke Holz
9d7e217566 LibELF: Handle TLSDESC relocations in .rela.plt for GNU ld
GNU ld for some reason might put R_*_TLSDESC relocations in .rela.plt.
2023-10-14 19:16:22 +02:00
Ali Mohammad Pur
0937d88869 LibWeb: Remove more DeprecatedString null state remnants 2023-10-14 09:12:41 -04:00
Ali Mohammad Pur
988c6568a9 LibWeb: Remove Element::set_attribute(name, value?)
That API came from a mistake in the IDL compiler, where reflected
nullable attributes would try to call set_attribute(name, null).
This commit fixes the mistake in the IDL generator, and removes the
meaningless API.
2023-10-14 09:12:41 -04:00
Timothy Flynn
d2c7e1ea7d Browser: Sanitize user-provided URLs with LibWebView 2023-10-13 13:37:11 -04:00
Timothy Flynn
aa5cd24c90 Ladybird/AppKit: Sanitize user-provided URLs with LibWebView 2023-10-13 13:37:11 -04:00
Timothy Flynn
f023e37de7 Ladybird/Qt: Sanitize user-provided URLs with LibWebView 2023-10-13 13:37:11 -04:00
Timothy Flynn
191e20d639 LibWebView: Add a helper to sanitize a user-provided URL
We currently implement several forms of this method across the Ladybird
chromes. As such, we see commits to add special URL handling that only
affects a single chrome. Instead, let's consolidate all special handling
in a single location for all chromes to make use of.

This method can handle resolving file:// URLs, falling back to a search
engine query, and validation against the Public Suffix List. These cases
were gathered from the various chromes.
2023-10-13 13:37:11 -04:00
Tim Ledbetter
54a28afc13 LibIMAP: Stop parsing immediately on error
This makes the parser more resilient to invalid IMAP messages.

Usages of `Optional` have also been removed where the empty case is
equivalent to an empty object.
2023-10-13 11:12:18 -06:00
Tim Ledbetter
29c477598c LibIMAP: Rename Parser::try_consume() to consume_if() 2023-10-13 11:12:18 -06:00
Gabriel Nava Marino
f97c4d20fa Base: Add 201 Hangul syllables to font Katica Regular 10
Adds most commonly used Hangul syllables in range AC00–D7AF
https://www.unicode.org/charts/PDF/UAC00.pdf

U+AC00 U+AC01 U+AC04 U+AC1C U+AC70 U+AC74 U+AC83 U+AC8C U+ACA9
U+ACB0 U+ACBD U+ACC1 U+ACC4 U+ACE0 U+ACF5 U+ACFC U+AD00 U+AD50
U+AD6C U+AD6D U+ACE0 U+AD8C U+ADDC U+ADF8 U+ADFC U+AE08 U+AE30
U+B098 U+B0B4 U+B108 U+B140 U+B150 U+B155 U+B178 U+B204 U+B290
U+B294 U+B298 U+B2C8 U+B2E4 U+B2E8 U+B2EC U+B2F9 U+B300 U+B3C4
U+B3C5 U+B3D9 U+B418 U+B41C U+B420 U+B450 U+B4E0 U+B4E4 U+B4EC
U+B4F1 U+B530 U+B5A4 U+B610 U+B73B U+B77C U+B78C U+B791 U+B798
U+B7EC U+B825 U+B85C U+B85D U+B958 U+B974 U+B978 U+B97C U+B9AC
U+B9C8 U+B9CC U+B9D0 U+BA70 U+BA85 U+BAA8 U+BAA9 U+BB34 U+BB38
U+BB3C U+BBF8 U+BBFC U+BC0F U+BC14 U+BC18 U+BC1B U+BC1C U+BC29
U+BC30 U+BC95 U+BCC4 U+BCF4 U+BCF8 U+BD80 U+BD84 U+BE0C U+BE44
U+C0AC U+C0B0 U+C0C1 U+C0DD U+C11C U+C120 U+C131 U+C138 U+C18C
U+C18D U+C218 U+C2DC U+C2DD U+C2E0 U+C2E4 U+C2EC U+C2F6 U+C544
U+C548 U+C57C U+C57D U+C591 U+C5B4 U+C5B8 U+C5C4 U+C5C5 U+C5C6
U+C5D0 U+C5D8 U+C5EC U+C5F0 U+C600 U+C601 U+C608 U+C624 U+C640
U+C644 U+C694 U+C6B0 U+C6D0 U+C704 U+C720 U+C721 U+C73C U+C740
U+C744 U+C74C U+C758 U+C774 U+C778 U+C77C U+C788 U+C790 U+C791
U+C7A5 U+C7AC U+C801 U+C804 U+C815 U+C81C U+C870 U+C874 U+C885
U+C8C4 U+C8FC U+C900 U+C911 U+C99D U+C9C0 U+C9C1 U+C9C4 U+C9C8
U+CC28 U+CC38 U+CC9C U+CCB4 U+CD08 U+CE58 U+D07C U+D0C0 U+D0DC
U+D130 U+D1B5 U+D3B8 U+D3C9 U+D3EC U+D45C U+D544 U+D558 U+D559
U+D55C U+D560 U+D568 U+D569 U+D56D U+D574 U+D589 U+D604 U+D615
U+D638 U+D63C U+D654 U+D65C U+D68C U+D788

These cover about 78% of syllables in the top 1000 most common
Korean words as well as 94% of syllables in the Universal
Declaration of Human Rights.
2023-10-13 11:02:28 -06:00
Andrew Kaster
ffc75a575b Meta: Port 759e07579e to gn build 2023-10-13 10:54:18 -06:00
Ali Mohammad Pur
aeee98b3a1 AK+Everywhere: Remove the null state of DeprecatedString
This commit removes DeprecatedString's "null" state, and replaces all
its users with one of the following:
- A normal, empty DeprecatedString
- Optional<DeprecatedString>

Note that null states of DeprecatedFlyString/StringView/etc are *not*
affected by this commit. However, DeprecatedString::empty() is now
considered equal to a null StringView.
2023-10-13 18:33:21 +03:30
Shannon Booth
daf6d8173c AK: Remove uneeded deprecated_string_percent_encode
This function was an artifact from when we were using DeprecatedString
much more in URL class before porting to Optional<String>, where we no
longer rely on the null state of DeprecatedString.
2023-10-13 18:33:21 +03:30
Ali Mohammad Pur
b20f1da166 Lagom/IDLGenerators: Remove the unused generate_to_deprecated_string fn
There are no more users of this, so remove it and rename
`generate_to_new_string` to `generate_to_string` while we're at it.
2023-10-13 18:33:21 +03:30
Nico Weber
2249e79630 LibPDF: Add two FIXMEs 2023-10-13 07:53:27 +02:00
Nico Weber
d451197d3d LibPDF: Add spec comments to CFF 2023-10-13 07:53:27 +02:00
Timothy Flynn
9d31fc3ea3 Ladybird: Implement content zooming in the AppKit chrome
This lets the user zoom in and out on a web page using the View menu or
keyboard shortcuts. This does not implement zooming with ctrl+scroll.

In the future, it'd be nice to embed the zoom level display inside the
location toolbar. But to do that, we will need to invent our own custom
search field and all of the UI classes (controller, cell, etc.) to draw
the field. So for now, this places the zoom level display to the right
of the location toolbar.
2023-10-13 07:51:53 +02:00