Commit graph

42299 commits

Author SHA1 Message Date
Jelle Raaijmakers
88ca72aa79 LibSoftGPU: Extract argb32_color value in rasterization
This makes it easier to correlate slow instructions in the disassembly
view of ProfileViewer.
2022-10-19 22:22:58 +02:00
Jelle Raaijmakers
681695a07a LibSoftGPU: Make alpha testing a static function
There is no need to access the Device's members for alpha testing; pass
in the required alpha function and reference value.
2022-10-19 22:22:58 +02:00
Jelle Raaijmakers
bdb2be8f9e LibGL: Remove context initialization from tests
We are either not using these defaults or they are already the
`GLContext`'s defaults to begin with.
2022-10-19 22:22:58 +02:00
Jelle Raaijmakers
4e63ce231f LibSoftGPU: Clean up Sampler imports 2022-10-19 22:22:58 +02:00
Jelle Raaijmakers
1774fde37c LibSoftGPU: Drop texel Z coordinate from Sampler
We only support 2D indexing into textures at the moment, so don't
perform any work trying to support the Z coordinate.
2022-10-19 22:22:58 +02:00
cflip
75d46e0e96 Ports: Add a ClassiCube port 2022-10-19 22:07:05 +02:00
cflip
fea43a647f Ports/libopenal: Build with SDL2 backend, and disable example programs
This patch fixes libopenal's build by disabling the alsoft-config
utility which required qt6, and disabling the example programs that were
causing compiler errors.

This also forces CMake to build with an SDL2 backend so audio can
actually be played.
2022-10-19 22:07:05 +02:00
cflip
f872d945c3 Ports/SDL2: Add null check to SerenitySDLWidget::paint_event
This was causing a crash when message boxes appeared before the window
painted anything.
2022-10-19 22:07:05 +02:00
cflip
abc0c44f0b LibGL+LibGPU+LibSoftGPU: Report maximum texture size 2022-10-19 22:07:05 +02:00
Linus Groh
04ae4b89a3 WebDriver: Fix Session::close_window() declaration order 2022-10-19 21:11:37 +02:00
Linus Groh
7cb9b85c25 WebDriver: Rename Session::{get_window_object => current_window}()
- It's not a "window object" (in the JS sense), it's a simple struct
  storing a handle and is_open property
- We usually omit 'get' for getters
- The new name makes it more clear that this is looked up using the
  m_current_window_handle as a key
2022-10-19 21:11:37 +02:00
Linus Groh
7812b3c130 WebDriver: Remove unused Session::get_window_handles()
With all the implementations being in the Session class, there should
be no reason to expose this to the outside world anyway.
2022-10-19 21:11:37 +02:00
Linus Groh
6eecdb6853 WebDriver: Condense Client handler functions a bit
These comments really aren't necessary, it's clear from the code that
they forward to Session for the actual implementation.
2022-10-19 21:11:37 +02:00
Linus Groh
24ee5a2202 WebDriver: Move GET /session/{session id}/window impl into Session 2022-10-19 21:11:37 +02:00
Linus Groh
0064d2e8c8 WebDriver: Implement POST /session/{session id}/timeouts endpoint 2022-10-19 21:11:37 +02:00
Linus Groh
5c32eacac9 WebDriver: Implement GET /session/{session id}/timeouts endpoint 2022-10-19 21:11:37 +02:00
Linus Groh
4db5f6d081 WebDriver: Use monotonic timer in Session::find() 2022-10-19 21:11:37 +02:00
Linus Groh
f0a8e3bc05 WebDriver: Replace hardcoded timeout with a TimeoutsConfiguration struct 2022-10-19 21:11:37 +02:00
Etienne Rodriguez
e5a9f030f2 LibGUI: Insert first displayed emoji on return
This enables users to insert emojis without using the mouse by searching
for it in the EmojiInputDialog and then hitting return.
2022-10-19 14:05:42 -04:00
Andreas Kling
178f0b9971 LibJS: Support non-base-10 BigInt literals in bytecode VM
Fixes 39 tests in test262 and a handful in test-js. :^)
2022-10-19 19:58:15 +02:00
Andreas Kling
29935fe943 LibJS: Support for (x in obj) iteration in bytecode VM
We were mistakenly treating these as `for (x of obj)`. By reorganizing
the code a little bit, we actually support both kinds of iteration with
less duplication. :^)

