Commit Graph

62272 Commits

Author SHA1 Message Date
Timothy Flynn
c379b35798 LibUnicode: Move helper to convert StringEnumeration to a list to ICU.h
This will be needed outside of UnicodeKeywords.cpp.
2024-06-26 10:14:02 +02:00
Timothy Flynn
8331a87f6c LibTimeZone: Rename TestTimeZone to TestTimeZoneDeprecated
This will just allow creating a TestTimeZone in LibUnicode for an ICU-
based implementation.
2024-06-26 10:14:02 +02:00
Luke Warlow
a65f1ecc37 LibWeb: Implement stub for ElementInternals
This implements a stub ElementInternals object which implements the
shadowRoot getter only.

Also implement attachInternals function.
2024-06-26 06:30:40 +02:00
Luke Warlow
ce8d3d17c4 LibWeb: Implement unsafe HTML parsing methods
Both Element's and ShadowRoot's setHTMLUnsafe, and Document's static
parseHTMLUnsafe methods are implemented.
2024-06-26 06:13:29 +02:00
Ali Mohammad Pur
58fc901578 AK: Add a formatter for OwnPtr<T>
This formatter just prints the object out as a pointer.
2024-06-26 05:47:16 +02:00
Ali Mohammad Pur
920f470735 LibCore: Fix some thread-related memory/object leaks 2024-06-26 05:47:16 +02:00
Luke Warlow
9171c35183 LibWeb: Refactor DOM parsing APIs
Multiple APIs have moved from the DOM Parsing and Serialization spec to
HTML.

Updates spec URLs and comments.

Delete InnerHTML file:
- Make parse_fragment a member of Element, matching serialize_fragment
on Node.
- Move inner_html_setter inline into Element and ShadowRoot as per the
spec.

Add FIXME to Range.idl for Trusted Types createContextualFragment
2024-06-26 05:41:00 +02:00
Ali Mohammad Pur
55e1ab88ad Tests/LibWasm: Don't ignore the result of BigInt::export_data()
Prior to this commit, the test runner was ignoring the result, which
meant that values that fit in less than 128 bits were shifted to remove
the zero words (which is obviously incorrect).
2024-06-25 18:25:53 -06:00
Andrew Kaster
29665f51aa CI: Rename JS repl artifacts so they can actually be bundled 2024-06-25 17:27:08 -06:00
Andrew Kaster
a587eafbf4 CMake: Consistently use imported targets for third party dependencies 2024-06-25 17:15:42 -04:00
Tim Ledbetter
0879489084 LibMedia: Hide Matroska debug message behind a flag 2024-06-25 19:25:34 +02:00
Andreas Kling
7ce350b8c0 Tests: Add a basic test for Declarative Shadow DOM 2024-06-25 19:22:35 +02:00
Andreas Kling
fb9f3f10f3 LibWeb: Add Element.getHTML() and ShadowRoot.getHTML() 2024-06-25 19:22:35 +02:00
Andreas Kling
0c47b3ff97 LibWeb: Update innerHTML & co IDL definition to match spec
This stuff has moved from a mixin defined by the DOM Parsing spec, over
to the HTML spec, where they are now defined as partial interfaces for
Element and ShadowRoot.

There's also some new functionality that we don't implement yet, so
patch marks them as FIXME properties.
2024-06-25 19:22:35 +02:00
Andreas Kling
f4bdf56212 LibWeb: Rename Element::shadow_root_internal() to shadow_root()
And let the old shadow_root(), which was only supposed to be used by
bindings, be called shadow_root_for_bindings() instead.

