Commit Graph

54832 Commits

Author SHA1 Message Date
Cubic Love
4c64c0b61e Base+Maps: Add manpage for Maps
Also, list Maps in Applications.md and add a link to the manpage in
Map's Help menu.
2023-09-25 16:20:20 +01:00
Shannon Booth
47514e07b4 LibWeb: Make Element attribute getters take a StringView
These functions are deferring to NamedNodeMap::get_attribute which
already takes a StringView. This changes also leads to finding some
places which were passing though a const char* instead of an entry from
Attribute names. Fix that where applicable, and switch to has_attribute
in some of those places instead of deprecated_attribute where
equivalent.

Ideally this should be taking a 'FlyString const&', but to continue
porting away from DeprecatedString, just leave a FIXME for now.
2023-09-25 15:39:29 +02:00
Shannon Booth
dbf8ff64fb LibWeb: Add AttributeNames::list 2023-09-25 15:39:29 +02:00
Shannon Booth
3458a53cb4 LibWeb: Make Element::get_elements_by_class_name take a StringView
We only make use of the view of the view in this function.
2023-09-25 15:39:29 +02:00
Shannon Booth
79f97da4b4 LibWeb: Make Element::has_attribute take a StringView
It calls Element::get_attribute which takes a StringView. Ultimately,
this should be taking a FlyString, but to help in porting away from
DeprecatedString, just leave a FIXME for that for now.
2023-09-25 15:39:29 +02:00
Shannon Booth
52fccae654 LibWeb: Make Element::set_inner_html take a StringView
It delegates to DOMParsing::inner_html_setter, which already takes a
StringView.
2023-09-25 15:39:29 +02:00
Shannon Booth
dbd46f240b LibWeb: Make DOMParsing::parse_fragment take a StringView
It calls HTMLParser::parse_html_fragment which already accepts a
StringView.
2023-09-25 15:39:29 +02:00
Shannon Booth
ab674f3bf6 LibWeb: Make Element::remove_attribute take a StringView
It already delegates to a function which accepts a StringView, so there
is no advantage here in taking a FlyString. Ideally, both of these
functions should be taking a 'FlyString const&', so leave a FIXME for
that. In the meantime, this should help in porting away from
DeprecatedString.
2023-09-25 15:39:29 +02:00
Shannon Booth
fc7f79e0e7 LibWeb: Use Element::namespace_ instead of ELement::namespace_uri
These are equivalent, and should make our lives a little eaiser porting
over this IDL interface to new String.
2023-09-25 15:39:29 +02:00
Shannon Booth
3bd04d2c58 LibWeb: Port Attr interface from DeprecatedString to String
There are an unfortunate number of DeprecatedString conversions required
here, but these should all fall away and look much more pretty again
when other places are also ported away from DeprecatedString.

Leaves only the Element IDL interface left :^)
2023-09-25 15:39:29 +02:00
Aliaksandr Kalenik
a41f23a0fc LibWeb: Fix document leak in SVGDecodedImageData
The SVGDecodedImageData creates a new Page and replaces its document
with a new one that contains SVG content. This change adds a destroy
call on the replaced document. Without this addition, all tasks
scheduled on the event loop during navigation, initiated while the
page's traversable is being created, will never execute, as the
initial replaced document will become inactive. This leads to a
document leak because the tasks use JS::Handle to hold document
pointer. Making the destroy call resolves the issue because it removes
all tasks associated with the destroyed document from the queue.
2023-09-25 14:31:20 +02:00
Hendiadyoin1
12c6692611 LibJS: Defer GC during cell construction
This stops us from trying to collect not fully constructed Cells,
which's vtables are not fully initialized, which would cause issues
during GC.
2023-09-25 13:19:25 +02:00
Hendiadyoin1
87e063db65 LibJS: Make GC deferral friendship based 2023-09-25 13:19:25 +02:00
Matthias Zimmerman
9871bd4bec LibJS: Fix spelling in VM.cpp 2023-09-25 10:58:58 +02:00
Tim Ledbetter
f34b1c7a7e PixelPaint: Make tool properties widget construction non-fallible
`Tool::get_properties_widget()` now also returns a NNRP to a widget
rather than a raw pointer.
2023-09-25 10:58:31 +02:00
Tim Ledbetter
5df88dab07 FileManager: Make PropertiesWindow::make_button() non-fallible 2023-09-25 10:58:31 +02:00
Tim Ledbetter
b4e134cb52 Userland: Use non-fallible EventReceiver::add() where possible 2023-09-25 10:58:31 +02:00
Aliaksandr Kalenik
707ca984bd LibWeb: Fix memory leak in CSS::ImageStyleValue
Before this change, whenever ImageStyleValue had a non-null
`m_image_request`, it was always leaked along with everything related
to the document to which this value belongs. The issue arises due to
the use of `JS::Handle` for the image request, as it introduces a
cyclic dependency where `ImageRequest` prevents the `CSSStyleSheet`,
that owns `ImageStyleValue`, from being deallocated:
- ImageRequest
- FetchController
- FetchParams
- Window
- HTMLDocument
- HTMLHtmlElement
- HTMLBodyElement
- Text
- HTMLHeadElement
- Text
- HTMLMetaElement
- Text
- HTMLTitleElement
- Text
- HTMLStyleElement
- CSSStyleSheet

