Commit graph

46966 commits

Author SHA1 Message Date
FrHun
6d79d932f9 LibGUI: Implement calculated sizes for Slider 2023-02-17 16:25:57 +00:00
FrHun
caf6dd5680 LibGUI: Implement calculated sizes for ValueSlider 2023-02-17 16:25:57 +00:00
FrHun
b6d45f9c1f LibGUI: Use calculated_preferred_size in SeparatorWidget 2023-02-17 16:25:57 +00:00
MacDue
e2691fcdf2 LibWeb: Always move (Nonnull)RefPtr parameters into StyleValues
This is done for consistency rather than any performance concerns.
2023-02-17 16:22:56 +00:00
MacDue
ac3af6624b LibWeb: Use default equality operators for StyleValues
This removes a load of manually implemented equality operators. This
is done with a little pattern where all properties of a StyleValue are
placed inside a Properties member struct, with a defaulted equality
operator. This is then used to do the actual StyleValue compare.

There is also a CTRP class to avoid manually implementing the virtual
operator==()s for all StyleValues.
2023-02-17 16:22:56 +00:00
MacDue
9337892ce0 LibWeb: Use default equality operators for StyleValue helper structs
Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
2023-02-17 16:22:56 +00:00
kleines Filmröllchen
d00a6ca11f AK+LibWeb: Implement Variant equality operator
And make use of it for CSS StyleValues.
2023-02-17 16:22:56 +00:00
John Bundgaard
7dc874104b WindowServer: Redraw Taskbar on window highlight during switching 2023-02-17 16:18:14 +00:00
John Bundgaard
091dbec295 WindowServer: Show window switcher even if fullscreen window is active 2023-02-17 16:18:14 +00:00
Nico Weber
89a8a198b2 LibGfx: Read embedded ICC profiles in .bmp files
Also add a spec link and slightly more BMP_DEBUG output.
2023-02-17 14:30:34 +00:00
Timothy Flynn
f6503577f6 LibJS: Propagate out-of-memory errors from HostImportModuleDynamically 2023-02-17 09:14:23 -05:00
Timothy Flynn
f98d0acd27 LibJS: Convert Error's constructor and prototype to String 2023-02-17 09:14:23 -05:00
Timothy Flynn
1400a85fae LibJS: Remove unused CodeGenerationError::to_deprecated_string 2023-02-17 09:14:23 -05:00
Timothy Flynn
88814acbd3 LibJS+Everywhere: Convert JS::Error to String
This includes an Error::create overload to create an Error from a UTF-8
StringView. If creating a String from that view fails, the factory will
return an OOM InternalError instead. VM::throw_completion can also make
use of this overload via its perfect forwarding.
2023-02-17 09:14:23 -05:00
Timothy Flynn
153b793638 LibJS: Add a throwable StringBuilder::join method 2023-02-17 09:14:23 -05:00
Timothy Flynn
4d10911f96 LibJS: Pre-allocate the out-of-memory error string on the VM
If we are out of memory, we can't try to allocate a string that could
fail as well. When Error is converted to String, this would result in an
endless OOM-throwing loop. Instead, pre-allocate the string on the VM,
and use it to construct the Error.

Note that as of this commit, the OOM string is still a DeprecatedString.
This is just preporatory for Error's conversion to String.
2023-02-17 09:14:23 -05:00
Timothy Flynn
93ad25fbe5 LibJS: Add to_string definitions to CodeGenerationError and ParserError 2023-02-17 09:14:23 -05:00
Fausto Tommasi
f7458b3e17 LibGUI: Update TextEditor to delete emoji based on gbp cluster
Updated TextDocument and TextEditor to use calls to
`find_grapheme_segmentation_boundary` in order to make "correct-feeling"
deletions on backspace and delete keys being pressed
2023-02-17 07:50:09 -05:00
Lucas CHOLLET
782b1d20f5 LibGfx: Remove Bitmap::load_from_fd_and_close()
The method was only used in `load_from_file(StringView path)` and
replacing it with `load_from_file(NonnullOwnPtr<Core::File>)` is very
straightforward.
2023-02-17 10:36:03 +01:00
Karol Kosek
be717edd33 PixelPaint: Propagate errors from making tool property widgets 2023-02-16 23:36:58 +00:00
Ali Mohammad Pur
b409a40377 LibJS: Actually escape \n|\r|LS|PS when escaping RegExp.source
We were previously encoding them as `\<literal newline>`, which is just
all sorts of wrong :P
2023-02-16 23:32:35 +01:00
Ben Wiederhake
e3f3470a6c Presenter: Fix unintentional U+00A0 codepoint in text
Found using git grep -FIn $'\u00a0'

I just got bit by this type of bug in a different project, and was
wondering whether Serenity has this problem, too. See also:
https://dhwthompson.com/2019/my-favourite-git-commit
2023-02-16 22:07:07 +00:00
Ali Mohammad Pur
bcfbe0fbf7 LibJS: Manually loop over escaped regex pattern instead of ::replace()
This makes it ever-so-slightly faster, but more importantly, it fixes
the bug where a `/\//` regex's `source` property would return `\\/`
("\\\\/") instead of `\/` due to the existing '/' -> '\/' replace()
call.
2023-02-16 21:03:19 +01:00
Ali Mohammad Pur
a8bcb901c0 LibJS: Escape printed strings making them proper string literals
Previously we just printed '"' string-contents '"', which was not a
proper string literal.
2023-02-16 21:03:19 +01:00
Lucas CHOLLET
e8249d735d LibFileSystemAccessClient: Remove the deprecated API
Concerned functions are:
 - try_request_file_read_only_approved_deprecated
 - try_request_file_deprecated
 - try_open_file_deprecated
 - try_save_file_deprecated

