Commit graph

37179 commits

Author SHA1 Message Date
Ali Mohammad Pur
bd5403adf1 LibTLS: Mark the underlying stream as nonblock
LibTLS does not want to be blocked.
2022-04-09 12:21:43 +02:00
Jesse Buhagiar
e2f1da8cec Ports: Add quake3 port :^) 2022-04-09 11:40:33 +02:00
Jesse Buhagiar
c08dfe063a LibGL: Add stub for glCopyTexSubImage2D 2022-04-09 11:40:33 +02:00
Jesse Buhagiar
6e9ea2f21f LibGL: Implement glArrayElement 2022-04-09 11:40:33 +02:00
Jesse Buhagiar
85985e2cf4 LibGL: Implement gl_tex_parameterfv
This is the vectorized version of `gl_tex_parameter`, which sets the
parameters of a texture's sampler. We currently only support one single
pname, `GL_TEXTURE_BORDER_COLOR`, which sets the border color of a texel
for if it is sampled outside of a mip-map's range.
2022-04-09 11:40:33 +02:00
Jesse Buhagiar
c509e0c73c LibGL: Add border_color to Sampler2D
We need this to plumb the per-sampler border color into the GPU's
sampler border color
2022-04-09 11:40:33 +02:00
Jesse Buhagiar
b928fdc3ee LibGL: Add stub glClipPlane 2022-04-09 11:40:33 +02:00
Jesse Buhagiar
c9f44c746a LibGL+LibSoftGPU: Add GL_ADD Texture Environment 2022-04-09 11:40:33 +02:00
Lady Gegga
e34f199997 WebServer: Add utf-8 charset to Content-Type header for text/plain 2022-04-09 01:14:14 +02:00
Andreas Kling
45db35ad04 LibWeb: Fix double-sized box model metrics on inline replaced elements
We were mistakenly treating inline replaced elements as if they are the
start of a regular display:inline element. This meant that we collected
the horizontal start and end metrics from the box model, and then added
those to the inline-level item produced by InlineLevelIterator.

This effectively meant that <img>, <svg> and other replaced elements got
double-sized values for margin/border/padding on the left and right
sides. (Which manifested as a mysterious margin around the element.)
2022-04-08 23:12:04 +02:00
Andreas Kling
6e70670e0b LibWeb: Load fonts from style sheet once when sheet is added
Previously, we were running the "load fonts if needed" machine at the
start of every style computation. That was a lot of unnecessary work,
especially on sites with lots of style rules, since we had to traverse
every style sheet to see if any @font-face rules needed loading.

With this patch, we now load fonts once per sheet, right after adding
it to a document's style sheet list.
2022-04-08 21:27:35 +02:00
Andreas Kling
5b72a9cb11 LibWeb: Use paint tree traversal helpers in StackingContext 2022-04-08 20:58:42 +02:00
Andreas Kling
dcbb83a33e LibWeb: Add some basic paint tree traversal helpers
Give the Paintable class some basic helpers for traversing the paint
tree. Note that they actually piggy-back on the layout tree for links
between nodes.
2022-04-08 20:58:42 +02:00
djwisdom
40f090c7e8 Base: Add Ataraxia Bold size 8
Basic Latin
0020-007E

Latin-1 Supplement
00A0-00FF
2022-04-08 20:47:20 +02:00
djwisdom
5142713263 Base: Add Ataraxia Light size 8
Basic Latin
0020-007E

Latin-1 Supplement
00A0-00FF
2022-04-08 20:47:20 +02:00
GeekFiftyFive
832920c003 AK+LibHTTP: Revert prior change to percent encode plus signs
A change was made prior to percent encode plus signs in order to fix an
issue with the Google cookie consent page.

Unforunately, this was treating a symptom of a problem and not the root
cause and is incorrect behavior.
2022-04-08 20:44:49 +02:00
Simon Wanner
a2d89f11d1 LibWeb: Use the correct painter for painting stacking contexts
When cloning the PaintContext we should be using the painter backed by
the bitmap created for this stacking context layer.