This change solves this by visiting `m_image_request` from
`visit_edges` instead of introducing new heap root by using
`JS::Handle`.
2023-09-25 04:16:36 +02:00
Shannon Booth
d81b0e3c86 LibWeb/Streams: Make ReadIntoRequest GC-allocated
This ports the same change which was made in 9c3e9e8981 to
ReadRequest, although nothing actually implements this interface yet.
2023-09-24 20:10:50 -06:00
Shannon Booth
acda17ccc4 LibWeb/Streams: Handle BYOB reader in ReadableStreamError 2023-09-24 20:10:50 -06:00
Tim Ledbetter
24aa43f3fd LibGUI: Use floating rect when saving window state on exit
Previously, exiting a fullscreen application when
`save_size_and_position_on_close()` was used would lead to the
application having an unexpectedly large size when it was reopened.

Exiting a maximized application would lead to the restore button not
working as expected when the application was reopened.
2023-09-24 20:07:54 -06:00
Tim Ledbetter
50d0d6e710 WindowServer: Add an IPC call to get the window floating rect 2023-09-24 20:07:54 -06:00
Bastiaan van der Plaat
deb7ecfbe9 Maps: Add search panel 2023-09-24 20:05:33 -06:00
Bastiaan van der Plaat
2c2a1da306 Maps: Fix map rendering clipping issue when not full window size 2023-09-24 20:05:33 -06:00
Bastiaan van der Plaat
2bdd39f198 Maps: Add LatLngBounds struct 2023-09-24 20:05:33 -06:00
Bastiaan van der Plaat
baf2121636 LibGUI: Add more customization options to ListView 2023-09-24 20:05:33 -06:00
Bastiaan van der Plaat
469563b398 GMLCompiler: Add icon_from_path and frame_style properties 2023-09-24 20:05:33 -06:00
Bastiaan van der Plaat
a4e272d2c8 GMLCompiler: Fix bug where backslash in escaped sequence was preserved 2023-09-24 20:05:33 -06:00
Bastiaan van der Plaat
6265c544f9 LibWeb: Add DOMMatrix rotate, rotateFromVector and rotateAxisAngle 2023-09-24 20:02:38 -06:00
Bastiaan van der Plaat
42c2a67c83 LibWeb: Add DOMMatrix scale and scale3d 2023-09-24 20:02:38 -06:00
Bastiaan van der Plaat
67f6a9ee12 LibWeb: Fix DOMMatrix fromMatrix to use complete DOMMatrixInit struct
DOMMatrix fromMatrix was using create_from_dom_matrix_2d_init to make
a DOMMatrix for it's init struct this is wrong because only the 2D
params of the DOMMatrix are put into the new matrix. I have added
a non 2D version of that function that takes the full DOMMatrixInit
so now fromMatrix works correctly again. I also have added some
text tests to test if it works correctly.

