Commit graph

43096 commits

Author SHA1 Message Date
davidot
385c2f2eb8 LibJS: Use correct this value for tagged template calls
This has to get quite messy because we currently do evaluation to value
and reference separately meaning we have to deal with a lot of edge
cases here.
2022-11-15 12:00:36 +00:00
davidot
b3edd94869 LibJS: Treat '\\' as an escaped character in template literals
Before this change we would ignore that the second backslash is escaped
and template strings ending with ` \\` would be unterminated as the
second slash was used to escape the closing quote.
2022-11-15 12:00:36 +00:00
Timothy Flynn
8e624c8f6d LibWeb+WebContent+WebDriver: Implement Find Elements From Shadow Root 2022-11-15 11:55:36 +00:00
Timothy Flynn
6d9bd04233 LibWeb+WebContent+WebDriver: Implement Find Element From Shadow Root 2022-11-15 11:55:36 +00:00
Timothy Flynn
4d9fd5d190 LibWeb+WebContent+WebDriver: Implement Get Element Shadow Root 2022-11-15 11:55:36 +00:00
Timothy Flynn
cb91e6067c LibWeb+WebContent+WebDriver: Implement Get Active Element
Unfortunately, nothing ever calls DOM::Document::set_active_element at
the moment, so this will always return ErrorCode::NoSuchElement.
2022-11-15 11:55:36 +00:00
Daniel Bertalan
269a931414 Tests/AK: Re-enable HashTable<double> test
The incorrect UBSan alignment check that made this test fail has been
fixed in Clang 15.

Closes #13614
2022-11-15 10:45:41 +02:00
Itamar
8d65df935e LibWeb: Handle inset properties in style_value_for_property()
This adds support for the Top, Right, Bottom and Left CSS properties
in style_value_for_property().
2022-11-14 21:22:27 +00:00
Timothy Flynn
826d5f8f9a WebContent+WebDriver: Move Window commands to WebContent
This moves Get Window Handle, Close Window, and Get Window Handles over
to WebContent so they may be implemented closer to the spec and be used
by Ladybird.
2022-11-14 13:43:24 -05:00
Timothy Flynn
be50806a18 WebDriver: Remove "Services/" prefix from local WebDriver includes
This is to allow building some of these files from Ladybird. The Build
directory for Ladybird does not include the "Services/" path.
2022-11-14 13:43:24 -05:00
Timothy Flynn
4d4ed96fa1 WebContent: Provide access to ConnectionFromClient's PageHost
This is needed to construct a WebDriverConnection from outside of
PageHost itself in Ladybird.
2022-11-14 13:43:24 -05:00
Timothy Flynn
d2b2d3ad80 WebContent: Allow creating a WebDriverConnection with an existing socket
The socket used by WebDriverConnection will be created separately for
Ladybird.
2022-11-14 13:43:24 -05:00
Timothy Flynn
b00d77eac8 LibCore: Invoke forward from the global namespace inside C_OBJECT
If a class defines a method named `forward` itself, the compiler isn't
able to differentiate between that method and (std::)forward.
2022-11-14 13:43:24 -05:00
Timothy Flynn
fb83ceaf57 LibCore: Allow TCPServer's port to be reused after it exits
This hasn't been an issue on Serenity, but on Linux, if a program opens
a TCPServer on some port and then exits, that program can't be re-run
until the OS makes the port available again. This is usually ~2x the TCP
socket's maximum segment lifetime, upwards of a minute.

