Commit Graph

38780 Commits

Author SHA1 Message Date
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
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
djwisdom
455c0b7794 Ports: Update serenity-theming to e4e2f26 2022-06-12 15:50:46 +01:00
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
35d31dec7e Ports: Add option to disable ccache 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
Timur Sultanov
0a63461341 Kernel: Add s6_addr32 field in in6_addr struct 2022-06-12 00:28:26 +01:00
Daniel Bertalan
d4d6f2d945 Toolchain: Add $arch-pc-serenity-clang symlink
This will allow us to build ports that don't allow the --target and
--sysroot compiler arguments to be specified in $CC/$CXX.
2022-06-11 22:40:23 +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
djwisdom
0daf5cc434 Base: Update Redmond 2000 Theme use Redmond Theme's metrics 2022-06-11 12:20:23 +01:00
MacDue
1dcdcc7efb Kernel/Console: Fix gaps between background glyph color 2022-06-11 12:19:29 +01:00
MacDue
5caf307ec0 WindowServer+MouseSettings: Toggle cursor highlighting with Super+H
Rather than enabling/disabling cursor highlighting by going into mouse
settings, you can now instead toggle it any time with Super+H. Mouse
settings now is only for customising the look of the highlighting.
2022-06-10 23:02:34 +01:00
MacDue
3c2c6790df MouseSettings: Support animated cursors in the highlighting preview 2022-06-10 23:02:34 +01:00
MacDue
ceab9903cd MouseSettings: Avoid rendering artifact on loading highlighting defaults
Occasionally, the top of the preview would have the wrong opacity. This
seems to be solved by updating the widget again a bit after setting
the values.
2022-06-10 23:02:34 +01:00
MacDue
44cd973148 WindowServer+MouseSettings: Make default cursor highlight more visible
A litte smaller, and red with a slightly higher opacity, which
is much easier to make out.
2022-06-10 23:02:34 +01:00
MacDue
d3ed490cb4 WindowServer: Fix the cursor being offset with highlighting enabled 2022-06-10 23:02:34 +01:00
FrHun
fc3fd7212f Run: Use the new DialogButton 2022-06-10 23:02:07 +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
Liav A
20c9e4c05c Kernel/Graphics: Ensure VMWare and VirtualBox EDIDs have manufacturer ID 2022-06-10 22:32:54 +01:00
Liav A
3d36b194d1 Kernel/Graphics: Ensure generic EDID always has correct checksum 2022-06-10 22:32:54 +01:00
Liav A
938d579d16 Kernel/Graphics: Re-organize the DisplayConnector class a bit
Move methods that are overriding the virtual methods in the File class,
to a private access scope in the DisplayConnector class because nobody
tries to access them in any derived class of this class.
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
Karol Kosek
65afa113e5 AK: Make URL ApplicationXWWWFormUrlencoded encoding closer to spec
It was mostly implemented based on a spec note, that described only
allowed characters, but instead of allowing some special characters not
to be escaped, we escaped every special character except those 'new in
this encode set' disallowed characters from the spec definition.
2022-06-10 22:32:29 +01:00
Karol Kosek
9e69a89f8e AK: Append correct number of port characters when serializing a URL
Instead of formatting a port string, it put bytes from stack, using the
port number as a length (so for port 8000 it appended 8000 bytes).
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
redsnout
ae3b9ad69f Calculator: Fix Broken Euler's Number icon
In #14248 a new image was added to represent Euler's Number. Running
optipng on the image results in a smaller file size but causes
calculator to throw the following error message:
Calculator(39:39): Exiting with runtime error: PNGImageDecoderPlugin:
Palette index out of range.

This commit provides a fixed image file.
2022-06-10 22:09:20 +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
MacDue
c2f94b92c4 WindowServer: Fix animated cursor not starting after cursor theme switch
Simply setting m_current_cursor in current_cursor_was_reloaded() does
not setup the cursor animation, that has to be done in change_cursor().

This also fixes the cursor disappearing after switching from an animated
cursor back to a normal one (which was due to it trying to draw a cursor
frame that did not exist).
2022-06-10 20:51:55 +01:00
redsnout
fd641f6f17 Calculator: Replace "Euler's Constant" with "Euler's Number" in menu
This is meant to address #14234 by renaming the "Euler's Constant"
menu item to "Euler's Number". This commit removes the existing
"eulers.png" and replaces with a new "eulers_number.png" for clarity.
2022-06-10 20:03:37 +01:00
Tim Schumacher
5b7bdd589c Tests: Add tests for the LibPthread cleanup handlers 2022-06-10 19:06:46 +01:00
Tim Schumacher
2a27644220 LibPthread: Implement cleanup handlers 2022-06-10 19:06:46 +01:00
Tim Schumacher
b3e0aed91f AK: Add SinglyLinkedList::prepend() 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