Commit graph

58278 commits

Author SHA1 Message Date
Andreas Kling b2bc57ff89 LibWeb: Remove unused LineBox::absolute_rect() and related things 2024-01-20 18:26:14 +01:00
Aliaksandr Kalenik 271c9d1ae9 LibWeb: Use platform's OpenGL in WebGL when it is available
This change makes WebGL to use LibGL only in SerenityOS, and the
platform's OpenGL driver in Ladybird if it is available.

This is implemented by introducing wrapper class between WebGL and
OpenGL calls. This way it will also be possible to provide more
complete support in Ladybird even if we don't yet have all needed
calls implemented in LibGL.

For now, the wrapper class makes all GL calls virtual. However, we
can get rid of this and implement it at compile time in case of
performance problems.
2024-01-20 18:21:56 +01:00
Aliaksandr Kalenik c6289fad49 LibWeb: Make sure painter's context is active before executing commands
In the upcoming changes, the AccelGfx context will be used for WebGL, so
we can no longer assume that the WebContent process has a single global
context.
2024-01-20 18:21:56 +01:00
Aliaksandr Kalenik aac439edb1 LibAccelGfx: Add method to make context active
In the upcoming changes, the AccelGfx context will be used for WebGL, so
we can no longer assume that the WebContent process has a single global
context.
2024-01-20 18:21:56 +01:00
Bastian Neumann 7cd489d6aa LibWeb: Remove early continue in size parsing
Step 5 of parsing was always skipped because step 4 continues.

Running step 5 causes some of the denominators to be 0 and causes
divide by zero error in CSSPixelFraction.

SVG Image with height of 0 will cause divide by zero error when
calculating intrinsic aspect ratio of SVGDecoderImageData.

We also get a divide by zero error in AlignContent::SpaceBetween of the
FlexFormatingContext.

During auto track stretching in GridFormatingContext there is a
possibility for count_of_auto_max_sizing_tracks to stay 0.
2024-01-20 15:22:25 +01:00
Bastiaan van der Plaat e2bc606eeb LibWeb: Add MouseEvent JavaScript constructor 2024-01-20 08:57:37 +01:00
Bastiaan van der Plaat 9aadc6c8c9 LibWeb: Add missing EventModifierInit fields and getModifierState 2024-01-20 08:57:37 +01:00
Bastiaan van der Plaat ba8704243e LibWeb: Add short type to IDL generator 2024-01-20 08:57:37 +01:00
Aliaksandr Kalenik 02d5ed44cb LibWeb: Stub Range::get_client_rects()
Fixes "Application error: a client-side exception has occurred (see
the browser console for more information)." on https://kotlinlang.org/
2024-01-20 08:56:52 +01:00
Nico Weber a0462f495c LibPDF+MacPDF: Clip text, and add a debug option for disabling it 2024-01-20 08:56:03 +01:00
Nico Weber 90fdf738a1 LibPDF: Alphabetize clip_ fields in RenderingPreferences
No behavior change.
2024-01-20 08:56:03 +01:00
Nico Weber 66f8259a0b LibPDF: Move ClipRAII to .h file
No behavior change.
2024-01-20 08:56:03 +01:00
Bastiaan van der Plaat a681429dff LibWeb: Remove DOM element deprecated_get_attribute() 2024-01-19 13:12:54 -07:00
Bastiaan van der Plaat c477f90df7 LibWeb: Remove DOM element deprecated_tag_name() 2024-01-19 13:12:54 -07:00
Kemal Zebari 02d8aaa2e8 nohup: Use return code 127 for errors caught by serenity_main()
For any errors that occur during the runtime of nohup, POSIX uses
a 127 return code.
2024-01-19 12:16:56 -07:00
Sam Atkins 8bb459e0ec HackStudio: Remove unused spawn.h include 2024-01-19 12:16:21 -07:00
Sam Atkins ae297e4405 HackStudio: Use Core::Process API to run template post-create programs 2024-01-19 12:16:21 -07:00
Sam Atkins 5205634ed4 HackStudio: Use Core::Process API to check for make 2024-01-19 12:16:21 -07:00
Sam Atkins 071f7fd818 LibCore+JSSpecCompiler: Add option for Process::spawn() to use spawnp()
Add a boolean to ProcessSpawnOptions, `search_for_executable_in_path`,
which when true, calls into posix_spawnp() instead of posix_spawn().
This defaults to false to maintain the existing behavior.