Add an option to TCPServer to allow re-using the port after the program
exits.
2022-11-14 13:43:24 -05:00
Aliaksandr Kalenik
2675b9390b LibWeb: Parse unknown media type in media queries
Prevent media query parser from falling back into
MediaQuery::create_not_all() for queries with unknown media type.
With this change following test works correctly:
http://wpt.live/css/css-conditional/at-media-001.html
2022-11-14 16:08:35 +00:00
Aliaksandr Kalenik
7f527ddde3 LibWeb: Support device-height and device-width media query values 2022-11-14 16:08:35 +00:00
Zaggy1024
52a5da51bf LibVT: Make shortcuts propagate completely before terminal input
This allows shorcuts to be used in the Terminal app rather than
processing the terminal input first and ignoring shortcuts after.
2022-11-14 16:08:11 +00:00
Zaggy1024
a9bc626639 2048: Call event.ignore() correctly in 2048's BoardView keydown handler 2022-11-14 16:08:11 +00:00
Zaggy1024
66b15e6cd6 KeyboardMapper: Call event.ignore() on keydown in the main widget 2022-11-14 16:08:11 +00:00
Zaggy1024
76627ec0a2 HexEditor: Allow keydown events to propagate if they are not handled 2022-11-14 16:08:11 +00:00
Zaggy1024
7ce346e50e PixelPaint: Allow keydown events to bubble from ImageEditor
Previously, all keydown KeyEvents were accepted, causing parent widgets
not to receive them. With the addition of shortcut handling to keydown,
shortcuts were not called when the ImageEditor was focused.
2022-11-14 16:08:11 +00:00
Zaggy1024
967dfa7956 LibGUI: Handle Action keyboard shortcuts in Widget keydown
Widgets can now prevent shortcut Actions from being called, which
allows text input keydown handlers to override single key shortcuts.
2022-11-14 16:08:11 +00:00
Zaggy1024
8e7c7e0a2a LibGUI: Share code for finding an Action by Shortcut
This moves logic for finding a shortcut on a Window or Widget to
Action::find_action_for_shortcut instead.
2022-11-14 16:08:11 +00:00
Samuel Bowman
025c16a6f9 Base: Mark PartitionEditor as requiring root 2022-11-14 14:58:10 +00:00
Samuel Bowman
d947555527 Taskbar: Support launching apps that require root
If an app file has RequiresRoot=true, launch the app with the requsite
setuid binary. For GUI apps, this is Escalator. For app files with
RunInTerminal=true, this is pls.
2022-11-14 14:58:10 +00:00
Eli Youngs
1b4ebcaa0c hexdump: Support truncating output with -n 2022-11-14 14:54:45 +00:00
Eli Youngs
ae68def54b hexdump: Pledge stdio and rpath 2022-11-14 14:54:45 +00:00
Aliaksandr Kalenik
93238edf8f LibWeb: Respect media attribute of style tag 2022-11-14 14:47:37 +00:00
Eli Youngs
bd4bb4fd51 seq: Fix clang-tidy warnings 2022-11-14 14:38:23 +00:00
Eli Youngs
f05ec0da53 seq: Add the --terminator option 2022-11-14 14:38:23 +00:00
Eli Youngs
956ef0c9fd seq: Add the --separator option 2022-11-14 14:38:23 +00:00
Eli Youngs
d16fa32674 seq: Interpret parameters with ArgsParser 2022-11-14 14:38:23 +00:00
Zaggy1024
87aed17a46 VideoPlayer: Make PlaybackManager use OwnPtr
VideoPlayerWidget was keeping a reference to PlaybackManager when
changing files, so the old and new managers would both send frames to
be presented at the same time, causing it to flicker back and forth
between the two videos. However, PlaybackManager no longer relies on
event bubbling to pass events to its parent. By changing it to send
events directly to an Object, it can avoid being ref counted, so that
it will get destroyed with its containing object and stop sending
events.
2022-11-14 10:05:56 +00:00
Andrew Kaster
5925d3b26b Browser: Remove unused WebDriverSessionServer.ipc
This was missed in 7972916be7
2022-11-14 10:01:44 +00:00
Linus Groh
93c0c73b9e LibWeb: Implement XMLHttpRequest.withCredentials 2022-11-14 10:00:11 +00:00
Linus Groh
bfa378660b LibWeb: Add a clarifying comment to XHR::m_response_object
Trying to change this to a JS::Object didn't quite work, so let's add
a helpful comment instead.
2022-11-14 10:00:11 +00:00
Linus Groh
fb57500394 LibWeb: Use HeaderList from Fetch for XHR author request headers 2022-11-14 10:00:11 +00:00
Linus Groh
c8184d85c1 LibWeb: Rename XHR::{m_request_headers => m_author_request_headers} 2022-11-14 10:00:11 +00:00
Linus Groh
6e53dd8767 LibWeb: Rename XHR::{m_url => m_request_url} 2022-11-14 10:00:11 +00:00
Linus Groh
29a8414a05 LibWeb: Rename XHR::{m_method => m_request_method} 2022-11-14 10:00:11 +00:00
Linus Groh
338ada66fa LibWeb: Add spec comments and links to XHR members 2022-11-14 10:00:11 +00:00
Linus Groh
04eaff3bb4 LibWeb: Rename XHR's ReadyState / m_ready_state to just State / m_state
This is what the spec calls it.
2022-11-14 10:00:11 +00:00
Lucas CHOLLET
7649feb26f SoundPlayer: Load cover image from music files
When the visualization is set to "Album Cover", the player will now try
to load the embedded image. On failure, it defaults to a "Cover" image
file in the directory.

In Player::play_file_path, file_name_changed now needs to be executed
after that the loader have been set, to get the correct image.
2022-11-13 18:51:18 -07:00
Lucas CHOLLET
27539440df LibAudio: Make FlacLoaderPlugin destructor virtual 2022-11-13 18:51:18 -07:00
Lucas CHOLLET
2ddcfcb00f LibAudio: Parse the picture metadata block 2022-11-13 18:51:18 -07:00
Lucas CHOLLET
db40a514f5 LibCore: Allow MemoryStream::seek to go to EOF
The method still prevents you to go out of bound.
2022-11-13 18:51:18 -07:00
Lucas CHOLLET
706638a0d0 LibAudio: Explicitly support Application metadata block type 2022-11-13 18:51:18 -07:00
Lucas CHOLLET
95968705ce LibAudio: Explicitly support Padding metadata block type 2022-11-13 18:51:18 -07:00
Julian Offenhäuser
8fd4e2ee40 LibGfx: Don't require the OS/2 table for ttf files
This table seems to only exist for OpenType compatibility. There are
some font files, including most embedded fonts in PDF documents, that
don't include one.

For those cases, we now just zero-initialize one to the largest
supported size.
2022-11-13 18:20:45 -07:00
Julian Offenhäuser
703b85b916 LibGfx: Make the ttf parser recognize files with the "true" tag 2022-11-13 18:20:45 -07:00