It also allows some simplifications in the implementation of the client.
2023-02-16 20:11:52 +01:00
Timothy Flynn
ba40ef1f3a LibJS: Remove Value::to_deprecated_string_without_side_effects 2023-02-16 14:32:22 +01:00
Timothy Flynn
a2f1b80c36 Assistant+Spreadsheet: Convert usages of Value::TDSWOSE to Value::TSWOSE 2023-02-16 14:32:22 +01:00
Timothy Flynn
527edb55ad LibWeb: Convert usages of Value::TDSWOSE to Value::TSWOSE 2023-02-16 14:32:22 +01:00
Timothy Flynn
24e9cea524 LibJS: Convert remaining usages of Value::TDSWOSE to Value::TSWOSE
Note the couple of cases using MUST are just debugging statements.
2023-02-16 14:32:22 +01:00
Timothy Flynn
c17589a402 LibJS: Change Print's print_type helper to accept a StringView
There's no benefit to accepting a fly string, and this will soon be
needed to be used with String.
2023-02-16 14:32:22 +01:00
Timothy Flynn
bb64b49749 LibJS: Remove unused Reference::to_deprecated_string 2023-02-16 14:32:22 +01:00
Timothy Flynn
36d72a7f4c LibJS: Convert CanonicalNumericIndexString to use NumberToString 2023-02-16 14:32:22 +01:00
Timothy Flynn
9a5a4302d9 LibJS: Convert PropertyDescriptor's formatter to String
And generally propagate OOM.
2023-02-16 14:32:22 +01:00
Timothy Flynn
a73b8292ed LbJS: Convert exception-related usages of Value::TDSWOSE to String
TDSWOSE being to_deprecated_string_without_side_effects.
2023-02-16 14:32:22 +01:00
Timothy Flynn
3ffb6d9b5a LibJS: Define Value::to_string_without_side_effects for String 2023-02-16 14:32:22 +01:00
Timothy Flynn
dc4207323b LibJS: Remove the VM parameter from the NumberToString AO
This will be needed by Value::to_string_without_side_effects, which can
be called in contexts without a VM (e.g. in AK::Format specializations).
So to_string_without_side_effects will need to be callable without a VM,
thus NumberToString must be as well.
2023-02-16 14:32:22 +01:00
Timothy Flynn
7a7a649f5b LibJS: Define BigInt::to_string to complement to_deprecated_string 2023-02-16 14:32:22 +01:00
Timothy Flynn
b245300ba1 LibJS+Everywhere: Deprecate Value::to_string_without_side_effects 2023-02-16 14:32:22 +01:00
Karol Baraniecki
7fc7d4f8c6 su: Document the [-c command] option 2023-02-16 12:52:11 +00:00
Karol Baraniecki
040012a196 su: Correct brackets in documentation for the user option
The `<brackets>` syntax usually suggests a required option, while the
`[brackets]` syntax an optional one. `user` is an optional argument.
2023-02-16 12:52:11 +00:00
Karol Baraniecki
3c04d22e38 su: Only check for an interactive tty if a password is actually needed 2023-02-16 12:52:11 +00:00
Karol Baraniecki
a8a5707467 su: Allow to specify a command to be executed by -c
su -c 'echo yeah'
2023-02-16 12:52:11 +00:00
Tim Ledbetter
644a61c318 ImageViewer: Rename "Go Back" and "Go Forward" actions
This commit renames "Go Back" to "Go to Previous" and "Go Forward" to
"Go to Next". This better reflects what the actions do.
2023-02-16 12:26:41 +00:00
Tim Ledbetter
b983dc8807 ImageViewer: Make arrow key shortcuts work
The user can now navigate to the previous and next image using the
left and right arrow keys respectively. These shortcuts were
previously not working.
2023-02-16 12:26:41 +00:00
Ryan Liptak
2a32f8ad42 Base: Improve eye emoji and add mouth emoji
👁️ - U+1FF41 EYE
Add a bit of shadow so that it works better on white backgrounds
👄 - U+1F444 MOUTH
2023-02-16 12:07:21 +00:00
Niko
790f0c98c2 Base: Add some emoji
New:
1F37E fully-qualified     # 🍾 E1.0 bottle with popping cork
1F38D fully-qualified     # 🎍 E0.6 pine decoration
1F960 fully-qualified     # 🥠 E5.0 fortune cookie
1F985 fully-qualified     # 🦅 E3.0 eagle
1FAC5 fully-qualified     # 🫅 E14.0 person with crown

Modified:
1F5FE fully-qualified     # 🗾 E0.6 map of Japan
2023-02-16 12:28:11 +01:00
Nathan Ell
3b446b873e Ports/dos2unix: Update to 7.4.4 2023-02-16 12:27:52 +01:00
Federico Guerinoni
1296aa108b Ladybird: Close tab clicking wheel of the mouse 2023-02-16 11:26:44 +00:00
Lucas CHOLLET
d5f7771039 3DFileViewer: Don't unveil "/home/anon/Documents/3D Models"
Usage of models is now done by `LibFileSystemAccessClient`.
2023-02-16 10:56:01 +00:00
Lucas CHOLLET
851b887cd0 3DFileViewer: Set the window title name in load_file()
This patch allows two things:
 - Factorizing code that was in main and the open action
 - Displaying the full path of non-unveiled paths

Indeed, looking for the path of a fd is not allowed if the file isn't
unveiled. By setting the title in `load_file()` we are actually relying
on the value returned by `LibFSAC` who is actually authorized to
retrieve the entire path.
2023-02-16 10:56:01 +00:00