Idan Horowitz
e95470702e
AK: Use string_view() instead of to_string() in Formatter<wchar_t>
...
This let's us avoid a heap allocation.
2022-02-16 22:21:37 +01:00
Idan Horowitz
ccad3d5a39
LibVT: Use StringBuilder::string_view() instead of to_string()
...
This let's us avoid a heap allocation.
2022-02-16 22:21:37 +01:00
Idan Horowitz
b22cb40565
AK: Exclude GenericLexer String APIs from the Kernel
...
These APIs are only used by userland, and String is OOM-infallible,
so let's just ifdef it out of the Kernel.
2022-02-16 22:21:37 +01:00
Idan Horowitz
410183a7b0
LibEDID: Exclude DMT::MonitorTiming::name() from the Kernel
...
This API is only used by userland and it uses infallible Strings, so
let's just ifdef it out of the Kernel.
2022-02-16 22:21:37 +01:00
Idan Horowitz
3219ce3d61
AK: Return KString instead of String from encode_hex in the Kernel
...
This let's us propagate allocation errors from this API.
2022-02-16 22:21:37 +01:00
Idan Horowitz
d296001f3f
LibELF: Exclude sorted symbols APIs from the Kernel
...
These are only used by userland, and are implemented using infallible
Strings, so let's just ifdef them out of the Kernel.
2022-02-16 22:21:37 +01:00
Idan Horowitz
1616460312
LibELF: Exclude MemoryRegionInfo::object_name() from the Kernel
...
This API is only used by userland, and it uses infallible Strings, so
let's just ifdef it out of the Kernel.
2022-02-16 22:21:37 +01:00
Idan Horowitz
7923b3b884
LibEDID: Exclude display_product_{name, serial_number} from the Kernel
...
These APIs return Strings, which are OOM-infallibe, and as such, not
appropriate for Kernel use. Since these APIs are only used by userland
at the moment, we can just ifdef them out of the Kernel.
2022-02-16 22:21:37 +01:00
Idan Horowitz
13f5d1c037
LibEDID: Store manufacturer id instead of allocating on each call
...
This also let's us use a KString instead of a string when we're in the
Kernel, which opens the path for OOM-failure propagation.
2022-02-16 22:21:37 +01:00
Idan Horowitz
4a15ed6164
LibEDID: Store EDID version instead of allocating on each getter call
...
This also let's us use a KString instead of a string when we're in the
Kernel, which opens the path for OOM-failure propagation.
2022-02-16 22:21:37 +01:00
Idan Horowitz
5b572393a9
LibVT: Use NNOP<KString> to store window titles in the Kernel
...
This will allow us to eventually propagate allocation failure.
2022-02-16 22:21:37 +01:00
Idan Horowitz
c8db8d6152
LibCrypto: Exclude class_name() methods from the Kernel
...
These are only used by Userland and contain infallible String
allocations, so let's just ifdef them out of the Kernel.
2022-02-16 22:21:37 +01:00
Idan Horowitz
6959e7f778
LibCrypto: Exclude AESCipher{Block, Key}::to_string() from the Kernel
...
These use infallible Strings and are not actually used in the Kernel,
so let's just ifdef them out for now.
2022-02-16 22:21:37 +01:00
Idan Horowitz
7bd409dbdf
LibELF: Use StringBuilder::string_view() to avoid String allocation
2022-02-16 22:21:37 +01:00
Idan Horowitz
727fbca1a6
LibVT: Use StringBuilder's inline capacity instead of temporary Strings
...
This let's us avoid heap allocations.
2022-02-16 22:21:37 +01:00
Idan Horowitz
316fa0c3f3
AK+Kernel: Specialize Trie for NNOP<KString> and use it in UnveilNode
...
This let's us avoid the infallible String allocations.
2022-02-16 22:21:37 +01:00
Idan Horowitz
0218c62be4
Kernel: Make Process::procfs_get_pledge_stats OOM-fallible
...
We can completely avoid the string allocation by using string_view().
2022-02-16 22:21:37 +01:00
Idan Horowitz
7f44e54ad6
AK+Kernel: Return KString from UUID::to_string() in the Kernel
...
This lets us safely handle allocation failure.
2022-02-16 22:21:37 +01:00
Idan Horowitz
5a5766be2c
Kernel: Remove useless partition UUID length check
...
UUID::to_string() always returns a string of length 36, so this check
can't fail.
2022-02-16 22:21:37 +01:00
Idan Horowitz
9277d2dce2
AK+Kernel: Return KString from MACAddress::to_string() in the Kernel
...
This lets us safely handle allocation failure.
2022-02-16 22:21:37 +01:00
Idan Horowitz
6098ffa120
AK+Kernel: Return KString from IPv4Address::to_string() in the Kernel
...
This lets us safely handle allocation failure.
2022-02-16 22:21:37 +01:00
Idan Horowitz
bc98ad9cc1
CI: Disable compiletime header check
...
This check does not seem to provide a lot of value, and it is pretty
annoying, so let's just disable it for now.
2022-02-16 23:19:50 +02:00
Sam Atkins
53ec2ace23
LibWeb: Explain discrepancy with media-query parsing
...
This had me confused for a while, but I am not smart enough today to
actually fix it properly. :^)
2022-02-16 21:51:15 +01:00
Sam Atkins
8e82544dce
LibWeb: Stop treating undefined lengths as valid
...
When converting this code to use Optional, I accidentally left in the
initialization, so it *always* had a value, and always created a Length
from it. Oops.
2022-02-16 21:51:15 +01:00
Sam Atkins
48edaa2085
LibWeb: Remove content-size hack from SVGFormattingContext
...
Everything functions fine without it. :^)
2022-02-16 21:47:53 +01:00
Sam Atkins
5d2ce68f53
LibWeb: Stop treating all SVG elements as inline
...
This fixes hit testing on SVG elements, with no obvious downsides.
2022-02-16 21:47:53 +01:00
Sam Atkins
aba8774c9c
LibWeb: Give SVG geometry elements a position
...
This makes the selected-in-the-inspector outline appear in the right
place. We take the stroke-width into account when producing the
bounding box, which makes the fit nice and snug. :^)
2022-02-16 21:47:53 +01:00
Sam Atkins
ae93aeb414
LibWeb: Give <svg>
elements a size again
...
This replaces the unused width() and height() methods. The size now
defaults to 100% by 100% as in the spec.
2022-02-16 21:47:53 +01:00
Rafał Babiarz
d159511d85
Base: Add test page for progress bar element
2022-02-16 15:34:08 -05:00
Rafał Babiarz
21e353980f
LibWeb: Add basic implementation of progress bar element
2022-02-16 15:34:08 -05:00
Ali Mohammad Pur
d8388f30c8
Meta: Make the WrapperGenerator generate includes based on imports
...
We no longer include all the things, so each generated IDL file only
depends on the things it actually needs now.
A possible downside is that all IDL files have to explicitly import
their dependencies.
Note that non-IDL dependencies still remain and are injected into all
generated files, this can be resolved later if desired by allowing IDL
files to import headers.
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
a59800b4a0
LibWeb: Add imports to all IDL files that depend on others
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
eccdf4eb4b
LibWasm: Fix validation of if-else blocks
...
We were doing a number of things wrong:
- Switching to the parent context in the else meant that we couldn't
break out of the else section anymore
- We were not validating the resulting values, and so the stack was
in a relatively unknown state after 'else'
This commit fixes these issues :^)
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
385b07dcda
LibWeb: Implement responseType and response for XHR
...
This makes us capable of loading non-utf8 content via XHR.
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
16c0646b9d
LibWeb: Implement a very basic version of TextDecoder
...
We had a very basic implementation of TextEncoder, let's add a
TextDecoder next to that :^)
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
57997ed336
Meta: Support DOMExceptions when invoking IDL getters/setters
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
ce6adf25e5
Meta: Add support for enumerations to the IDL compiler
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
4f2d898a51
LibWasm: Make MemoryInstance allocation fail if initial growth fails
...
...instead of silently ignoring the failure in the constructor.
2022-02-16 22:48:32 +03:30
Ali Mohammad Pur
117ca843bd
LibWeb: Don't check for get().is_empty() in WebAssemblyMemoryConstructor
...
Object.get() does not return empty values, this was causing the
constructed memory object to have a maximum of 0, which failed silently
in the constructor.
2022-02-16 22:48:32 +03:30
Tim Schumacher
bc67264453
Utilities: Add a basic install
utility
2022-02-16 19:51:52 +01:00
Vitaly Dyachkov
b2e6ba8d7f
LibGUI: Make a copy of source_rows before resizing it in sort_mapping()
2022-02-16 19:51:01 +01:00
Timothy Flynn
4f19deb13b
LibWeb: Implement reverse lookup to labels from their labelable nodes
...
This enables, for example, clicking on the check box, dragging the mouse
over to the label, releasing the mouse to act as a click on the check
box.
This was implemented for labels / labelable nodes with the "for"
attribute already. This implements the same for labelable nodes that are
inside the label.
2022-02-16 19:18:57 +01:00
Max Desiatov
4b85866746
Documentation: Add Rosetta/Homebrew macOS note
...
This should prevent a build issue caused by a potential
conflicting zstd installation on M1 Mac.
This was manifested in a linker error when building
the GNU toolchain:
```
Undefined symbols for architecture arm64:
[gcc/build] "_ZSTD_compress", referenced from:
```
2022-02-16 11:29:31 -05:00
Adam Plumb
7a035558e1
LibWeb: Set cursor on mousemove for non-text elements
2022-02-16 15:16:39 +00:00
Michiel Visser
45004022ad
LibProtocol: Fix crash on EOF when using Request::stream_into
...
`Request::stream_into_impl` would call `stream.write_or_error` with a
zero length buffer when EOF was reached. However, the
`Core::Stream::Stream::write_or_error` implementation verifies that the
buffer lenght is non-zero, resulting in a crash. With this change the
zero length buffer is never written to the stream.
2022-02-16 17:28:46 +03:30
Lenny Maiorani
7070713ec8
DevTools: Use default constructors/destructors
...
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-02-16 07:33:15 -05:00
Lady Gegga
84f87a9f76
Base: Add Control Pictures to font Katica Regular 10
...
2400-2426 https://www.unicode.org/charts/PDF/U2400.pdf
2022-02-16 13:25:03 +01:00
Edwin Hoksberg
c646afc26c
LibWeb: Support Element.closest(selectors)
2022-02-16 07:23:27 -05:00
Timothy Flynn
70ede2825e
LibUnicode: Use BCP 47 data to filter valid calendar names
2022-02-16 07:23:07 -05:00
Timothy Flynn
71d86261c3
LibUnicode: Use BCP 47 data to filter valid numbering system names
...
There isn't too much of an effective difference here other than that the
BCP 47 data contains some aliases we would otherwise not handle.
2022-02-16 07:23:07 -05:00