This makes it much easier to read DOM code, and we don't have to worry
about when to use shadow_root_internal() or why.
2024-06-25 19:22:35 +02:00
Andreas Kling
c7d9c1c0b2 LibWeb: Update DOM cloning algorithm for declarative shadow DOM 2024-06-25 19:22:35 +02:00
Andreas Kling
a0e1112209 LibWeb: Add HTMLTemplateElement IDL attrs for declarative shadow DOM 2024-06-25 19:22:35 +02:00
Andreas Kling
8e68215d33 LibWeb: Add ShadowRoot.clonable and ShadowRoot.serializable 2024-06-25 19:22:35 +02:00
Andreas Kling
e62db9c118 LibWeb: Update HTML fragment serialization for declarative shadow DOM 2024-06-25 19:22:35 +02:00
Andreas Kling
9eb4b91168 LibWeb: Parse declarative shadow DOM template elements
We now honor the shadowrootmode attribute on template elements while
parsing, and instantiate a shadow tree as required by the spec.
2024-06-25 19:22:35 +02:00
Andreas Kling
043ad0eb76 LibWeb: Refactor Element.attachShadow() after spec changes
The bulk of this function is moved to a new "attach a shadow root"
helper, designed to be used both from here and the HTML parser.
2024-06-25 19:22:35 +02:00
Andreas Kling
f3070118b1 LibWeb: Add "allow declarative shadow roots" flag to Document 2024-06-25 19:22:35 +02:00
Hugh Davenport
637ccbec35 UI/Qt: Show search engine name in location bar
The placeholder text shows "Search or enter web address" which doesn't
tell the user about *how* the search will be performed. Other popular
open source browsers show the search engine that will be used. For
example:

	Chromium: "Search **engine** or type a URL"
	Firefox: "Search with **engine** or enter address"

This change changes the placeholder text of the location bar to show
"Search with **engine** or enter web address".
2024-06-25 09:56:42 +01:00
simonkrauter
e9001da8d6 LibWeb: Initial support for dashed lines in Canvas
Implement setLineDash() and getLineDash() in CanvasPathDrawingStyles,
which write/read from the CanvasState object.
This doesn't implement the actual drawing of a dashed line, but at least
sites using the Chart.js library no longer fail with an exception.
Unfortunately the Painter classes don't support dashed/dotted lines
based on segments yet.
2024-06-25 09:47:17 +02:00
Zaggy1024
c4c91f02b3 LibMedia: Remove the home-grown VP9 decoder 2024-06-24 12:41:32 -06:00
Zaggy1024
3cc1187036 LibMedia: Move VideoSampleData out of the Video namespace 2024-06-24 12:41:32 -06:00
Zaggy1024
8848ee775b LibMedia: Flush the video decoder when seeking
This allows H.264 videos to seek correctly.
2024-06-24 12:41:32 -06:00
Zaggy1024
c128a19903 LibMedia: Add a function to flush persistent data from video decoders
Any data that sticks around in a decoder, especially frames that
haven't been retrieved, may cause issues for playback.

This is especially the case with H.264, since its arbitrary frame
ordering to allow reference frames to precede B-frames causes it to
hold onto frames, and causes the playback manager to get back a frame
at a completely wrong timestamp after seeking.
2024-06-24 12:41:32 -06:00
Zaggy1024
d851945aad Tests/LibMedia: Ensure that frame timestamps increase monotonically 2024-06-24 12:41:32 -06:00
Zaggy1024
ef99e701b7 LibMedia/Matroska: Handle negative timestamp offsets correctly
The timestamp offset of a block was being converted from i16 to u64, so
negative values would overflow and cause timestamps that fall before
the cluster's timestamp from being close to the minimum representable
i64.

The math is also now done using saturating operations to prevent any
other similar issues from occurring.
2024-06-24 12:41:32 -06:00
Zaggy1024
bbd8a218a5 AK: Prevent overflow of the min when clamping unsigned values to signed
Also, add some tests for the cases that were broken before.
2024-06-24 12:41:32 -06:00
Zaggy1024
172f4588a7 Tests/AK: Add some quick tests for AK::clamp_to 2024-06-24 12:41:32 -06:00
Zaggy1024
f6a4973578 LibMedia: Give frame timestamps to FFmpeg decoders
H.264 in Matroska can have blocks with unordered timestamps. Without
passing these as the presentation timestamp into the FFmpeg decoder,
the frames will not be returned in chronological order.