I split the dommatrix.html text tests into multiple files because that
file was becoming to big so now every sub function is a seperate file.
2023-09-24 20:02:38 -06:00
Bastiaan van der Plaat
5d37e1c220 Userland: Remember window state of productivity / editor applications 2023-09-24 20:00:00 -06:00
Bastiaan van der Plaat
04ee15a5ad Ladybird+LibWeb: Use old error.html template for navigation errors again 2023-09-24 19:59:00 -06:00
Bastiaan van der Plaat
8f2319e966 Ladybird+LibWeb: Rename FileDirectoryLoader to GeneratedPagesLoader 2023-09-24 19:59:00 -06:00
Bastiaan van der Plaat
6f8ceb49c2 Ladybird/AppKit: Fix scrolling with high dpi 2023-09-24 19:58:09 -06:00
Bastiaan van der Plaat
0574c0e474 Ladybird/AppKit: Listen for device pixel ratio changes 2023-09-24 19:58:09 -06:00
Liav A
7718842829 Kernel/VirtIO: Ensure proper error propagation in core methods
Simplify core methods in the VirtIO bus handling code by ensuring proper
error propagation. This makes initialization of queues, handling changes
in device configuration, and other core patterns more readable as well.

It also allows us to remove the obnoxious pattern of checking for
boolean "success" and if we get false answer then returning an actual
errno code.
2023-09-24 19:54:23 -06:00
Sam Atkins
6ee6a2534d LibWeb: Expand shorthands containing CSS-wide keywords automatically
Now that shorthands use ShorthandStyleValue, the only bespoke code left
for them applies to CSS-wide keywords. We can automate expanding those,
so let's do so. :^)
2023-09-25 00:46:21 +01:00
Sam Atkins
1c4a05f8a4 LibWeb: Treat "revert" as a CSS-wide keyword
This isn't included in the base definition of a CSS-wide keyword, but
the CASCADE-4 spec which adds it says:

> The revert CSS-wide keyword rolls back the cascade to the cascaded
  value of the earlier origin.

So it is one. While I'm at it, rename `is_builtin()` to match the spec
terminology. It's not used currently, but will be in the next commit.
2023-09-25 00:46:21 +01:00
Sam Atkins
aea112da71 LibWeb: Replace OverflowStyleValue with ShorthandStyleValue 2023-09-25 00:46:21 +01:00
Sam Atkins
e905072e47 LibWeb: Replace GridTrackPlacementShorthandStyleValue with ShorthandSV 2023-09-25 00:46:21 +01:00
Sam Atkins
8efac89a16 LibWeb: Replace TextDecorationStyleValue with ShorthandStyleValue 2023-09-25 00:46:21 +01:00
Sam Atkins
d40b3f2a34 LibWeb: Fix "egde" typo 2023-09-25 00:46:21 +01:00
Sam Atkins
6e311902de LibWeb: Replace PlaceItemsStyleValue with ShorthandStyleValue 2023-09-25 00:46:21 +01:00
Sam Atkins
8143d48161 LibWeb: Replace PlaceSelfStyleValue with ShorthandStyleValue
Turns out we were parsing `place-self` as a PlaceItemsStyleValue
sometimes, whoops.
2023-09-25 00:46:21 +01:00
Sam Atkins
1b0939b418 LibWeb: Replace PlaceContentStyleValue with ShorthandStyleValue 2023-09-25 00:46:21 +01:00
Sam Atkins
6758decc74 LibWeb: Replace ListStyleStyleValue with ShorthandStyleValue 2023-09-25 00:46:21 +01:00
Sam Atkins
f5cb2e8dc2 LibWeb: Replace GridTrackSizeListShorthandStyleValue with ShorthandSV 2023-09-25 00:46:21 +01:00
Sam Atkins
48f3603119 LibWeb: Replace GridAreaShorthandStyleValue with ShorthandStyleValue 2023-09-25 00:46:21 +01:00
Sam Atkins
fe499681d9 LibWeb: Actually remove FontStyleValue
Whoops!
2023-09-25 00:46:21 +01:00