Fixes: 54c3053bc3 ("LibWeb: Preserve paint state when painting...")
2022-04-08 20:44:23 +02:00
Simon Wanner
a57bfc2f8c LibWeb: Take already computed height for flex container's auto height
Similar to BlockFormattingContext, FlexFormatting context already
handles height:auto sizing correctly and sets the content_height
correspondingly.
2022-04-08 20:44:23 +02:00
Linus Groh
62185452f0 Kernel: Query OS-enabled CPUID features again at the end of cpu_setup()
For OSPKE this is a no-op as we don't enable PKU yet, but the state of
the OSXSAVE flag might have changed if we enabled XSAVE.
2022-04-08 18:53:42 +01:00
Linus Groh
87aabb5ef7 Kernel: Rename OSPKU CPUID feature flag to OSPKE
Unlike "XSAVE enabled by OS" being indicated by the OSXSAVE flag, in
this case it's "PKU enabled by OS" being indicated by the OSPKE flag.
2022-04-08 18:53:42 +01:00
Idan Horowitz
280e99073b LibGUI: Stop dropping comments between children and end of GML objects
Any left-over comments in the pending_comments vector are now inserted
as sub object children, as these are serialized last and will therefore
show up in their expected location.
2022-04-08 19:19:37 +03:00
Idan Horowitz
40c40b7551 LibGUI: Insert parsed comments in parsing order
We were accidentally reversing the order of consecutive comments when
inserting them as children of the GML object.
2022-04-08 19:19:37 +03:00
Idan Horowitz
c56bc49b70 LibGUI: Remove left-over spammy debug print 2022-04-08 19:19:37 +03:00
Tiaan Louw
678555af97 Kernel: Adjust includes after file reorganization 2022-04-08 15:06:33 +01:00
Oliver Wales
382eacc08e LibWeb: Select correct context menu when right clicking image 2022-04-08 07:59:01 -04:00
Timothy Flynn
84a81dd466 LibJS: Do not throw a TypeError when sorting a detached TypedArray
This is a normative change in the ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/e0c74e1
2022-04-08 11:15:16 +01:00
Timothy Flynn
d04a683f85 test-js: Define detachArrayBuffer global function 2022-04-08 11:15:16 +01:00
Timothy Flynn
13d05403ff LibJS: Move DetachArrayBuffer implementation to the ArrayBuffer object
The spec notes that this AO is unused by ECMA-262, but is provided for
ECMAScript hosts. Move the definition to a common location to allow
test-js to also use it.
2022-04-08 11:15:16 +01:00
stelar7
ce08fae13b Meta: Add fuzzer for Poly1305 2022-04-08 14:02:02 +04:30
stelar7
c237991222 LibCrypto: Add Poly1305 2022-04-08 14:02:02 +04:30
Linus Groh
e109b967a1 LibJS: Make options object const in more Temporal AOs 2022-04-08 00:43:17 +01:00
Linus Groh
2844a2c448 LibJS: Handle undefined options in MergeLargestUnitOption
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/5e161a2
2022-04-08 00:43:17 +01:00
Jelle Raaijmakers
ada4f8d660 Ports: Update Composer to 2.3.4
This fixes some warnings when running with PHP 8.1.
2022-04-08 00:30:26 +01:00
Lady Gegga
3449745117 Base: Change Csilla Bold 10 from proportional-font to fixed width-font
All other Csilla fonts has a fixed width flag.
2022-04-07 23:01:25 +02:00
Sam Atkins
12b8570ce3 LibWeb: Understand the format() part of a @font-face's src
This is used to skip downloading fonts in formats that we don't support.
Currently we only support TTF as far as I am aware.

