Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick 29.75 Ladybird PRs #25345

Merged
merged 43 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ddabc44
LibWeb: Keep custom properties from all cascade layers
awesomekling Sep 7, 2024
d66778f
LibWebView: Do floating-point-error-free zoom calculation using rounding
ronak69 Sep 18, 2024
d9f0de7
LibWeb: Implement Range's extension method
An-n-ya Sep 16, 2024
4c386e0
LibWeb: Add StyleElementUtils::visit_edges()
awesomekling Sep 21, 2024
01a9d5a
LibWeb: Let style elements remember which StyleSheetList they live in
awesomekling Sep 21, 2024
a2315d8
LibWeb: Return a WindowProxy from `document.defaultView`
tcl3 Sep 21, 2024
77f0c4e
LibWeb: Always flush character insertions before exiting HTML parser
awesomekling Sep 21, 2024
063123b
LibWeb: Allow setting shorthand CSS properties via CSSStyleDeclaration
awesomekling Sep 21, 2024
ccb85fa
LibWeb: Include siblings+descendants when invalidating style
awesomekling Sep 19, 2024
a7bab05
LibWeb: Cache whether there are any :has() selectors present
awesomekling Sep 19, 2024
ffe28eb
LibWeb: Don't try to invalidate style for character data nodes
awesomekling Sep 22, 2024
1cf02e8
LibWeb: Distinguish parent/child on style invalidation for DOM insertion
awesomekling Sep 22, 2024
d40f857
LibWeb: Invalidate less style on textContent change and node removal
awesomekling Sep 22, 2024
cbe6f44
LibWeb: Abort ongoing fetch before starting a new link element fetch
awesomekling Sep 22, 2024
c676eb6
UI/Qt: Move "Open in New Tab" to the top of the link context menu
rmg-x Sep 22, 2024
aab2670
LibWeb: Update `close_top_level_traversable()` to match the spec
tcl3 Sep 20, 2024
1ce9f6f
LibWeb: Allow WebSockets to be established within workers
tcl3 Sep 23, 2024
3621b29
LibWeb: Clean up HTMLInputElement-related includes
trflynn89 Sep 23, 2024
60d6668
LibWeb: Sync with spec in "destroy a document and its descendants"
awesomekling Aug 6, 2024
d22ec94
LibWeb: Make `make_unsalvageable` a public field
dlarocque Sep 8, 2024
9487535
LibWeb: Fix "attempt to update a history entry's document"
dlarocque Sep 8, 2024
2dd7b53
LibJS: Update wording from Console spec
AtkinsSJ Sep 24, 2024
b9baf79
WebDriver: Do not break WebDriver responses into multiple socket writes
trflynn89 Sep 24, 2024
01e8508
LibWeb/HTML: Implement TextTrackCue idl interface
jamierocks Sep 19, 2024
c395b31
LibWeb/HTML: Implement TextTrackCueList idl interface
jamierocks Sep 20, 2024
82259fc
LibWeb/WebVTT: Implement VTTRegion idl interface
jamierocks Sep 19, 2024
9359123
LibWeb/WebVTT: Implement VTTCue idl interface
jamierocks Sep 19, 2024
eb98ccf
LibWeb/CSS: Correct behavior of `revert` inside a `@layer`
AtkinsSJ Sep 25, 2024
b427f1b
LibWeb/CSS: Clarify comment about cascading presentational hints
AtkinsSJ Sep 25, 2024
30e6442
LibWeb/Fetch: Handle edge cases in 'get, decode, and split'
jamierocks Sep 25, 2024
5bc61b6
LibJS: Don't infinite loop on unknown console.log formatting specifiers
awesomekling Sep 26, 2024
f89aa4f
LibWeb: Fire error event when script has an execution error
tcl3 Sep 26, 2024
8188edd
Base: Navigate DOM tree with arrows
chaseWillden Sep 27, 2024
ebe0797
LibWeb: Use substring matching for content filters
Gingeh Sep 25, 2024
0eca32b
LibWeb: Always blockify the root element
awesomekling Sep 29, 2024
8b75b85
LibWebSocket: Don't allow a connection to be discarded more than once
tcl3 Sep 25, 2024
c2c5eb8
LibWeb/WebSocket: Allow sending binary blob data over a websocket
tcl3 Sep 25, 2024
319f25d
LibWeb: Forbid reentrancy of style-layout-repaint in EventLoop::process
kalenikaliaksandr Sep 29, 2024
473bac0
LibWeb/HTML: Re-order promise resolution to match spec
AtkinsSJ Sep 30, 2024
73161fc
LibWeb: Deduplicate attributes when emitting start and end tags
ADKaster Sep 30, 2024
7119d93
UI/Qt: Do not create signal notifiers until after an event loop exists
trflynn89 Oct 1, 2024
2cc7dcb
LibWeb/MimeSniff: Update the MIME type sniffing algo to meet specs
kemzeb Oct 1, 2024
95a99f5
Meta: Add TextTrackCue{,List}, VTT{Cue,Region} to GN build
nico Nov 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Base/home/anon/.config/BrowserContentFilters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@ glassboxdigital.io
go-mpulse.net
go2speed.org
google-analytics.com
google.com/gen_204\?
google.com/log\?
google.com/gen_204?
google.com/log?
googleadservices.com
googleoptimize.com
googlesyndication.com
Expand Down
49 changes: 33 additions & 16 deletions Base/res/ladybird/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,30 +614,47 @@ document.addEventListener("DOMContentLoaded", () => {
document.addEventListener("keydown", event => {
const UP_ARROW_KEYCODE = 38;
const DOWN_ARROW_KEYCODE = 40;
const RIGHT_ARROW_KEYCODE = 39;
const LEFT_ARROW_KEYCODE = 37;
const RETURN_KEYCODE = 13;
const SPACE_KEYCODE = 32;

if (document.activeElement.tagName !== "INPUT") {
if (event.keyCode == UP_ARROW_KEYCODE || event.keyCode == DOWN_ARROW_KEYCODE) {
let selectedIndex = visibleDOMNodes.indexOf(selectedDOMNode);
if (selectedIndex < 0) {
return;
}
const move = delta => {
let selectedIndex = visibleDOMNodes.indexOf(selectedDOMNode);
if (selectedIndex < 0) {
return;
}

let newIndex;
let newIndex = selectedIndex + delta;

if (event.keyCode == UP_ARROW_KEYCODE) {
newIndex = selectedIndex - 1;
} else if (event.keyCode == DOWN_ARROW_KEYCODE) {
newIndex = selectedIndex + 1;
}
if (visibleDOMNodes[newIndex]) {
inspectDOMNode(visibleDOMNodes[newIndex]);
}
};

if (visibleDOMNodes[newIndex]) {
inspectDOMNode(visibleDOMNodes[newIndex]);
}
if (document.activeElement.tagName !== "INPUT") {
const isSummary = selectedDOMNode.parentNode.tagName === "SUMMARY";
const isDiv = selectedDOMNode.parentNode.tagName === "DIV";

if (event.keyCode == UP_ARROW_KEYCODE) {
move(-1);
} else if (event.keyCode == DOWN_ARROW_KEYCODE) {
move(1);
} else if (event.keyCode == RETURN_KEYCODE || event.keyCode == SPACE_KEYCODE) {
if (selectedDOMNode.parentNode.tagName === "SUMMARY") {
if (isSummary) {
selectedDOMNode.parentNode.click();
}
} else if (event.keyCode == RIGHT_ARROW_KEYCODE) {
if (isSummary && selectedDOMNode.parentNode.parentNode.open === false) {
selectedDOMNode.parentNode.click();
} else if (selectedDOMNode.parentNode.parentNode.open === true && !isDiv) {
move(1);
}
} else if (event.keyCode == LEFT_ARROW_KEYCODE) {
if (isSummary && selectedDOMNode.parentNode.parentNode.open === true) {
selectedDOMNode.parentNode.click();
} else if (selectedDOMNode.parentNode.parentNode.open === false || isDiv) {
move(-1);
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions Ladybird/Qt/EventLoopImplementationQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ void EventLoopImplementationQt::post_event(Core::EventReceiver& receiver, Nonnul
wake();
}

void EventLoopImplementationQt::set_main_loop()
{
m_main_loop = true;

auto& event_loop_manager = static_cast<EventLoopManagerQt&>(Core::EventLoopManager::the());
event_loop_manager.set_main_loop_signal_notifiers({});
}

static void qt_timer_fired(Core::TimerShouldFireWhenNotVisible should_fire_when_not_visible, Core::EventReceiver& object)
{
if (should_fire_when_not_visible == Core::TimerShouldFireWhenNotVisible::No) {
Expand Down Expand Up @@ -330,6 +338,10 @@ bool EventLoopManagerQt::event_target_received_event(Badge<EventLoopImplementati

EventLoopManagerQt::EventLoopManagerQt()
: m_main_thread_event_target(make<EventLoopImplementationQtEventTarget>())
{
}

void EventLoopManagerQt::set_main_loop_signal_notifiers(Badge<EventLoopImplementationQt>)
{
MUST(Core::System::socketpair(AF_LOCAL, SOCK_STREAM, 0, m_signal_socket_fds));
m_signal_socket_notifier = new QSocketNotifier(m_signal_socket_fds[0], QSocketNotifier::Read);
Expand Down
5 changes: 4 additions & 1 deletion Ladybird/Qt/EventLoopImplementationQt.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

namespace Ladybird {

class EventLoopImplementationQt;
class EventLoopImplementationQtEventTarget;

class EventLoopManagerQt final : public Core::EventLoopManager {
Expand All @@ -38,6 +39,8 @@ class EventLoopManagerQt final : public Core::EventLoopManager {
virtual int register_signal(int, Function<void(int)>) override;
virtual void unregister_signal(int) override;

void set_main_loop_signal_notifiers(Badge<EventLoopImplementationQt>);

private:
static void handle_signal(int);

Expand Down Expand Up @@ -77,7 +80,7 @@ class EventLoopImplementationQt final : public Core::EventLoopImplementation {
virtual bool was_exit_requested() const override { return false; }
virtual void notify_forked_and_in_child() override { }

void set_main_loop() { m_main_loop = true; }
void set_main_loop();

private:
friend class EventLoopManagerQt;
Expand Down
2 changes: 1 addition & 1 deletion Ladybird/Qt/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,8 @@ Tab::Tab(BrowserWindow* window, WebContentOptions const& web_content_options, St
});

m_link_context_menu = new QMenu("Link context menu", this);
m_link_context_menu->addAction(open_link_action);
m_link_context_menu->addAction(open_link_in_new_tab_action);
m_link_context_menu->addAction(open_link_action);
m_link_context_menu->addSeparator();
m_link_context_menu->addAction(m_link_context_menu_copy_url_action);
m_link_context_menu->addSeparator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static bool is_platform_object(Type const& type)
"TextMetrics"sv,
"TextTrack"sv,
"URLSearchParams"sv,
"VTTRegion"sv,
"VideoTrack"sv,
"VideoTrackList"sv,
"WebGLRenderingContext"sv,
Expand Down Expand Up @@ -4212,6 +4213,7 @@ static void generate_using_namespace_definitions(SourceGenerator& generator)
using namespace Web::WebAudio;
using namespace Web::WebGL;
using namespace Web::WebIDL;
using namespace Web::WebVTT;
using namespace Web::XHR;
)~~~"sv);
}
Expand Down
1 change: 1 addition & 0 deletions Meta/gn/secondary/Userland/Libraries/LibWeb/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ shared_library("LibWeb") {
"WebGL",
"WebIDL",
"WebSockets",
"WebVTT",
"Worker",
"XHR",
"XLink",
Expand Down
2 changes: 2 additions & 0 deletions Meta/gn/secondary/Userland/Libraries/LibWeb/HTML/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ source_set("HTML") {
"TagNames.cpp",
"TextMetrics.cpp",
"TextTrack.cpp",
"TextTrackCue.cpp",
"TextTrackCueList.cpp",
"TextTrackList.cpp",
"TimeRanges.cpp",
"Timer.cpp",
Expand Down
8 changes: 8 additions & 0 deletions Meta/gn/secondary/Userland/Libraries/LibWeb/WebVTT/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source_set("WebVTT") {
configs += [ "//Userland/Libraries/LibWeb:configs" ]
deps = [ "//Userland/Libraries/LibWeb:all_generated" ]
sources = [
"VTTCue.cpp",
"VTTRegion.cpp",
]
}
4 changes: 4 additions & 0 deletions Meta/gn/secondary/Userland/Libraries/LibWeb/idl_files.gni
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/HTML/SubmitEvent.idl",
"//Userland/Libraries/LibWeb/HTML/TextMetrics.idl",
"//Userland/Libraries/LibWeb/HTML/TextTrack.idl",
"//Userland/Libraries/LibWeb/HTML/TextTrackCue.idl",
"//Userland/Libraries/LibWeb/HTML/TextTrackCueList.idl",
"//Userland/Libraries/LibWeb/HTML/TextTrackList.idl",
"//Userland/Libraries/LibWeb/HTML/TimeRanges.idl",
"//Userland/Libraries/LibWeb/HTML/ToggleEvent.idl",
Expand Down Expand Up @@ -357,6 +359,8 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
"//Userland/Libraries/LibWeb/WebIDL/DOMException.idl",
"//Userland/Libraries/LibWeb/WebSockets/WebSocket.idl",
"//Userland/Libraries/LibWeb/WebVTT/VTTCue.idl",
"//Userland/Libraries/LibWeb/WebVTT/VTTRegion.idl",
"//Userland/Libraries/LibWeb/XHR/ProgressEvent.idl",
"//Userland/Libraries/LibWeb/XHR/XMLHttpRequest.idl",
"//Userland/Libraries/LibWeb/XHR/XMLHttpRequestEventTarget.idl",
Expand Down
6 changes: 3 additions & 3 deletions Tests/LibWeb/Layout/expected/css-all-unset.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: inline
InlineNode <html>
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x17 [BFC] children: inline
InlineNode <head>
InlineNode <style>
frag 0 from TextNode start: 1, length: 18, rect: [0,0 134.984375x17] baseline: 13.296875
Expand All @@ -11,7 +11,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: inline
TextNode <#text>

ViewportPaintable (Viewport<#document>) [0,0 800x600]
InlinePaintable (InlineNode<HTML>)
PaintableWithLines (BlockContainer<HTML>) [0,0 800x17]
InlinePaintable (InlineNode<HEAD>)
InlinePaintable (InlineNode<STYLE>)
TextPaintable (TextNode<#text>)
Expand Down
11 changes: 11 additions & 0 deletions Tests/LibWeb/Layout/expected/html-display-contents.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17 children: inline
frag 0 from TextNode start: 0, length: 3, rect: [8,8 18.828125x17] baseline: 13.296875
"lol"
TextNode <#text>

ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x17]
TextPaintable (TextNode<#text>)
11 changes: 11 additions & 0 deletions Tests/LibWeb/Layout/expected/html-display-inline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17 children: inline
frag 0 from TextNode start: 0, length: 3, rect: [8,8 18.828125x17] baseline: 13.296875
"lol"
TextNode <#text>

ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x17]
TextPaintable (TextNode<#text>)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 150x150] baseline: 150
ImageBox <img.replaced> at (8,8) content-size 150x150 children: not-inline
(SVG-as-image isolated context)
Viewport <#document> at (0,0) content-size 150x150 [BFC] children: inline
Viewport <#document> at (0,0) content-size 150x150 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 150x150 [SVG] children: not-inline
SVGGeometryBox <path> at (0,0) content-size 150x150 children: not-inline
TextNode <#text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: not-inline
ImageBox <img> at (8,8) content-size 50x100 children: not-inline
(SVG-as-image isolated context)
Viewport <#document> at (0,0) content-size 50x100 [BFC] children: inline
Viewport <#document> at (0,0) content-size 50x100 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 50x100 [SVG] children: not-inline
SVGGeometryBox <rect> at (0,0) content-size 50x100 children: not-inline

Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Layout/expected/svg/svg-as-image.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <body> at (8,8) content-size 784x1568 children: not-inline
ImageBox <img> at (8,8) content-size 784x1568 children: not-inline
(SVG-as-image isolated context)
Viewport <#document> at (0,0) content-size 784x1568 [BFC] children: inline
Viewport <#document> at (0,0) content-size 784x1568 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 784x1568 [SVG] children: inline
TextNode <#text>
SVGGeometryBox <rect> at (0,0) content-size 784x1568 children: not-inline
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Viewport <#document> at (0,0) content-size 800x600 children: inline
InlineNode <svg>
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <svg> at (0,0) content-size 800x0 children: inline
TextNode <#text>
InlineNode <rect>
TextNode <#text>

ViewportPaintable (Viewport<#document>) [0,0 800x600]
InlinePaintable (InlineNode<svg>)
PaintableWithLines (BlockContainer<svg>) [0,0 800x0]
InlinePaintable (InlineNode<rect>)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150
ImageBox <img> at (8,8) content-size 300x150 children: not-inline
(SVG-as-image isolated context)
Viewport <#document> at (0,0) content-size 300x150 [BFC] children: inline
Viewport <#document> at (0,0) content-size 300x150 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 300x150 [SVG] children: not-inline
TextNode <#text>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150
ImageBox <img> at (8,8) content-size 300x150 children: not-inline
(SVG-as-image isolated context)
Viewport <#document> at (0,0) content-size 300x150 [BFC] children: inline
Viewport <#document> at (0,0) content-size 300x150 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 300x150 [SVG] children: not-inline

ViewportPaintable (Viewport<#document>) [0,0 800x600]
Expand Down
1 change: 1 addition & 0 deletions Tests/LibWeb/Layout/input/html-display-contents.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<html style="display:contents"><body>lol
1 change: 1 addition & 0 deletions Tests/LibWeb/Layout/input/html-display-inline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<html style="display:inline">lol
18 changes: 16 additions & 2 deletions Tests/LibWeb/TestMimeSniff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include <LibTest/TestCase.h>
#include <LibWeb/MimeSniff/MimeType.h>

#include <LibWeb/MimeSniff/Resource.h>

Expand All @@ -28,10 +29,10 @@ TEST_CASE(determine_computed_mime_type_given_no_sniff_is_set)

TEST_CASE(determine_computed_mime_type_given_no_sniff_is_unset)
{
auto supplied_type = MUST(Web::MimeSniff::MimeType::create("text"_string, "html"_string));
auto supplied_type = MUST(Web::MimeSniff::MimeType::create("application"_string, "x-this-is-a-test"_string));
auto computed_mime_type = MUST(Web::MimeSniff::Resource::sniff("\x00"sv.bytes(), Web::MimeSniff::SniffingConfiguration { .supplied_type = supplied_type }));

EXPECT_EQ("application/octet-stream"sv, MUST(computed_mime_type.serialized()));
EXPECT_EQ("application/x-this-is-a-test"sv, MUST(computed_mime_type.serialized()));
}

TEST_CASE(determine_computed_mime_type_given_xml_mime_type_as_supplied_type)
Expand Down Expand Up @@ -110,6 +111,19 @@ TEST_CASE(determine_computed_mime_type_given_supplied_type_that_is_an_apache_bug
}
}

TEST_CASE(determine_computed_mime_type_given_xml_or_html_supplied_type)
{
// With HTML supplied type.
auto config = Web::MimeSniff::SniffingConfiguration { .supplied_type = MUST(Web::MimeSniff::MimeType::create("text"_string, "html"_string)) };
auto computed_mime_type = MUST(Web::MimeSniff::Resource::sniff(""sv.bytes(), config));
EXPECT_EQ("text/html"sv, MUST(computed_mime_type.serialized()));

// With XML supplied type.
config = Web::MimeSniff::SniffingConfiguration { .supplied_type = MUST(Web::MimeSniff::MimeType::create("text"_string, "xml"_string)) };
computed_mime_type = MUST(Web::MimeSniff::Resource::sniff(""sv.bytes(), config));
EXPECT_EQ("text/xml"sv, MUST(computed_mime_type.serialized()));
}

TEST_CASE(determine_computed_mime_type_in_both_none_and_browsing_sniffing_context)
{
HashMap<StringView, Vector<StringView>> mime_type_to_headers_map;
Expand Down
1 change: 1 addition & 0 deletions Tests/LibWeb/Text/expected/DOM/Document-defaultView.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.defaultView === window: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hello Ladybird Ladybird again World 6
4
2 changes: 2 additions & 0 deletions Tests/LibWeb/Text/expected/DOM/range-get-client-rects.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x [object DOMRectList]
[object DOMRect]
1 change: 1 addition & 0 deletions Tests/LibWeb/Text/expected/HTML/Window-onerror.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
onerror event fired: Error: Uncaught error
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PASS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PASS (didn't crash)
4 changes: 4 additions & 0 deletions Tests/LibWeb/Text/expected/all-window-properties.txt
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ TextDecoder
TextEncoder
TextMetrics
TextTrack
TextTrackCue
TextTrackCueList
TextTrackList
TimeRanges
ToggleEvent
Expand All @@ -360,6 +362,8 @@ Uint32Array
Uint8Array
Uint8ClampedArray
UserActivation
VTTCue
VTTRegion
ValidityState
VideoTrack
VideoTrackList
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1px
2px
3px
4px
1 change: 1 addition & 0 deletions Tests/LibWeb/Text/expected/css/revert-ignores-layers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PASS, revert skipped the layers
Loading
Loading