Fixes 17 tests in test262.
2022-10-19 19:03:57 +02:00
Tobias Christiansen
249350a7a3 WebDriver: Implement GET /session/{id}/element/{id}/attribute/{name} 2022-10-19 17:30:58 +02:00
Tobias Christiansen
3f5a620b5d WebContent+Friends: Add get_element_attribute IPC and plumbing 2022-10-19 17:30:58 +02:00
Aliaksandr Kalenik
dfc3a4772b LibWeb: Ignore "pointer-events: none" elements in hit_test 2022-10-19 16:11:15 +02:00
Andreas Kling
f39b6ae3c6 LibJS: Avoid expensive UTF-8/16 conversion in legacy RegExp properties
Let's not incur the cost of a synchronous conversion to UTF-8 for all
the legacy static properties after running a regular expression.

The SunSpider subtest regexp-dna goes from taking ~25 sec to ~0.7 sec
on my machine.
2022-10-19 16:10:42 +02:00
Tobias Christiansen
e1fb64abad WebDriver: Implement POST /session/{id}/element/{id}/elements 2022-10-19 15:32:31 +02:00
Tobias Christiansen
d26bbcab42 WebDriver: Implement POST /session/{id}/element/{id}/element 2022-10-19 15:32:31 +02:00
Tobias Christiansen
063bd663a7 WebDriver: Implement POST /session/{id}/elements endpoint 2022-10-19 15:32:31 +02:00
Tobias Christiansen
e6f71d5e05 WebDriver: Fix broken Optional<> returns through IPC 2022-10-19 15:32:31 +02:00
Tobias Christiansen
0e5cfccc71 WebContent: Fix broken Optional<> returns through IPC
Apparently one can not use the brace-initializer to return an empty
Optional through IPC, it has to be explicitly constructed.
2022-10-19 15:32:31 +02:00
Andreas Kling
d9b543da68 LibJS: Disable bytecode optimizations by default
The optimization passes are not stable, which makes test262 flaky.
Address this by introducing a new OptimizationLevel::None and making it
the default.

This removes all the flakiness from test262 in my testing.

We can enable optimizations by default again once they have been made
stable. :^)
2022-10-19 14:37:57 +02:00
Linus Groh
8fc4c5d27b WebDriver: Avoid some JsonValue copies in Session::find_element() 2022-10-18 23:22:38 +02:00
Linus Groh
f3d66b1108 WebDriver: Include (empty) capabilities object in /session POST response
Still not spec compliant, but at least we now return both assumed values
of the JSON object ("sessionId", "capabilities").
2022-10-18 23:22:38 +02:00
Linus Groh
dd4e5d5028 WebDriver: Make functions always match their spec command name
This is easier to grasp than sometimes naming it after the HTTP method,
and sometimes not.
2022-10-18 23:22:38 +02:00
Linus Groh
47f25d4008 WebDriver: Add GET /session/{id}/window endpoint 2022-10-18 23:22:38 +02:00
Linus Groh
f2435a6237 WebDriver: Rename Session::get_window() to current_window_handle()
Pure getters should always match their member name. Also return a const
reference and let the caller make a copy if needed.
2022-10-18 23:22:38 +02:00
MacDue
c6fbeb5845 LibWeb: Don't attempt to paint text shadows for empty text fragments
This avoids the debug spam that happens then the shadow painting fails
to allocate a zero sized bitmap.
2022-10-18 23:18:53 +02:00
MacDue
89e308726e LibWeb: Print requested bitmap sizes in shadow painting debug logs
Also replace "box-shadow" with "text-shadow" in the text shadow
painting debug logs.
2022-10-18 23:18:53 +02:00
Luke Wilde
41d6307c17 LibHTTP: Fix not consuming the last byte of body in from_raw_request
`index + 1` was not correct. For example, if the body has two bytes, we
would consume the first byte and increment the index. We then add one
to the index and see it's equal to the size, so we take this one byte
and set the body result to it. The while loop would still continue and
we consume the second byte, adding it to the temporary buffer. We see
that the index is above the size, so we don't update the body, dropping
the last byte on the floor.
2022-10-18 23:18:20 +02:00
Tobias Christiansen
5fcf00f30d WebDriver: Add POST /session/{id}/element endpoint
This allows you to query for elements in the active document!
The IDs of matching elements are returned through the WebDriver
interface, for now there's nothing to do with this information.