The parts of a `src` are in a fixed order, unusually, which makes the
parsing more nesty instead of loopy.
2022-04-07 21:20:14 +02:00
Sam Atkins
dbb0b68175 LibWeb: Disallow global CSS keywords in @font-face font-family 2022-04-07 21:20:14 +02:00
Sam Atkins
dbbd6d3508 LibWeb: Parse @font-face unicode-range descriptor 2022-04-07 21:20:14 +02:00
Sam Atkins
ef7d80ced2 LibWeb: Parse <urange> as CSS::UnicodeRange
Like, An+B, this is an old construct that does not fit well with modern
CSS syntax, so things get a bit hairy! We have to determine which
tokens match the grammar for `<urange>`, then turn those back into a
string, and then parse the string differently from normal. Thankfully
the spec describes in detail how to do that. :^)

This is not 100% correct, since we are not using the original source
text (referred to in the spec as the "representation") of the tokens,
but just converting them to strings in a manual, ad-hoc way.
Re-engineering the Tokenizer to keep that original text was too much of
a tangent for today. In any case, we do parse `U+4???`, `U+0-100`,
`U+1234`, and similar, so good enough for now!
2022-04-07 21:20:14 +02:00
Sam Atkins
1f7bf46061 LibWeb: Add CSS::UnicodeRange class
This corresponds to `<urange>` in CSS grammar.
2022-04-07 21:20:14 +02:00
Sam Atkins
802ccc210f LibWeb: Expose Declaration's internals with getters
This is more in line with our style of not accessing `m_foo` fields
directly.
2022-04-07 21:20:14 +02:00
Sam Atkins
611a209756 LibWeb: Rename StyleDeclarationRule -> Declaration
This is the term used in the CSS specs.
2022-04-07 21:20:14 +02:00
Sam Atkins
8b538b1578 LibWeb: Rename StyleComponentValueRule -> ComponentValue
"Component value" is the term used in the spec, and it doesn't conflict
 with any other types, so let's use the shorter name. :^)

Also, this doesn't need to be friends with the Parser any more.
2022-04-07 21:20:14 +02:00
Andreas Kling
17632c3d2d LibGfx: Rename conflicting Quad<T> in PNG loader to Quartet<T>
Quad was conflicting with the new Gfx::Quad, and "Quartet" fits the
naming scheme used in the rest of this file better anyway.
2022-04-07 20:43:35 +02:00
Sahan Fernando
154cb4e368 LibGPU: Don't dlopen using absolute path 2022-04-07 17:11:22 +02:00
Andreas Kling
36d9943d3a LibWeb: Fix logic mistake in CRC2D's default_source_size()
If the source has a bitmap, we should indeed use the bitmap's size
instead of always using the source's own size.
2022-04-07 17:06:02 +02:00
Andreas Kling
cb3a2b347b LibWeb: Support CRC2D.drawImage() with affine transform
Previously, we only remapped the destination rect through the context's
affine transform, but didn't actually paint through it.

This patch fixes that by implementing a very inefficient algorithm for
rasterizing a transformed bitmap. When the context has a plain identity
transform, we bypass this algorithm in favor of calling Gfx::Painter
directly as we did before.

This makes the player character in "Biolab Disaster" able to turn left!
2022-04-07 17:06:02 +02:00
Andreas Kling
3c4bdd7cfa LibWeb: Ignore non-painting layout nodes when hit testing
We currently have to check this because the paint tree hangs from the
layout tree and has no independent means of traversal.
2022-04-07 17:06:02 +02:00
Andreas Kling
85dd891811 LibWeb: Ignore non-painting layout nodes when building stacking contexts 2022-04-07 17:06:02 +02:00
Andreas Kling
2af8bb14d7 LibGfx: Add AffineTransform::map_to_quad(Rect)
Unlike map(Rect) which returns a Rect, mapping a Rect to a Quad allows
us to represent the actual result of mapping all four corners of the
Rect through the matrix.
2022-04-07 17:06:02 +02:00
Andreas Kling
5d8f4ab878 LibGfx: Add Gfx::Quad<T> to represent arbitrary quadrilaterals
This comes with a very barebones API for now. You can ask for the
bounding rect of the quad, and also check if a point is inside of it.
2022-04-07 17:06:02 +02:00