Commit Graph

61336 Commits

Author SHA1 Message Date
Tim Ledbetter
272cd30f17 LibWeb: Add missing visit to m_labels in HTMLElement 2024-05-18 18:29:52 +02:00
Tim Ledbetter
c36ba450be LibWeb: Generate binding for HTMLObjectElement.contentWindow attribute
This only required adding the appropriate definition to the IDL file,
as `NavigableContainer` already implements the logic that we need.
2024-05-18 18:12:08 +02:00
Andreas Kling
b2e6843055 LibJS+AK: Fix integer overflow UB on (any Int32 - -2147483648)
It wasn't safe to use addition_would_overflow(a, -b) to check if
subtraction (a - b) would overflow, since it doesn't cover this case.

I don't know why we didn't have subtraction_would_overflow(), so this
patch adds it. :^)
2024-05-18 18:11:50 +02:00
Hendiadyoin1
1de475b404 LibJS: Prepare yield object before re-routing it through finally 2024-05-18 18:11:10 +02:00
Tim Ledbetter
2447a25753 LibWeb: Implement the labels attribute for all labelable elements
This returns a `NodeList` of all the labels associated with the given
element.
2024-05-18 18:09:18 +02:00
Tim Ledbetter
3dc86747f0 LibWeb: Implement the HTMLOutputElement.htmlFor attribute
This returns a DOMTokenList that reflects the `for` attribute.
2024-05-18 11:23:20 +02:00
Tim Ledbetter
acc1fa3c62 LibWeb: Generate binding for the HTMLObjectElement.form attribute
This only required adding the appropriate definition to the IDL file,
as `FormAssociatedElement` already implements the logic that we need.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
6bf22075ed LibWeb: Implement the HTMLLabelElement.form attribute
This returns the form element associated with the given label element's
control or null if the label has no control.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
5296338e7a LibWeb: Check all elements in same tree to determine labeled control
Previously, when looking for the labeled control of a label element, we
were only checking its child elements. The specification says we should
check all elements in the same tree as the label element.
2024-05-18 11:04:04 +02:00
Tim Ledbetter
fc395716e9 LibWeb: Return NonnullGCPtr<DOMTokenList> from relList getters 2024-05-18 11:03:49 +02:00
Timothy Flynn
b4af851c74 Meta: Update gcc version requirement to 13+
The project can no longer be compiled with gcc-12.
2024-05-17 15:40:07 -06:00
Timothy Flynn
688599af57 Meta: Update check for clang's major version
We require clang-17 as of 76df5ae030, but
this check was not updated.
2024-05-17 15:40:07 -06:00
Idan Horowitz
26cff62a0a Kernel: Rename Memory::PhysicalPage to Memory::PhysicalRAMPage
Since these are now only used to represent RAM pages, (and not MMIO
pages) rename them to make their purpose more obvious.
2024-05-17 15:38:28 -06:00
Idan Horowitz
827322c139 Kernel: Stop allocating physical pages for mapped MMIO regions
As MMIO is placed at fixed physical addressed, and does not need to be
backed by real RAM physical pages, there's no need to use PhysicalPage
instances to track their pages.
This results in slightly reduced allocations, but more importantly
makes MMIO addresses which end up after the normal RAM ranges work,
like 64-bit PCI BARs usually are.
2024-05-17 15:38:28 -06:00
Tim Ledbetter
d0555f3176 LibWeb: Flesh out DOMTokenList::supports() implementation
This change makes `DOMTokenList::supports()` work as expected for
`relList` attributes.
2024-05-16 20:31:23 +02:00
Kenneth Myhra
1e60b4ec40 Toolchain: Set cpu_family in meson cross files to SERENITY_ARCH 2024-05-16 10:55:16 +02:00
dgaston
55fe04a6fa Chess: Port application to GML
This commit ports the chess application to GML in order to
facilitate the addition of widgets in the future.
2024-05-16 07:41:05 +01:00
dgaston
10dbadced8 Chess: Add chess application to Chess namespace
This is required to port the application to GML.
2024-05-16 07:41:05 +01:00
Nico Weber
b6bbff5f3f LibGfx/WebPWriter: Move VP8L compression to WebPWriterLossless.{h,cpp}
* Matches how the loader is organized
* `compress_VP8L_image_data()` will grow longer when we add actual
  compression
* Maybe someone wants to write a lossy compressor one day

No behavior change.
2024-05-16 08:06:50 +02:00
Nico Weber
c0f67a0188 LibGfx/WebPWriter: Remove a copy in the animated frame writing code path
This code path now also compresses to memory once, and then writes to
the output stream.

Since the animation writer has a SeekableStream, it could compress to
the stream directly and fix up offsets later. That's more complicated
though, and keeping the animated and non-animated code paths similar
seems nice. And the drawback is just temporary higher memory use, and
the used memory is smaller than the memory needed by the input bitmap.
2024-05-16 08:06:50 +02:00
Nico Weber
0b06cbdca2 LibGfx/WebPWriter: Move frame data writing out of write_ANMF_chunk()
No behavior change. This also makes it clear that the conditional
alignment at the end can just be a VERIFY() instead of a conditional.
2024-05-16 08:06:50 +02:00
Nico Weber
768a7ea1e5 LibGfx/WebP: Split out ANMFChunk header data into ANMFChunkHeader
No behavior change.
2024-05-16 08:06:50 +02:00
Nico Weber
c183f73922 LibGfx/WebPWriter: Use write_VP8L_chunk() in animation frame writing
This code path still has a redundant copy of the compressed data
after this change, but it's less code this way.

No behavior change.
2024-05-16 08:06:50 +02:00
Nico Weber
885a3d8c5c LibGfx/WebPWriter: One fewer copy of encoded data when saving still webp
Before, we used to compress the image data to memory, then make another
copy to memory, and then write to the output stream.