This introduces a `LocalElement` to the Session, which for now only
holds the ID of a real browser-side element. Once more data of elements
are available to the Session, they can be stored alongside in this
struct.

Fixme's introduced are:
    - Only CSS selector location strategy is implemented for now
    - `get_or_create_a_web_element_reference` returns the elements ID
      instead of a UUID generated in a spec way.
2022-10-18 19:18:33 +02:00
Tobias Christiansen
5d762bd448 WebDriver+Friends: Add IPC and plumbing for Element-getting
This extends the IPC calls `get_document_element` and
`query_selector_all` to be usable by the WebDriver. For this the
`WebDriverConnection` provides the same interfaces and takes care of
routing the data through the Browser.
2022-10-18 19:18:33 +02:00
Tobias Christiansen
281991057c WebContent: Add more IPC endpoints for getting Elements
This patch adds `get_document_element()` and `query_selector_all()`
which return Node's IDs.

    `get_document_element` returns the ID of the document element

    `query_selector_all` returns the IDs of all elements matching the
    selector starting at the Node associated with the start_node_id
2022-10-18 19:18:33 +02:00
snooze6214
d3353ee0e7 PixelPaint: Add action to invert selection 2022-10-18 18:57:12 +02:00
snooze6214
295fcd639f PixelPaint: Make Wand Select tool select correctly on moved layers
Before this commit, when the wand select tool was used on a layer that
was moved, it would make the selection relative to the image, and not
relative to the layer. This commit fixes that issue.
2022-10-18 18:56:33 +02:00
Gunnar Beutner
ce8d410f36 Ports: Make the quake3 port buildable on ARM64 hosts
Previously, on ARM64 hosts we'd try to build ARM64 binaries even when
SERENITY_ARCH was set to x86_64. This would cause the build to fail.
2022-10-18 17:23:52 +02:00
Timothy Flynn
27737f613c LibTimeZone+LibJS: Update to TZDB version 2022e
https://mm.icann.org/pipermail/tz-announce/2022-October/000074.html

This version changes America/Chicago's transtion from LMT to CST from
1883 Nov 18 12:09:24 to 1883 Nov 18 18:00.
2022-10-18 16:01:44 +02:00
Andreas Kling
0e06d4a767 Meta: Add Timon Kruiper to the contributors list :^) 2022-10-18 15:48:29 +02:00
Liav A
74a080fb68 LibC: Use proper casting in fgetc and fgetc_unlocked functions
In the fgetc function, a fix was already in place but was clunky. A real
proper solution is to use an unsigned char instead of a char when
returning the value, so an implicit cast is happening based on the
assumption that the value is unsigned, so if the variable contained 0xff
it won't be treated as -1, but as unsigned 0xff, so the result int will
be 0xff and not -1.

The same solution is applied to the fgetc_unlocked function as well.
2022-10-18 13:21:38 +02:00
Timon Kruiper
1a84cb5457 Kernel/aarch64: Stub more functions to be able to build Scheduler.cpp
With all these functions stubbed, Scheduler.cpp is now buidable!
2022-10-18 13:08:25 +02:00
Timon Kruiper
352f980ca2 Kernel: Call Processor::are_interrupts_enabled in Scheduler::idle_loop
This expresses the intent better, and we shouldn't be calling global
functions anyway.
2022-10-18 13:08:25 +02:00