Commit graph

38620 commits

Author SHA1 Message Date
Ferhat Geçdoğan
1fa976722a LibCpp: Support "FIXME" for comments 2022-06-14 19:07:00 +01:00
networkException
621349ed14 DisplaySettings: Use absolute path for loading mouse settings icon
This patch fixes DisplaySettings crashing when launching it from a non
root working directory.
2022-06-14 14:57:09 +01:00
MacDue
c9b363de56 LibWeb: Fix regression in painting the 'caret' icon on GitHub
This commit reimplements the (normally) 45 degree (depends on
the widths) connection between to adjacent borders. Which is
needed to paint the 'caret' icon seen in a few buttons on GitHub.

The issue of overlapping pixels while painting this has also
been solved for the 45 degree case (the the most likely case,
the other cases only occur of mixed-with borders).
2022-06-14 14:13:18 +01:00
Andreas Kling
81cca937b1 Meta: Add note to CONTRIBUTING.md about jokes
Jokes don't scale well, and if everyone adds their pet "funny" thing
to the project, we'll just look unserious and goofy.

To avoid that, and maintain a dignified style, let's just have a blanket
ban on jokes and "funny" things in user-facing parts of the system.
2022-06-14 09:20:08 +02:00
Chase Struck
fc8b74f8b4 Base: Add a man-page for pwd(1) 2022-06-13 17:44:54 -07:00
Obinna Ikeh
3d99e83a86 LibJS: Update order of parameters in our is_less_than implementation
This change updates the parameter order of the is_less_than function
signature and calls to match accordingly with the spec
(https://tc39.es/ecma262/#sec-islessthan)
2022-06-13 17:37:11 -07:00
MacDue
4e21835e70 Base: Add an elliptical outline border HTML example 2022-06-14 00:25:12 +01:00
MacDue
9e71fa9aa7 LibWeb: Bring border painting much closer to the spec/other browsers
This commit adds some much nicer border painting, which now supports:

 - Elliptical corners
 - Blending between different border thicknesses, with rounded corners
 - Anti-aliasing

There are some little TODOs left to tackle:

 - Painting the corners with line styles other than solid
 - Blending between colors on the corners (see comments)

The painting requires allocating a small bitmap, that only fits the
corners (so in most cases this is very small).

This bitmap is then cached so for all paints but the first there will
be no further allocations.
2022-06-14 00:25:12 +01:00
MacDue
411a815c3b LibGfx: Add .as_rect() to AntiAliasingPainter::CornerRadius 2022-06-14 00:25:12 +01:00
MacDue
c1798620d9 LibGfx: Support AlphaSubtract blend mode for AA rounded rectangle 2022-06-14 00:25:12 +01:00
Luke Wilde
0805911a93 LibWeb/WebGL: Implement WebGLRenderingContextBase.depthRange() 2022-06-13 21:45:27 +01:00
Luke Wilde
d9ef228c76 LibWeb/WebGL: Implement WebGLRenderingContextBase.lineWidth() 2022-06-13 21:45:27 +01:00
Luke Wilde
a6617e1096 LibWeb/WebGL: Implement error handling and getError() 2022-06-13 21:45:27 +01:00
Luke Wilde
528c7bea03 LibWeb/WebGL: Add WebGLRenderingContextBase.isContextLost() 2022-06-13 21:45:27 +01:00
Luke Wilde
39a212b54f LibWeb/WebGL: Add a bunch of simple forwarding functions
This collection of functions simply check if the context is still
alive, then forward the call to the GL context.
2022-06-13 21:45:27 +01:00
Luke Wilde
aa77c26b60 LibWeb/WebGL: Add extensions APIs to WebGLRenderingContextBase
These currently return nothing, as we don't currently support any WebGL
extensions.
2022-06-13 21:45:27 +01:00
Luke Wilde
076c9772a4 LibWeb: Add ability to present LibGL framebuffer and add clearing 2022-06-13 21:45:27 +01:00
Luke Wilde
68d9d4e247 LibGL: Add ability to retrieve current clear values from GLContext
This allows WebGL to preserve the clear values as it performs an
implicit clear to certain values.
2022-06-13 21:45:27 +01:00
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
Luke Wilde
df2c0588ea LibWeb/IDL: Add support for returning JS::Object from IDL functions 2022-06-13 21:45:27 +01:00
Luke Wilde
a9a9614b6b LibWeb/IDL: Make inner type of typedef inherit nullable attribute 2022-06-13 21:45:27 +01:00
Luke Wilde
85c617fb1c LibWeb/IDL: Add support for returning nullable sequence types 2022-06-13 21:45:27 +01:00
Luke Wilde
633ac53c0c LibWeb/IDL: Add support for optional enums 2022-06-13 21:45:27 +01:00
Luke Wilde
2a27f2293a LibWeb/IDL: Add support for returning dictionaries 2022-06-13 21:45:27 +01:00
Luke Wilde
15f44eecca LibWeb/IDL: Always throw an error if string does not match an enum value
Previously we only threw an error if the enum was used as a function
argument. However, we are supposed to throw an error no matter the
context it is used in.
2022-06-13 21:45:27 +01:00
Luke Wilde
29b0277a71 LibWeb/IDL: Respect type of IDL constants
Previously we ignored the type and cast the value to i32 and then put
it into a JS::Value.
2022-06-13 21:45:27 +01:00
Luke Wilde
98f354cec4 LibWeb/IDL: Implement returning union types from IDL functions 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: https://github.com/tc39/proposal-array-grouping/commit/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: https://github.com/tc39/proposal-array-grouping/commit/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
16c4b606f6 Base: Add some elliptical border radius HTML examples 2022-06-13 09:43:45 +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