The `path` field is renamed to `executable` because having two fields
refer to "path" and mean different things seemed unnecessarily
confusing.
2024-01-19 12:16:21 -07:00
Bastiaan van der Plaat 48983a43b1 LibWeb: Add basic input range user interactivity 2024-01-19 19:36:28 +01:00
Bastiaan van der Plaat ad07397c2d LibWeb: Return input range default value when invalid value 2024-01-19 19:36:28 +01:00
Bastiaan van der Plaat c45ba50349 LibWeb: Refactor input color internal element updates to separate method 2024-01-19 19:36:28 +01:00
Bastiaan van der Plaat 5ba8a5ba13 LibWeb: Fix bug where input range thumb is not centered 2024-01-19 19:36:28 +01:00
Mr.UNIX 2440a2f83f TerminalSettings: Port to GML Compiler 2024-01-19 17:05:53 +01:00
Mr.UNIX f6c32ea45e GMLCompiler: Add enum initializer for background_role 2024-01-19 17:05:53 +01:00
Mr.UNIX 64e79a618b GMLCompiler: Add enum initializer for orientation 2024-01-19 17:05:53 +01:00
Mr.UNIX 0a1a081d8a GMLCompiler: Add OpacitySlider header to class file mappings 2024-01-19 17:05:53 +01:00
Mr.UNIX 3b73064497 TerminalSettings: Split TerminalSettingsWidget into different files 2024-01-19 17:05:53 +01:00
Sanil ca2aaaeac2 KeyboardSettings: Port to GML compiler 2024-01-19 17:03:30 +01:00
Lucas CHOLLET c2c7365494 LibGfx/TIFF: Accept images with a single strip and no RowsPerStrip tag
This tag is required by the specification, but some encoders (at least
Krita) don't write it for images with a single strip.

The test file was generated by opening deflate.tiff in Krita and saving
it with the DEFLATE compression.
2024-01-19 14:13:44 +01:00
Lucas CHOLLET 284e785053 LibGfx/TIFF: Accept the PixarDeflate compression tag
I would have liked to avoid adding a deprecated tag but this is the one
currently in use in Krita.
2024-01-19 14:13:44 +01:00
kleines Filmröllchen 3afbf66295 LoginServer: Use new GML compiler 2024-01-19 10:50:15 +00:00
kleines Filmröllchen 8ee014a437 CertificateSettings: Use new GML compiler 2024-01-19 10:50:15 +00:00
kleines Filmröllchen 63687c46ff CalendarSettings: Use new GML compiler 2024-01-19 10:50:15 +00:00
kleines Filmröllchen 14a99bb22d Calendar: Use new GML compiler 2024-01-19 10:50:15 +00:00
kleines Filmröllchen 15a539a5b0 Calculator: Use new GML compiler 2024-01-19 10:50:15 +00:00
kleines Filmröllchen 182126dfda BrowserSettings: Use new GML compiler 2024-01-19 10:50:15 +00:00
kleines Filmröllchen 6f554af9c5 Run: Use new GML compiler 2024-01-19 10:50:15 +00:00
Andrew Kaster 05ea3d6be0 headless-browser: Navigate after attaching new callbacks for ref tests 2024-01-19 11:47:59 +01:00
Andrew Kaster 1358fe85b0 LibWeb: Add option to TemporaryExecutionContext to prepare for callbacks
In the cases where spec authors have us directly interact with promises
in a task source context, we need to prepare the backup settings object
stack as well as push an actual execution context to the JS VM.
2024-01-19 11:47:59 +01:00
Andrew Kaster 2cd93e6b58 LibWeb: Pump the task queue when spinning until a goal condition
This prevents goal conditions that rely on tasks that are currently in
flight on the task queue (or were just submitted) from blocking the
event loop until an IPC event fires to kick the native event loop.
2024-01-19 11:47:59 +01:00
Andrew Kaster 7d2635355d LibWeb: Respect the trusted state of input events when submitting forms
This involves passing the UserNavigationInvolvement from each form
associated element that triggers a submit through to the methods that
perform the actual navigation. While here, refactor HTMLFormElement to
use the new Bindings::NavigationHistoryBehavior enum.
2024-01-19 11:47:59 +01:00
Andrew Kaster a5e1364938 LibWeb: Respect the trusted state of input events when clicking links 2024-01-19 11:47:59 +01:00
Andrew Kaster 32fe7db69f LibWeb: Make UIEvents from the chrome the only default trusted Events 2024-01-19 11:47:59 +01:00
Andrew Kaster 567bb0f6a2 LibWeb: Implement user navigation involvement helper for MouseEvents 2024-01-19 11:47:59 +01:00
Andrew Kaster aef5932235 LibJS: Add method to VM to clear the execution context stack
This is needed for the spin the event loop AO in LibWeb
2024-01-19 11:47:59 +01:00
Andrew Kaster 682a6d5882 Tests: Add tests for navigation.navigate() 2024-01-19 11:47:59 +01:00
Andrew Kaster 19e802d09c LibWeb: Remove invalid assertion in API method tracker promotion AO 2024-01-19 11:47:59 +01:00
Andrew Kaster 4f088aff3d LibWeb: Implement synchronous session history steps 2024-01-19 11:47:59 +01:00
Andrew Kaster d6d1485720 LibWeb: Bring destroy the child navigable comments closer to spec 2024-01-19 11:47:59 +01:00