VideoFrame will now include a timestamp that is used by the
PlaybackManager, rather than assuming that it is the same timestamp
returned by the demuxer.
2024-06-24 12:41:32 -06:00
Zaggy1024
084cf68dd5 Tests/LibMedia: Add a test for H.264 decoding through FFmpeg 2024-06-24 12:41:32 -06:00
Zaggy1024
48a21d5d6a Tests/LibMedia: Move video decode testing function to a header
This will be useful for other video codecs, but putting all codecs in
one file will be a little messy.
2024-06-24 12:41:32 -06:00
Zaggy1024
32714878ad LibMedia/Matroska: Make SampleIterator getters const 2024-06-24 12:41:32 -06:00
Zaggy1024
457a69786b LibMedia: Pass Matroska codec private data to the FFmpeg decoder
This is necessary to give the H.264 decoder the data it needs to
initialize, including frame size and profile.
2024-06-24 12:41:32 -06:00
Zaggy1024
81001b37ce LibMedia: Use FFmpeg to decode more video formats
VP9 continues to function, but this also allows AV1 to be decoded. With
this commit, H.264 is still non-functional, as the decoder requires
some extra initial data from the track definition in the Matroska file.
2024-06-24 12:41:32 -06:00
Zaggy1024
bf1e0fac94 LibMedia/Matroska: Move the definition get_codec_id_for_track up
The function is separated from the string-to-enum function it uses, and
the order is also inconsistent with header.
2024-06-24 12:41:32 -06:00
Zaggy1024
55fda2068b LibMedia/Matroska: Make track entries ref-counted
These aren't particularly small objects, but we were still copying them
around all over the place. When TrackEntry contains data buffers, they
won't need to be copied as well.
2024-06-24 12:41:32 -06:00
Zaggy1024
40fe0cb9d5 LibMedia: Store YUV planes as byte arrays with no padding for 8-bit
This should halve the size of frames in memory for frames with 8-bit
color components, which is the majority of videos.

Calculation of the size of subsampled planes has also been consolidated
into a struct. There are likely some places that will still need to
change over to this, but it should prevent issues due to differing
handling of rounding/ceiling.
2024-06-24 12:41:32 -06:00
Zaggy1024
b49d3dcf6f LibMedia: Split output bitmap size assertions to individual lines
Now Clang will stop complaining about DeMorgan's theorem.
2024-06-24 12:41:32 -06:00
Zaggy1024
fe2a63d485 LibMedia: Remove fixed-point path for BT.2020 matrix coefficients
BT.2020 will mainly be used with bit depths greater than 8, so having
this specialization is mostly pointless until we use fixed-point math
for higher bit depths.
2024-06-24 12:41:32 -06:00
Zaggy1024
6f8389c483 LibMedia: Ensure that buffers passed to SubsampledYUVFrame are moved 2024-06-24 12:41:32 -06:00
Zaggy1024
d3f88b4987 LibMedia/Matroska: Actually read out the video color range
Apparently I forgot to put read the value for this field, though this
generally doesn't matter since video bitstreams usually specify CICP as
well.
2024-06-24 12:41:32 -06:00
Zaggy1024
a99ff1fcb4 LibMedia: Add formatters for CICP and its components
This is often useful for debugging.
2024-06-24 12:41:32 -06:00
Zaggy1024
291c1c3bd0 LibMedia: Remove unused includes from VideoSampleData.h 2024-06-24 12:41:32 -06:00
circl
71e099c79a Base: Remove archive.zip 2024-06-24 09:45:41 -06:00
circl
63fa32416d Base: Move test-webm.webm out of /home/anon 2024-06-24 09:45:41 -06:00
circl
9f7f6aa80c LibTLS: Remove key-logging debug feature
This attempted to save data into /home/anon even on Linux
2024-06-24 09:45:41 -06:00