Now, we compress to memory once and then write to the output stream.

No behavior change.
2024-05-16 08:06:50 +02:00
Nico Weber
33acd4e747 LibGfx/WebPWriter: Extract another align_to_two() helper 2024-05-16 08:06:50 +02:00
Nico Weber
0175fff659 LibGfx/WebPWriter: Extract compress_VP8L_image_data() function 2024-05-16 08:06:50 +02:00
Tim Ledbetter
51fc30a191 LibWeb: Implement the HTMLLinkElement.relList attribute
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
fc4e0cf10e LibWeb: Implement the HTMLFormElement.relList attribute
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
0a3e1846f0 LibWeb: Implement the HTMLAreaElement.relList attribute
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
b7fd39c2e6 LibWeb: Implement the HTMLAnchorElement.relList attribute
This returns a DOMTokenList that reflects the `rel` attribute.
2024-05-16 08:06:26 +02:00
Tim Ledbetter
63246577d2 LibWeb: Use correct type for MessageEventInit.ports
This didn't work previously because the IDL generator used the
incorrect type for some types of sequences within dictionaries.
2024-05-16 08:04:01 +02:00
Tim Ledbetter
763b7f0e0c LibWeb: Implement the HTMLOptionElement.form attribute
This returns the parent form of a HTMLOptionElement or null if the
element has no parent form.
2024-05-16 08:03:13 +02:00
Tim Ledbetter
fe7df98d7d LibWeb: Use correct IDL definition for CanvasImageData methods
It is now possible to pass an optional `ImageDataSettings` object to
the `CanvasImageData.createImageData()` and
`CanvasImageData.getImageData()` methods.
2024-05-16 08:02:59 +02:00
Andrew Kaster
28f728dfdb LibWeb: Implement FontFace.load() for url() based font sources 2024-05-16 08:02:43 +02:00
Andrew Kaster
b7526a39b0 LibWeb: Expose StyleComputer's FontLoader class publicly
We'll want to explicitly load fonts from FontFace and other Web APIs
in the future. A future refactor should also move this completely away
from StyleComputer and call it something like 'FontCache'.
2024-05-16 08:02:43 +02:00
Andrew Kaster
d76167b8a4 LibWeb: Add CSS ParsingContext constructor with a realm and URL
This is useful for when we want to parse paths relative to the current
ESO's api base url when there isn't a document, such as in a Worker
context.
2024-05-16 08:02:43 +02:00
Andrew Kaster
8872008958 LibWeb: Use correct JS_CELL name for WorkerEnvironmentSettingsObject 2024-05-16 08:02:43 +02:00
Timothy Flynn
daa9e852c9 Toolchain+CI: Remove unused TRY_USE_LOCAL_TOOLCHAIN parameter
This was used to create a .tar of the built Clang toolchain, but now we
just upload the built toolchain artifacts (same as the GNU toolchain).
2024-05-15 15:20:29 -06:00
Timothy Flynn
5e34a41f06 CI: Be a bit less paranoid about old compiler versions existing
We explicitly tell CMake what compiler to use. No need to remove older
versions, which was just one extra thing we needed to maintain.
2024-05-15 15:20:29 -06:00
Timothy Flynn
18f9efe92d CI: Explicitly install gcc-13 on CI
We're now getting errors on CI due to gcc-13 being missing. We can
probably be smarter about what packages we install, depending on the
workflow being run. But let's first unblock CI.

The error we get is a bit strange and inconsistent. Some CI runners seem
to already have gcc-13 installed. Others don't and can't find the gcc-13
package without the test Ubuntu toolchain PPA.
2024-05-15 15:20:29 -06:00
Timothy Flynn
13fa42d2e5 Meta: Port recent changes to the GN build
2a56df8ecd
5da9af435e
2024-05-15 15:20:29 -06:00
Tim Ledbetter
6290f96aa7 LibGUI: Don't crash when rendering a collapsible toolbar with no items
This prevents a crash in GML Playground that would occur when
previewing a GUI with a collapsible toolbar.
2024-05-15 08:28:24 +02:00
Nico Weber
6876c62110 Tests/TestImageWriter: Remove is_gif parameter again
This removes the somewhat awkward is_gif that got added in
2513a1b83f again.
2024-05-14 22:34:01 -06:00
Nico Weber
d70802f658 Tests/TestImageWriter: Make test_gif() not use test_roundtrip()
This allows using more detailed assertions that match the gif loader.
2024-05-14 22:34:01 -06:00
Hendiadyoin1
c8e4499b08 LibJS: Make return control flow more static
With this only `ContinuePendingUnwind` needs to dynamically check if a
scheduled return needs to go through a `finally` block, making the
interpreter loop a bit nicer
2024-05-15 04:25:14 +02:00
Hendiadyoin1
73fdd31124 LibJS: Avoid returning Completions from more Bytecode instructions 2024-05-15 04:25:14 +02:00
MacDue
99579f1f5e LibWeb: Use "valid-types" to define fill-rule in Properties.json
No behaviour change.
2024-05-14 23:01:18 +01:00
MacDue
6c9069fa5d LibWeb: Implement the SVG clip-rule attribute
This controls the fill rule used when rasterizing `<clipPath>` elements.
2024-05-14 23:01:18 +01:00
MacDue
8e00fba71d LibWeb: Correct naming in SVGPathPaintable
The DOM node is a graphics element (not a geometry element) as this
paintable was generalized (to handle things like text).

No behaviour change.
2024-05-14 23:01:18 +01:00
theonlyasdk
6da1d5eb57 Demos: Add sleep option to CatDog
Now you can put your CatDog to sleep while
you're at work :)
2024-05-14 15:45:33 -06:00