Sam Atkins
5e54ff1858
LibWeb: Don't assume rect() contents are Tokens
...
This stops `clip: rect({});` from crashing.
2023-11-22 09:45:51 +01:00
Sam Atkins
aba2946b1e
LibWeb: Use ComponentValue::is_function("..."sv) helper
2023-11-22 09:45:51 +01:00
Xexxa
bd8b907f53
Base: Adjust emoji
...
🏂 - U+1F3C2 SNOWBOARDER
Reuse snow colour from U+1F3BF.
🍨 - U+1F368 ICE CREAM
Reuse ice cream colour from U+1F366.
🧨 - U+1F9E8 FIRECRACKER
Make the lit fuse reflect on the firecracker.
🤖 - U+1F916 ROBOT
🗑️ - U+1F5D1 WASTEBASKET
Make shadow more symmetrical.
💂 - U+1F482 GUARD
💂♂️ - U+1F482 U+200D U+2642 MAN GUARD
💂♀️ - U+1F482 U+200D U+2640 WOMAN GUARD
👸 - U+1F478 PRINCESS
Make colors more consistent with U+1F468_U+200D_U+1F9B1.
🐳 - U+1F433 SPOUTING WHALE
Reuse water colour from U+1F3C4_U+200D_U+2642, adjust foam color to
not be #FFFFFF.
🪿 - U+1FABF GOOSE
🍊 - U+1F34A TANGERINE
🍋 - U+1F34B LEMON
🍎 - U+1F34E RED APPLE
🍏 - U+1F34F GREEN APPLE
🎨 - U+1F3A8 ARTIST PALETTE
Add shadow.
🍐 - U+1F350 PEAR
Add shadow, remove unnecessary padding.
🕯️ - U+1F56F CANDLE
Make flame reflect on the candle, remove unnecessary padding.
🐣 - U+1F423 HATCHING CHICK
🍶 - U+1F376 SAKE
💺 - U+1F4BA SEAT
🖍️ - U+1F58D CRAYON
Remove unnecessary padding.
2023-11-21 20:16:06 -05:00
Aliaksandr Kalenik
d9990c6ea9
LibWeb: Remove opacity parameter for DrawScaledBitmap painting command
...
Every usage of this command specifies opacity equal to 1.
2023-11-21 17:00:56 +01:00
Aliaksandr Kalenik
a5cf875e23
LibWeb: Fix typo in FillEllipse painting command name
2023-11-21 17:00:56 +01:00
Aliaksandr Kalenik
790bfd7ef9
LibAccelGfx: Skip glyphs with missing bitmaps
...
Fixes crashing when we can't produce a bitmap for a glyph.
2023-11-21 17:00:56 +01:00
Aliaksandr Kalenik
48faa0e706
LibAccelGfx: Ensure capacity of vertices vector in draw_glyph_run()
2023-11-21 17:00:56 +01:00
Aliaksandr Kalenik
2471f07356
LibWeb: Skip painting of empty borders in GPU painter
2023-11-21 17:00:56 +01:00
Aliaksandr Kalenik
01058dac95
LibWeb: Skip execution of painting commands with empty bounding rect
2023-11-21 17:00:56 +01:00
implicitfield
00c1da8cbc
LibWeb: Support cellpadding
attribute on table
elements
2023-11-21 16:54:02 +01:00
implicitfield
3d1fbcb26b
LibWeb: Support valign
attribute on tr
elements
2023-11-21 16:54:02 +01:00
implicitfield
468b2a5ace
LibWeb: Support size
attribute on font
elements
2023-11-21 16:54:02 +01:00
implicitfield
5df52a5082
LibWeb: Use LibwebLeft and LibwebRight to align table cells
2023-11-21 16:54:02 +01:00
implicitfield
ccea69ad40
LibWeb: Add special handling for text-align when applied to tables
...
This matches what other engines do, and stops table content from being
misaligned.
2023-11-21 16:54:02 +01:00
implicitfield
a54e62bea0
LibWeb: Support align
attribute on table
elements
2023-11-21 16:54:02 +01:00
implicitfield
7a766bdb83
LibWeb: Respect the document's link_color for Linktext identifiers
2023-11-21 16:54:02 +01:00
Nico Weber
ec190baa55
MacPDF: Replace newlines with spaces in outline titles
...
Else, outline items that have newlines in them end up with a weird
vertical offset.
(This does affect the outline item's tooltip, which shows the whole
title. But not having a newline there seems alright, arguably
preferable.)
2023-11-21 10:07:41 +01:00
Nico Weber
e13954410a
MacPDF: Show tooltip with full title on elided outline titles
2023-11-21 10:07:41 +01:00
Nico Weber
fac0a456e6
MacPDF: Use correct encoding for outline titles
...
The title of an OutlineItem is already in UTF-8.
This is currently done in LibPDF's Parser::parse_string(). I think
that's not quite the right place (it shouldn't be done for all strings)
and not done quite right (text strings should convert from
PDFDocEncoding to UTF-8 unless prefixed by an UTF-8 BOM), but even if
that changes, I think we'll keep OutlineItem.title in UTF-8.
2023-11-21 10:07:41 +01:00
Sam Atkins
148f873321
LibWeb: Merge background-position parsing into position code
...
Implemented by adding the extra 3-value syntax as its own case and only
running it when parsing background-position. I'm sure it could be
implemented in a smarter way but this is still a bunch less code than
before. :^)
2023-11-21 01:29:26 +01:00
Sam Atkins
26d6ba6f58
LibWeb: Parse the CSS position type automatically
...
This means `object-position` will no longer incorrectly accept the
3-value background-position syntax.
Remove the now-ambiguous and unused `position` enum while we're at it.
(This enum only existed as a hack.)
2023-11-21 01:29:26 +01:00
Sam Atkins
19da17f07e
LibWeb: Allow calc() in CSS position values
2023-11-21 01:29:26 +01:00
Aliaksandr Kalenik
1b0cc67a28
LibAccelGfx+LibWeb: Add basic push/pop stacking context implementation
...
With basic PushStackingContext and PopStackingContext commands
implementation scrolling works again after changes being made in:
4e04f81626
2023-11-20 23:44:19 +01:00
Aliaksandr Kalenik
2579b01be8
LibAccelGfx: Add missing painter transform applications
...
Adds missing painter's transform to rect in:
- fill_rect_with_rounded_corners()
- fill_rect_with_linear_gradient()
- draw_glyph_run()
- set_clip_rect()
2023-11-20 23:44:19 +01:00
Andreas Kling
cc9de38ea4
LibWeb: Fix null pointer dereference in DOM::Node::remove()
...
Instead of blindly dereferencing m_registered_observer_list, just use
the add_registered_observer() helper.
Fixes #22005
2023-11-20 20:50:53 +01:00
Aliaksandr Kalenik
7320fdc1f5
LibWeb: Implement FillEllipse command for GPU executor
2023-11-20 20:08:41 +01:00
Aliaksandr Kalenik
53c015695e
LibAccelGfx+LibWeb: Implement rounded corners rectangle painting
...
For now corners antialiasing is missing.
2023-11-20 19:35:25 +01:00
david072
0e1bd54896
Shell/PosixParser: Correctly parse the OR_IF token
...
This fixes an unfortunate typo where we would parse the OR_IF token as
an AST::And node. Now, it is parsed into an AST::Or node :^).
2023-11-20 22:02:30 +03:30
Shannon Booth
c5d3ccca00
LibWeb: Port AriaData from DeprecatedString to String
2023-11-20 15:00:19 +01:00
Shannon Booth
6c42de3e8b
LibWeb: Port XMLSerializer from DeprecatedString to String
2023-11-20 15:00:19 +01:00
Shannon Booth
e28fb5c64c
LibWeb: Port Cookie from DeprecatedString to String
2023-11-20 15:00:19 +01:00
Shannon Booth
e3bc8610a9
LibWeb: Port HTMLInputElement from DeprecatedString to String
...
And dealing with the fallout of doing so. I am not 100% sure that it is
safe for us to be treating Strings in the value sanitization algorithm
in all cases as if they are ASCII, but this commit does not change any
existing behaviour there.
2023-11-20 15:00:19 +01:00
Shannon Booth
6c9fffc4c1
LibGfx: Add String variants of Color::to_string*()
2023-11-20 15:00:19 +01:00
Shannon Booth
6aff55d655
LibWeb: Port NavigatorID from DeprecatedString to String
2023-11-20 15:00:19 +01:00
Shannon Booth
0a4586d510
LibWeb: Port HTMLHyperlinkElementUtils from DeprecatedString to String
2023-11-20 15:00:19 +01:00
Aliaksandr Kalenik
9888db1c27
LibWeb: Add basic support for borders painting in GPU executor
...
For now all borders are painted without rounded corners.
2023-11-20 14:59:47 +01:00
Aliaksandr Kalenik
29ff1f67be
LibWeb: Introduce dedicated painting command for borders
...
Currently, in CPU painter, border painting is implemented by building
a Gfx::Path that is filled by Gfx::AntiAliasingPainter. In the GPU
painter, we will likely want to do something different, and with a
special command, it becomes possible.
Also, by making this change, the CPU executor also benefits because now
we can skip building paths for borders that are out of the viewport.
2023-11-20 14:59:47 +01:00
Aliaksandr Kalenik
70353b79af
LibWeb: Change paint_all_borders() to accept only device pixel values
...
By consistently accepting only device pixel values instead of a mix of
CSSPixels and DevicePixels values, we can simplify the implementation
of paint_border() and paint_all_borders().
2023-11-20 14:59:47 +01:00
Simon Wanner
ae8c98104a
LibJS: Cache bytecode executables on the corresponding AST nodes
...
This greatly reduces the number of compilations necessary when functions
declaring local functions are re-executed.
For example Octane/typescript.js goes from 58080 bytecode executables
to 960.
2023-11-20 14:28:16 +01:00
Blake Smith
e346331424
Kernel/FS: Fix check-then-act concurrency bug in FileSystem/Inode
...
When the FileSystem does a sync, it gathers up all the inodes with
dirty metadata into a vector. The inode mutex is not held while
checking the inode dirty bit, which can lead to a kernel panic
due to concurrent inode modifications.
Fixes : #21796
2023-11-20 09:44:29 +01:00
Andreas Kling
2372584b18
LibJS/JIT: Continue to outer finally
before returning
...
Fixes #21854
2023-11-20 09:30:08 +01:00
Andreas Kling
7ee47d81ca
LibWeb: Allocate custom element reactions queue on demand
...
This shrinks most DOM elements by 16 bytes.
2023-11-20 00:39:42 +01:00
Andreas Kling
ac8bb89f50
LibWeb: Allocate list of registered intersection observers on demand
...
This shrinks most DOM elements by 16 bytes.
2023-11-20 00:39:42 +01:00
Andreas Kling
bdac94870c
LibWeb: Convert Element "attribute change steps" from vector to virtual
...
By using a virtual function and overriding it on HTMLSlotElement, we
shrink every DOM element by 24 bytes. :^)
2023-11-20 00:39:42 +01:00
Andreas Kling
aa23a7b58d
LibWeb: Rearrange HTMLElement members to save 8 bytes per instance
2023-11-20 00:39:42 +01:00
Andreas Kling
48dbec8a9e
LibWeb: Allocate storage for pseudo element layout nodes on demand
...
This saves us 64 bytes for every element that doesn't have pseudo
elements associated with it. Which is most of them. :^)
2023-11-20 00:39:42 +01:00
Andreas Kling
37505d9746
LibWeb: Allocate storage for pseudo element custom properties on demand
...
Most elements don't have pseudo elements with CSS custom properties.
By only allocating this data structure when it's used, we can shrink
most elements by 208 bytes each. :^)
2023-11-20 00:39:42 +01:00
Andreas Kling
9edfd5e360
LibWeb: Only allocate DOM::Node registered observer list on demand
...
Most DOM nodes don't have registered mutation observers, so let's put
the metadata about them behind an OwnPtr to save space in the common
case.
Saves 16 bytes per DOM node that doesn't have registered observers.
2023-11-20 00:39:42 +01:00
Andreas Kling
c1fd55ce94
LibWeb: Only allocate EventTarget listener/handler storage on demand
...
This shaves 40 bytes off of all EventTargets that don't actually get
listeners or handlers attached (which is most of them).
2023-11-20 00:39:42 +01:00
Andreas Kling
a71eaefdf6
LibWeb: Make EventTarget::activation_behavior a virtual function
...
(Instead of using an AK::Function on EventTarget). This shaves 48 bytes
off of every EventTarget instance.
2023-11-20 00:39:42 +01:00