Kenneth Myhra
d53d8cacec
LibWeb: Make factory method of CSS::CSSImportRule fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
ff8495de35
LibWeb: Make factory method of CSS::CSSFontFaceRule fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
471ad7ba01
LibWeb: Make factory method of HTML::MessagePort fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
7ec444047c
LibWeb: Make factory methods of HTML::MessageEvent fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
3d79cdf095
LibWeb: Make factory method of HTML::MessageChannel fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
52e9839d8b
LibWeb: Make factory method of Crypto::SubtleCrypto fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
58af8e2021
LibWeb: Make factory method of Crypto::Crypto fallible
2023-02-18 00:52:47 +01:00
Kenneth Myhra
fb3294863e
LibWeb: Return JS::NonnullGCPtr<StaticRange> instead of StaticRange*
2023-02-18 00:52:47 +01:00
Kenneth Myhra
6516329867
LibWeb: Propagate error in factory method of DOM::StaticRange
2023-02-18 00:52:47 +01:00
Kenneth Myhra
411097002b
LibWeb: Add a method to ExceptionOr to drop error handling
...
This should solely be used to to ignore errors in infallible contexts.
2023-02-18 00:52:47 +01:00
Fausto Tommasi
a24c49c18c
LibRegex: Add to_string method for RegexStringView
2023-02-17 16:32:02 +00:00
FrHun
30309bac1b
LibGUI: Force re-layout on Frame thickness changes
2023-02-17 16:25:57 +00:00
FrHun
cb872f5c9a
LibGUI: Adjust OpacitySlider min size for consistency
...
22 is the size usually used for default widget height, like Buttons and
Labels.
2023-02-17 16:25:57 +00:00
FrHun
f1271c7860
LibGUI: Use calculated_preferred_size for Progressbar default size
2023-02-17 16:25:57 +00:00
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
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
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
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
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
Lucas CHOLLET
b13695c9f4
LibGfx: Add a stream compatible overload of Bitmap::load_from_file()
2023-02-16 10:56:01 +00:00
Lucas CHOLLET
5b6e93f96a
LibCore: Add MappedFile::map_from_file()
...
This method relies on `map_from_fd_and_close()` but takes a `File`
instead of a fd.
2023-02-16 10:56:01 +00:00
Lucas CHOLLET
3a95c8111d
LibCore: Allow MappedFile
to make File
leak its fd
2023-02-16 10:56:01 +00:00