Luke Wilde
58f882200c
LibWeb: Add the ability to retrieve a WebGL context from getContext
2022-06-13 21:45:27 +01:00
Luke Wilde
b0c2aee2e4
LibWeb: Introduce the WebGL namespace and add WebGLContextEvent
2022-06-13 21:45:27 +01:00
Luke Wilde
7d1fcb0cb3
LibGPU: Do not load LibSoftGPU via symlink inside Serenity
...
For unknown reasons, unveil() does not work on symlinks. This prevents
it from being used in an unveil environment such as WebContent.
2022-06-13 21:45:27 +01:00
Linus Groh
698062b831
LibJS: Implement Array.prototype.with()
2022-06-13 20:26:54 +01:00
Linus Groh
ae81793f20
LibJS: Implement Array.prototype.toSpliced()
2022-06-13 20:26:54 +01:00
Linus Groh
ce17c868c0
LibJS: Implement Array.prototype.toSorted()
2022-06-13 20:26:54 +01:00
Linus Groh
e4370b7d82
LibJS: Implement Array.prototype.toReversed()
2022-06-13 20:26:54 +01:00
Linus Groh
e2a5a27302
LibJS: Implement the SortIndexedProperties AO
...
Also use it in array_merge_sort() instead of inlining the algorithm.
2022-06-13 20:26:54 +01:00
Linus Groh
5ddf0b0c99
LibJS: Implement the CompareArrayElements AO
2022-06-13 20:26:54 +01:00
Linus Groh
aa5d5bf1c8
LibJS: Remove redundant VM& parameter from array_merge_sort()
...
This is covered by GlobalObject& just fine.
2022-06-13 20:26:54 +01:00
Linus Groh
105c516a78
LibJS: Make array_merge_sort() public
2022-06-13 20:26:54 +01:00
Linus Groh
a4d0a6e1c1
LibJS: Update Array.prototype.group{,ToMap} spec URLs
...
This is an editorial change in the Array Grouping spec.
See: c51cac5
2022-06-13 20:15:56 +01:00
Linus Groh
013e2df858
LibJS: Rename Array.prototype.groupBy{,ToMap} => group{,ToMap}
...
This is a normative change in the Array Grouping spec.
See: 0cf4077
2022-06-13 20:05:24 +01:00
Matthias Zimmerman
c10d48b72c
AK/ByteBuffer+Everywhere: Handle errors in ByteBuffer::slice()
2022-06-13 15:38:51 +01:00
MacDue
c0486f93d4
LibGfx: Optimize rounded rectangle with all radii 50% to single ellipse
...
It's a common pattern on the web to draw a circle/ellipse by setting
the border-radius to 50%. Previously the painter would do a lot of
extra work painting and clipping each corner, this now detects that
case and replaces it with a single call to fill_ellipse().
2022-06-13 12:00:39 +01:00
MacDue
2b40dbfb30
LibWeb: Support elliptical background corners
2022-06-13 09:43:45 +01:00
MacDue
0e7aa1e98c
LibWeb: Add flag to normalize border radii to width only
...
This is needed to avoid issues (such as overlapping curves) for outline
border radii, which do not currently support elliptical corners.
2022-06-13 09:43:45 +01:00
MacDue
28c78b45ca
LibWeb: Keep both horizontal and vertical border radii till painting
2022-06-13 09:43:45 +01:00
MacDue
2366a73474
LibGfx: Support AA rounded rectangles with elliptical borders
2022-06-13 09:43:45 +01:00
Luke Wilde
125a71d36d
LibJS/Bytecode: Define named functions as a variable inside their scope
...
This allows you to recurse into a named function that is stored in a
variable. For example, this would previously print "wrong" instead of
"right":
```js
function g() { console.log("wrong") }
f = function g(i) { if (i !== 1) g(1); else console.log("right"); }
f()
```
2022-06-13 07:13:03 +04:30
Luke Wilde
9ad807d08b
LibJS/Bytecode: Pass contains_direct_call_to_eval into ESFO::create
...
Previously it would pass in `is_arrow_function` as
`contains_direct_call_to_eval`, which broke strict mode propagation in
arrow functions. This makes test-js work without falling apart because
`this` is mysteriously undefined because of the use of arrow functions
inside classes, which are strict mode by default.
2022-06-13 07:13:03 +04:30
Luke Wilde
77f88d00e0
LibJS/Bytecode: Make return;
return undefined
...
Previously it would return whatever was in the accumulator.
2022-06-13 07:13:03 +04:30
Luke Wilde
482a827346
LibJS/Bytecode: Make typeof return "undefined" on unresolvable IDs
...
Previously it would throw instead of returning "undefined" for
`typeof Identifier` if Identifier does not exist.
2022-06-13 07:13:03 +04:30
Luke Wilde
c0fadfb9b7
LibJS/Bytecode: Implement break/continue labels
...
This is done by keeping track of all the labels that apply to a given
break/continue scope alongside their bytecode target. When a
break/continue with a label is generated, we scan from the most inner
scope to the most outer scope looking for the label, performing any
necessary unwinds on the way. Once the label is found, it is then
jumped to.
2022-06-13 07:13:03 +04:30
Andrew Kaster
72066880c6
LibELF: Always use parent object basename for $ORIGIN processing
...
Using the main executable basename produces the wrong $ORIGIN processing
for libraries that are secondary dependencies of the main executable,
or dependencies of an object loaded via dlopen.
2022-06-12 00:28:26 +01:00
Andrew Kaster
64d48bcdc1
LibC: Force default visibility for the _ctype_ symbol
...
When ports compile with -fvisibility=hidden, they can end up with
unresolved references to _ctype_ without passing
-Wl,--allow-shlib-undefined
2022-06-12 00:28:26 +01:00
Andrew Kaster
6ef355739d
LibC: Add public and independent ucontext.h header
2022-06-12 00:28:26 +01:00
Timur Sultanov
15cce56411
LibPthread: Set errno in sem_trywait()
2022-06-12 00:28:26 +01:00
Luke Wilde
c8fa0c3cd7
LibWeb: Hold a strong ref to old_rule in CSSRuleList::remove_a_css_rule
...
Using auto& when indexing an NNRPVector doesn't cause it to hold a
strong reference and is instead just a plain old reference.
If m_rules was the only storage holding a strong reference to old_rule,
we would remove it in step 4 and subsequently UAF it in step 5.
2022-06-11 19:27:09 +01:00
MacDue
d2f0a1d9b1
LibWeb: Paint background border radius antialiased
2022-06-11 17:46:46 +01:00
MacDue
0120c8580f
LibGfx: Clip outside the corners when painting an AA rounded rectangle
2022-06-11 17:46:46 +01:00
MacDue
5bc5c0f31b
LibGfx: Fix rendering of bottom corners in AA rounded rectangle
...
Previously, the left corner was using the right's radius and the
right corner was using the left's. This corrects that.
2022-06-11 17:46:46 +01:00
FrHun
992ff4bd63
LibGUI: Use new DialogButton for consistency
2022-06-10 23:02:07 +01:00
FrHun
4c84e64b2a
LibGUI: Add DialogButton convenience class
...
DialogButton is a small convenience class, that just gives a button to
be used in dialogs for a more consistent look around the system.
2022-06-10 23:02:07 +01:00
Liav A
1a641f9af7
LibEDID: Return "Unknown" string if failed to determine the manufacturer
...
Before of this patch, It happened that the return string could be "@@@",
as a result of doing mathematical addition of ASCII '@' with bits when
decoding the packed manufacturer ID bytes from the EDID.
To avoid this, consider m_legacy_manufacturer_id to be invalid until we
successfully decode the packed bytes.
2022-06-10 22:32:54 +01:00
Karol Kosek
6291821489
LibWeb: Print correct value types in ComponentValue debug string
...
Block and Function names were swapped.
2022-06-10 22:32:29 +01:00
FrHun
c38d3b8520
LibGUI: Fix GML parser command order regression
...
This was previously fixed in #13572 with
546d338639cc090055d0c416a76fc237d06930c8
but regressed in #14251 with
ec40c93300a2b111129adf1a5badecde8c22889f
2022-06-10 22:30:05 +01:00
FrHun
8081a8a5de
LibGUI: Add layout spacer support to GML
...
This is a bit of a hack, but it is an easy way to finally get spacers
into GML.
This will translate well if spacers are later to become child objects of
the continer widget.
2022-06-10 21:26:06 +01:00
FrHun
d1d5602132
LibGUI: Fix crash when clicking on small Scrollbar gutter
...
When a Scrollbar becomes too small to display a scrubber, clicking on
the empty gutter failed the VERIFY. This fixes that oversight.
2022-06-10 20:58:53 +01:00
Tim Schumacher
2a27644220
LibPthread: Implement cleanup handlers
2022-06-10 19:06:46 +01:00
Jelle Raaijmakers
a39c38840e
LibIPC: Make noise when shutting down because of an error
...
Previously, an IPC connection error could shut down the entire process
without giving a hint as to what's wrong. Now, we report that error to
the debug console.
2022-06-10 16:35:05 +01:00
Luke Wilde
d06785a8a4
LibWeb/CSS: Add :focus-within serialisation
2022-06-10 15:25:24 +01:00
Luke Wilde
0ff66b6ed8
LibWeb/CSS: Add :nth-of-type and :nth-last-of-type serialisation
2022-06-10 15:25:24 +01:00
Luke Wilde
210c3795f9
LibWeb: Apply content filter to DNS prefetch and pre-connect
...
Performing DNS prefetch or pre-connect on filtered URLs is wasteful,
as we would block any actual use further down the line.
A bunch of websites perform DNS prefetch and/or pre-connect to trackers
as well, for example:
```
prefetch DNS for 'https://adserver-us.adtech.advertising.com/ '
prefetch DNS for 'https://secure.adnxs.com/ '
prefetch DNS for 'https://bidder.criteo.com/ '
prefetch DNS for 'https://static.criteo.net/ '
prefetch DNS for 'https://cdn.krxd.net/ '
prefetch DNS for 'https://widgets.outbrain.com/ '
prefetch DNS for 'https://images.outbrain.com/ '
prefetch DNS for 'https://log.outbrain.com/
prefetch DNS for 'https://amplifypixel.outbrain.com/ '
prefetch DNS for 'https://odb.outbrain.com/ '
prefetch DNS for 'https://js-sec.indexww.com/ '
prefetch DNS for 'https://as-sec.casalemedia.com/ '
prefetch DNS for 'https://as.casalemedia.com/ '
prefetch DNS for 'https://sofia.trustx.org/ '
prefetch DNS for 'https://c.amazon-adsystem.com/ '
prefetch DNS for 'https://s.amazon-adsystem.com/ '
prefetch DNS for 'https://aax.amazon-adsystem.com/ '
prefetch DNS for 'https://t.teads.tv/ '
prefetch DNS for 'https://beacon.krxd.net/ '
pre-connect to 'https://www.google-analytics.com/ '
pre-connect to 'https://www.googletagmanager.com/ '
```
2022-06-10 12:15:37 +01:00
Linus Groh
4c77575ec5
LibJS: Simplify Temporal unit AOs
...
This is an editorial change in the Temporal spec.
See: 1b3d018
2022-06-10 12:39:11 +02:00
Linus Groh
b9beb2b120
LibJS: Remove unnecessary ToLimitedTemporalDuration AO
...
This is an editorial change in the Temporal spec.
See: c6571f4
2022-06-10 12:39:11 +02:00
Linus Groh
237f537b5c
LibJS: Align DifferenceTemporalInstant with similar AOs
...
This is an editorial change in the Temporal spec.
See: cf9118b
2022-06-10 12:39:11 +02:00
Linus Groh
3bb94dd62e
LibJS: Refactor Temporal parse AOs
...
This is an editorial change in the Temporal spec.
See: 7fe29eb
2022-06-10 12:39:11 +02:00
Linus Groh
86e22abd76
LibJS: Rename DefaultMergeFields to DefaultMergeCalendarFields
...
This is an editorial change in the Temporal spec.
See: 0ee80b2
2022-06-10 12:39:11 +02:00
Linus Groh
125530c71d
LibJS: Mark a call of CreateTemporalDate as infallible
...
This is an editorial change in the Temporal spec.
See: c403d3f
2022-06-10 12:39:11 +02:00