Age | Commit message (Collapse) | Author |
|
This functions takes a user-provided decoder and will only use it if no
BOM is in the input.
If there is a BOM, it will ignore the given decoder and instead decode
the input with the appropriate Unicode decoder for the detected BOM.
This is only to be used where it's specifically needed, for example XHR
uses this for compatibility with deployed content. As such, it has an
obnoxious name to discourage usage.
|
|
This takes the input and sniffs it for a BOM. If it has the UTF-8 or
UTF-16BE BOM, it will return their respective decoder. Currently we
don't have a UTF-16LE decoder, so it will assert TODO if it detects
a UTF-16LE BOM. If there is no recognisable BOM, it will return no
decoder.
|
|
This allows you to ignore the Content-Type returned by the server and
always parse the content as if it's the given MIME type.
This will currently be used for allowing you to override the charset
of text responses.
|
|
This will be used by XHR to extract the Content-Type MIME type to
retrieve the charset.
|
|
This is a small utility that updates the target tests results for the
LibCpp parser and preprocessor regression tests.
It's handy to run after changing something in the output of either the
parser or the preprocessor.
|
|
Now FilterGallery shows the preview of the currently selected filter
applied on the currently active layer
|
|
This disables the GC, so the REPL doesn't run, but basic programs do
work.
|
|
|
|
|
|
|
|
|
|
This is just the expected return value of pthread_join() when it fails.
|
|
|
|
Apparently on VirtualBox the keyboard device refused to complete the
reset sequence. With longer delays and more attempts before giving up,
it seems like the problem is gone.
|
|
|
|
Previously, the build directory for building serenity components was a
temporary directory in /tmp which was generated whenever a different
serenity component was built.
Instead of doing that, Hack Studio now simply uses the Build/ directory
inside the Serenity repository, similar to what is done in host builds.
This makes it so we don't re-build when switching back and forth between
different components.
It also makes it easier to inspect the build products.
|
|
12F90-12FF2 https://www.unicode.org/charts/PDF/U12F90.pdf
|
|
|
|
Fixes #12405.
|
|
Implement IconBag method of organizing menubar icons from Browser.
|
|
According to RFC 6455 sections 5.5.2-5.5.3 Ping and Pong frames
can have empty "Application data" that means payload can be of size 0.
This change fixes failed "buffer.size()" assertion inside
of Core::Stream::write_or_error by not trying to send empty payload
in WebSocket::send_frame.
|
|
According to rfc2616 section 6.1 the text of reason phrase is not
defined and can be replaced by server.
Some servers (for example http://linux.org.ru) leave it empty.
This change fixes parsing of HTTP responses with empty reason phrase.
|
|
`build-image-qemu.sh` depends on GNU's version of `du`:
https://github.com/SerenityOS/serenity/blob/43d706a29e6d0ccdacb4907981a27c3bf176d5e8/Meta/build-image-qemu.sh#L47-L48
Alpine Linux doesn't use that version by default.
|
|
When entering the InBody state LibHTTP performs a
can_read_without_blocking check, which is duplicated immediately
afterwards. This initial call is removed.
|
|
When LibHTTP encountered the blank line between the headers and the body
in a HTTP response it made a call the m_socket->can_read_line(). This
ultimately tried to find a newline in the stream. If the response body
was small and did not contain a new line then the request would hang.
The call to m_socket->can_read_line() is removed so that the code is
able to progress into the body reading loop.
|
|
|
|
- padded_rect() -> absolute_padding_box_rect()
- bordered_rect() -> absolute_border_box_rect()
|
|
|
|
Otherwise, modifying the `d` attribute would not cause any visual
changes to the path.
|
|
This is mostly a style thing, but it matches the other APIs.
|
|
This saves copying the string data, since the AttributeParser is always
temporary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The SVG spec describes some path operations using these, so we might as
well have them. :^)
|
|
This is all still quite ad-hoc. Eventually these will both need to
support units (like with CSS Lengths) but for now we can continue only
using numbers.
|
|
I've chosen the name `AttributeParser` since it parses data from
attributes. Rather than duplicate the parsing of numbers and other
basic types, let's make use of this existing parsing code for parsing
the data for `<line>`, `<polyline>`, etc.
|
|
This fits better since it's now used by all SVGGeometryElements.
|
|
From the spec:
> Interface SVGGeometryElement represents SVG elements whose rendering
> is defined by geometry with an equivalent path, and which can be
> filled and stroked. This includes paths and the basic shapes.
- https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
Making them all create an SVGPathBox, and return a Path from get_path(),
means we can implement the "basic shapes" using the path system we
already have. :^)
|
|
|
|
Instead of using ByteBuffer::slice() to carve off the remaining part of
the payload every time we flush a part of it, we now keep a sliding
span (ReadonlyBytes) over it.
|
|
Also add a check to serenity.sh to ensure that the toolchain is new
enough for this feature to work.
|
|
|
|
This version comes with general fixes and, more importantly, introduces
support for the packed RELR relocation format.
|
|
|
|
The DT_RELR relocation is a relatively new relocation encoding designed
to achieve space-efficient relative relocations in PIE programs.
The description of the format is available here:
https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/Pi9aSwwABgAJ
It works by using a bitmap to store the offsets which need to be
relocated. Even entries are *address* entries: they contain an address
(relative to the base of the executable) which needs to be relocated.
Subsequent even entries are *bitmap* entries: "1" bits encode offsets
(in word size increments) relative to the last address entry which need
to be relocated.
This is in contrast to the REL/RELA format, where each entry takes up
2/3 machine words. Certain kinds of relocations store useful data in
that space (like the name of the referenced symbol), so not everything
can be encoded in this format. But as position-independent executables
and shared libraries tend to have a lot of relative relocations, a
specialized encoding for them absolutely makes sense.
The authors of the format suggest an overall 5-20% reduction in the file
size of various programs. Due to our extensive use of dynamic linking
and us not stripping debug info, relative relocations don't make up such
a large portion of the binary's size, so the measurements will tend to
skew to the lower side of the spectrum.
The following measurements were made with the x86-64 Clang toolchain:
- The kernel contains 290989 relocations. Enabling RELR decreased its
size from 30 MiB to 23 MiB.
- LibUnicodeData contains 190262 relocations, almost all of them
relative. Its file size changed from 17 MiB to 13 MiB.
- /bin/WebContent contains 1300 relocations, 66% of which are relative
relocations. With RELR, its size changed from 832 KiB to 812 KiB.
This change was inspired by the following blog post:
https://maskray.me/blog/2021-10-31-relative-relocations-and-relr
|
|
pledge_domains() that takes only one String argument was specifically
added as a shortcut for pledging a single domain. So, it makes sense to
use singular here.
|