Andreas Kling
f982400063
LibGfx: Rename TTF/TrueType to OpenType
...
OpenType is the backwards-compatible successor to TrueType, and the
format we're actually parsing in LibGfx. So let's call it that.
2022-12-21 08:44:22 +01:00
MacDue
a9ea0ee9af
LibWeb: Fix passing size/position to paint_radial_gradient()
...
This was wrong twice making it right... But let's fix that.
The center was being passed as a DevicePixelPoint, but was in fact in
CSS pixels, the size was passed as a Gfx::FloatSize but was in
CSS pixels again. Then we were scaling from device pixels to CSS pixels
when painting which does not need to be done if everything is passed
which the correct scale factors already applied.
2022-12-20 11:03:18 +01:00
Jelle Raaijmakers
25f2e4981c
AK: Stop using DeprecatedString
in Base64 encoding
2022-12-20 10:34:19 +01:00
MacDue
88e50869f1
LibWeb: Fix crash when serializing nodes for DOM inspector
...
Noticed this trying to inspect GitHub, you'd get a segfault due to the
parent node being null here.
2022-12-19 11:37:56 -05:00
Keir Davis
f639445456
LibWeb: Fully Implement get_an_elements_noopener
...
This removes two fix me in HTMLHyperlinkElementUtils
2022-12-19 07:57:44 -05:00
Matt Purnell
0bda06c9c5
LibWeb: Don't const_cast layout_box() when calling const functions
...
layout_box() already has a non-const overload, so we don't need to
const_cast them anymore. This gets rid of 2 FIXMEs. :^)
2022-12-18 12:56:33 +01:00
Quentin Ligier
588994bb00
LibWeb: Improve variable name in HTMLTableElement
...
The variables 'child_to_append_after' are used to specify the child
before which new elements will be inserted, its name is misleading.
These variables are always passed as 'child' to pre_insert.
2022-12-17 18:35:32 +01:00
Alexander Narsudinov
45525d4f85
LibWeb: Add NamedNodeMap::setNamedItemNS() method
...
This patch adds implementation of the missing `setNamedItemNS()` method.
2022-12-17 18:27:57 +01:00
Alexander Narsudinov
530d5adc62
LibWeb: Add NamedNodeMap::removeNamedItemNS() method
...
This patch adds implementation of the missing `removeNamedItemNS()`
method.
2022-12-17 18:27:57 +01:00
Alexander Narsudinov
7679d38c5f
LibWeb: Fix incorrect behaviour in NamedNodeMap::removeNamedItem()
...
According to the spec we should return removed attribute, but the old
implementation returned nullptr instead.
Now we return the element's removed attribute.
2022-12-17 18:27:57 +01:00
Alexander Narsudinov
f2d7690702
LibWeb: Add NamedNodeMap::getNamedItemNS()
...
This patch allows us to use method getNamedItemNS() of NamedNodeMap API.
2022-12-17 18:27:57 +01:00
Alexander Narsudinov
ce6cf5bab8
LibWeb: Make method NamedNodeMap::set_attribute() closer to the spec
...
This patch eliminates 1 FIXME that I've got during fixme roulette! :^)
2022-12-17 18:27:57 +01:00
Alexander Narsudinov
1a0fbe1e85
LibWeb: Add internal get_attribute_ns() methods of NamedNodeMap
...
This patch adds methods for querying element by namespace and
local name.
These methods are defined by the spec for internal
usage, but weren't implemented in LibWeb yet.
2022-12-17 18:27:57 +01:00
Linus Groh
111a38c464
LibJS: Convert new_object_environment() to NonnullGCPtr
2022-12-16 09:59:56 +01:00
Andreas Kling
c355e9692d
LibWeb: Add spec links to IDL APIs in HTMLTableElement
2022-12-16 09:58:03 +01:00
Andreas Kling
2ded895107
LibWeb: Allow setting HTMLTableElement.tFoot to null value
...
This annihilates 2 FIXMEs :^)
2022-12-16 09:58:03 +01:00
Andreas Kling
346737701d
LibWeb: Allow setting HTMLTableElement.tHead to null value
...
This deals with 2 FIXMEs :^)
2022-12-16 09:58:03 +01:00
Andreas Kling
2d791cf90f
LibWeb: Allow setting HTMLTableElement.caption to null value
...
This takes care of 2 FIXMEs :^)
2022-12-16 09:58:03 +01:00
Andreas Kling
6e127f62d7
LibWeb: Add spec link and comment to HTMLTableElement::caption()
2022-12-16 09:58:03 +01:00
Aliaksandr Kalenik
992b4489ad
LibWeb: Fix bug in BFC that independent FC assigned to wrong variable
...
Bug was introduced in 210bf8adf0c431be05659140fd6de3a2cc5b7d99
It makes new variable for independent_formatting_context instead
of using earlier declared one which means that
parent_context_did_dimension_child_root_box will never be called.
2022-12-16 09:57:37 +01:00
Linus Groh
6ae79a84df
LibJS: Convert Object::construct() to NonnullGCPtr
2022-12-15 06:56:37 -05:00
Linus Groh
22089436ed
LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr
2022-12-15 06:56:37 -05:00
Linus Groh
2a66fc6cae
LibJS: Add make_handle({Nonnull,}GCPtr<T>) overloads
2022-12-15 06:56:37 -05:00
Kyle Lanmon
0991464de6
LibWeb: Implement input range type sanitation algorithm
2022-12-15 09:43:41 +00:00
Kyle Lanmon
c5b953e51b
LibWeb: Implement input local date and time type sanitation algorithm
2022-12-15 09:43:41 +00:00
Kyle Lanmon
a3c4af7a19
LibWeb: Implement input time type sanitation algorithm
2022-12-15 09:43:41 +00:00
Kyle Lanmon
d249a69150
LibWeb: Implement input week type sanitation algorithm
2022-12-15 09:43:41 +00:00
Kyle Lanmon
8197b7a063
LibWeb: Implement input month type sanitation algorithm
2022-12-15 09:43:41 +00:00
Kyle Lanmon
edb3a0aa0a
LibWeb: Implement input date type sanitation algorithm
2022-12-15 09:43:41 +00:00
Kyle Lanmon
dfbc5553f2
LibWeb: Implement input email type sanitation algorithm
2022-12-15 09:43:41 +00:00
Kyle Lanmon
6fa34a4ee3
LibWeb: Implement input color type sanitation algorithm
2022-12-15 09:43:41 +00:00
Max Stevens
3aeb7a41c0
LibWeb: Implement more values of flexbox align-content
...
Implement the values 'space-between' and 'space-around'
of the 'align-content' flexbox property.
The following WPT tests now pass:
- http://wpt.live/css/css-flexbox/align-content-004.htm
- http://wpt.live/css/css-flexbox/align-content-005.htm
2022-12-15 09:27:32 +01:00
Sam Atkins
ab49dbf137
LibWeb: Convert Paintable coordinates to new pixel units
...
This fixes a few sizing issues too. The page size is now correct in most
cases! \o/
We get to remove some of the `to_type<>()` shenanigans, though it
reappears in some other places.
2022-12-14 16:47:57 +00:00
Sam Atkins
57a69f15ff
LibWeb: Remove declarations for LineBoxFragment methods that don't exist
2022-12-14 16:47:57 +00:00
Sam Atkins
1a68a4292d
LibWeb: Convert text and text-decoration painting to new pixel units
...
This does not touch the actual font selection, so the text itself is
still small for now.
2022-12-14 16:47:57 +00:00
Sam Atkins
a72302342a
LibWeb: Convert marker painting to new pixel units
2022-12-14 16:47:57 +00:00
Sam Atkins
fb43a71981
LibWeb: Convert shadow painting to new pixel units
2022-12-14 16:47:57 +00:00
Sam Atkins
9d1f30b533
LibWeb: Convert gradient painting to new pixel units
...
Co-authored-by: MacDue <macdue@dueutil.tech>
2022-12-14 16:47:57 +00:00
Sam Atkins
7c8eecbaa5
LibWeb: Convert backdrop-filter painting to new pixel units
2022-12-14 16:47:57 +00:00
Sam Atkins
0bf4089af9
LibWeb: Convert border painting to new pixel units
2022-12-14 16:47:57 +00:00
Sam Atkins
0233627545
LibWeb: Convert background painting to new pixel units
2022-12-14 16:47:57 +00:00
Sam Atkins
4440af0870
LibWeb: Split PaintContext::viewport_rect() into device/css variants
...
For now, everyone uses `device_viewport_rect()`, until I convert them.
2022-12-14 16:47:57 +00:00
Sam Atkins
0be479dcfb
LibWeb: Make PaintContext aware of CSS and DevicePixels
...
Store the ratio between device and CSS pixels on the PaintContext, so
that it can convert between the two.
Co-authored-by: MacDue <macdue@dueutil.tech>
2022-12-14 16:47:57 +00:00
Sam Atkins
a3298017d6
LibWeb: Only allow DevicePixels operators to work with integers
...
Allowing floats here was causing accidental truncations.
Co-authored-by: MacDue <macdue@dueutil.tech>
2022-12-14 16:47:57 +00:00
Andreas Kling
b005e816a3
LibWeb: Implement Node.isEqualNode() for ProcessingInstruction nodes
2022-12-14 15:21:48 +01:00
Andreas Kling
8b0ace6289
LibWeb: Add Document.createProcessingInstruction()
...
These nodes don't really do anything interesting yet, but let's allow
creating them. :^)
2022-12-14 15:21:48 +01:00
Andreas Kling
bf759ce5e3
LibWeb: Make sure ProcessingInstruction objects have the right prototype
2022-12-14 15:21:48 +01:00
Andreas Kling
de2c302cdb
LibWeb: Implement Node.isEqualNode() for Attr nodes
2022-12-14 15:21:48 +01:00
Andreas Kling
a004d3043f
LibWeb: Implement Node.cloneNode for Attr nodes
2022-12-14 15:21:48 +01:00
Andreas Kling
d5ed07fdc4
LibJS+LibWeb: Remove NonnullGCPtr<T>::operator=(GCPtr<T>) footgun
...
GCPtr can be null so it's not safe to assign it to a NonnullGCPtr unless
you know it to be non-null.
This exposed a number of wrong uses in LibWeb which had to be fixed as
part of this change.
2022-12-14 15:21:15 +01:00