Commit graph

34198 commits

Author SHA1 Message Date
Lady Gegga
f6f277debd Base: Add Unicode 15 characters to font Katica Regular 10
Nag Mundari (1E4D0-1E4F9)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-1E4D0.pdf

Geometric Shapes Extended (1F7D9)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-1F780.pdf

Transport and Map Symbols (1F6DC)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-1F680.pdf

CJK Unified Ideographs Extension H (3136B)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-31350.pdf

Symbols and Pictographs Extended-A (1FAAE, 1FABC, 1FA87)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-1FA70.pdf

Alchemical Symbols (1F774-1F776, 1F77B-1F77F)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-1F700.pdf

Latin Extended-G (1DF25-1DF2A)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-1DF00.pdf

Lao (0ECE)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-0E80.pdf

Kannada (0CF3)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-0C80.pdf

Khojki (1123F-11241)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-11200.pdf

Small Kana Extension (1B132, 1B155)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-1B130.pdf

Devanagari Extended-A (11B00-11B09)
https://www.unicode.org/charts/PDF/Unicode-15.0/U150-11B00.pdf
2022-02-13 10:17:16 +01:00
Idan Horowitz
9839a1699f gml-format: Skip writing formatted GML to file if no changes were made
This stops all GML files from appeared under the "Changes not staged
for commit" section of the commit message comment due to the changed
last-modified timestamp of the file.
2022-02-13 02:36:35 +02:00
Idan Horowitz
0a93bf5e7b Meta: Actually run gml-format in CI
Since gml-format is part of Lagom, it must be added to the post-lagom
linters section, or else it won't ever actually run.
2022-02-13 02:36:35 +02:00
Idan Horowitz
c8ab45e79f Userland: Run gml-format
This brings the existing GML files up to spec with the new requirements
2022-02-13 02:36:35 +02:00
Idan Horowitz
4c451422c3 gml-format+Playground: Print GML parsing error on formatting failure 2022-02-13 02:36:35 +02:00
Idan Horowitz
d4f08b3096 LibGUI: Enforce new GML newline and ordering guidelines
Specifically:
 * Properties must precede sub-object declarations.
 * There shouldn't be any newlines in-between properties.
 * There should be a newline in-between each sub-object.
 * Object declarations must include the curly braces.
 * There should be a newline between the properties of an object and
   it's sub-objects.
2022-02-13 02:36:35 +02:00
Andreas Kling
c52dc87a42 LibWeb: Don't crash on unknown CSS display types, fall back to inline
This patch also adds CSS::Display::to_string() so we can log the
unimplemented CSS display value (if you have LIBWEB_CSS_DEBUG enabled).
2022-02-13 01:03:49 +01:00
DerpyCrabs
58ce2dd088 LibWeb: Add stub implementation for Element's getClientRects
getClientRects supposed to return a list of bounding DOMRect
for each box fragment of Element's layout, but most elements have
only one box fragment, so implementing it with getBoundingClientRect
is useful.
2022-02-12 22:43:10 +01:00
DerpyCrabs
2f828231c4 LibWeb: Implement Geometry::DOMRectList
Implement DOMRectList that is used as a return type of
getClientRects functions on Element and Range.
2022-02-12 22:43:10 +01:00
Andreas Kling
0532d7d255 LibWeb: Stop sizing the context root box in formatting contexts
Until now, some formatting contexts (BFC in particular) have been
assigning size to the root box. This is really the responsibility of the
parent formatting context, so let's stop doing it.

To keep position:absolute working, parent formatting contexts now notify
child contexts when the child's root box has been sized. (Note that the
important thing here is for the child root to have its final used height
before it's able to place bottom-relative boxes.)

This breaks flexbox layout in some ways, but we'll have to address those
by improving the spec compliance of FFC.)
2022-02-12 22:30:50 +01:00
Andreas Kling
2f3af71261 LibWeb: Always rebuild stacking context tree during layout
We sometimes had a stale stacking context tree sitting around, causing
incorrect paints until the next full layout invalidation.

Fix this by simply rebuilding the stacking context tree when asked to.
2022-02-12 22:30:50 +01:00
Andreas Kling
40bd2cb611 LibWeb: Move initial containing block setup out of BFC
BFC currently has a number of architectural issues due to it being
responsible for setting the dimensions of the BFC root.

This patch moves the logic for setting up the ICB from BFC to Document.
2022-02-12 22:30:50 +01:00
Andreas Kling
8b8a1449c4 RequestServer: Make value copy of the URL in ensure_connection()
I saw what looked like a UAF of this URL in a RequestServer crash,
and it seems reasonable to make a copy here since we end up passing
them to Core::deferred_invoke().
2022-02-12 22:30:50 +01:00
Andreas Kling
3c108e20a7 PixelPaint: Run gml-format on FilterGallery.gml 2022-02-12 22:30:50 +01:00
Brian Gianforcaro
01cd838a4c Meta: Suppress rule V1076 in PVS-Studio Static Analysis
This rule attempts to flag invisible Unicode characters which would
potentially be used by an attacker to hide code that humans can't see.
https://pvs-studio.com/en/docs/warnings/v1076/

AKA the "Trojan Source" attack: https://arxiv.org/abs/2111.00169

Unfortunately our `LibUnicode` source code contains these hidden
characters as they are part of the Unicode character set that the
library exposes. So we have, and will always have 100s of false
positives.
2022-02-12 19:32:47 +02:00
Luke Wilde
d1c4a94659 LibWeb: Fix comparing current position to quote in Mime Type quote parse
Had a look over this with a fresh head and noticed I was comparing the
current lexer position to the quote character, oops!
2022-02-12 17:13:14 +00:00
Idan Horowitz
497dd5b354 LibWeb: Set response header cookies on redirects
Since we were previously relying on Document::set_cookie in order to
set cookies received as a 'Set-Cookie' response header, we would ignore
any response header cookies in redirect (status code 3xx) responses.

While this behaviour is not strictly enforced in the specification,
most major browsers do set cookies in redirect responses, and some
sites (e.g. Cookie Clicker) rely on this behaviour.

Since cookies are stored per-site and not per-document, this behaviour
is achieved by simply decoupling the cookie set mechanism from it.
2022-02-12 16:15:56 +00:00
Idan Horowitz
5e5b94a7ec LibWeb: Pass cookie string by reference in Document::set_cookie
This string is only taken by const reference internally, so there's no
point in forcing the callers to copy the string.
2022-02-12 16:15:56 +00:00
Idan Horowitz
721a4a0a67 LibWeb: Ignore Location headers unless the response status code is 3xx
As per RFC7231 the Location header field has different meanings for
different response status codes:
For 201 (Created) responses, the Location value refers to the primary
resource created by the request.
For 3xx (Redirection) responses, the Location value refers to the
preferred target resource for automatically redirecting the request.
2022-02-12 16:15:56 +00:00
Sam Atkins
a99d02e14d LibWeb: Add an enum for !important 2022-02-12 16:13:27 +00:00
Linus Groh
c08a52dd97 LibJS: Remove the name prefix for wrapped functions
This is a normative change in the ShadowRealm spec.

See: https://github.com/tc39/proposal-shadowrealm/commit/4ca634a
2022-02-12 16:06:37 +00:00
itskarudo
16aeb8b51d kill: Parse CLI arguments using Arguments.strings
The previous implementation used argv and LibC to parse arguments,
it now uses the Arguments.strings interface to do so.
2022-02-12 10:53:07 -05:00
itskarudo
500098c76d kill: Port to LibMain 2022-02-12 10:53:07 -05:00
Aatos Majava
c23d25d1de FileManager: Add F6 alternate shortcut to "location" action
This mirrors the behaviour in Browser.
2022-02-12 09:06:23 -05:00
Luke Wilde
28f0193d9b LibWeb: Decode XHR text with the specified charset in the MIME type
The MIME type can come from either the Content-Type header in the
response header list, or the overridden MIME type passed into
overrideMimeType()

This is required by Google Maps, which downloads blobs encoded
in x-user-defined format.
2022-02-12 12:53:28 +01:00
Luke Wilde
0e0f98a45e LibTextCodec: Add x-user-defined decoder
It's a pretty simple charset: the bottom 128 bytes (0x00-0x7F) are
standard ASCII, while the top 128 bytes (0x80-0xFF) are mapped to a
portion of the Unicode Private Use Area, specifically 0xF780-0xF7FF.

This is used by Google Maps for certain blobs.
2022-02-12 12:53:28 +01:00
Luke Wilde
835a344337 LibTextCodec: Add decoder function that overrides given decoder on BOM
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.
2022-02-12 12:53:28 +01:00
Luke Wilde
94965ba28d LibTextCodec: Add BOM sniffer
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.
2022-02-12 12:53:28 +01:00
Luke Wilde
4ccade42b7 LibWeb: Implement XMLHttpRequest.overrideMimeType
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.
2022-02-12 12:53:28 +01:00
Luke Wilde
8cfeca5261 LibWeb: Implement spec-compliant MIME type struct and parser
This will be used by XHR to extract the Content-Type MIME type to
retrieve the charset.
2022-02-12 12:53:28 +01:00
Itamar
2903c47ba0 Utilities: Add update-cpp-test-results utility
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.
2022-02-12 11:45:15 +00:00
snooze
e9d3f3793c PixelPaint: Add a preview in FilterGallery
Now FilterGallery shows the preview of the currently selected filter
applied on the currently active layer
2022-02-12 12:21:35 +01:00
Ali Mohammad Pur
44cf3ac60f Ports: Add a citron port
This disables the GC, so the REPL doesn't run, but basic programs do
work.
2022-02-12 12:16:59 +01:00
Ali Mohammad Pur
ae68d1f865 strace: Add a chdir formatter 2022-02-12 12:16:59 +01:00
Ali Mohammad Pur
b0efca5742 Ports: Add a sparsehash port 2022-02-12 12:16:59 +01:00
Ali Mohammad Pur
18f68d1aea LibC: Stub out fmemopen() 2022-02-12 12:16:59 +01:00
Ali Mohammad Pur
aaa52da97d Ports: Add a pre_install hook 2022-02-12 12:16:59 +01:00
Ali Mohammad Pur
99f9860854 LibPthread: Add PTHREAD_CANCELED
This is just the expected return value of pthread_join() when it fails.
2022-02-12 12:16:59 +01:00
serenitydev
8c29cc879d LibWeb: Add support for 'arraybuffer' message types on WebSockets 2022-02-12 12:16:02 +01:00
Liav A
32053e8f25 Kernel: Increase attempts count when waiting before doing i8042 IO
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.
2022-02-12 12:04:31 +01:00
Liav A
0881a7be8d Kernel: Increase delay and attempts count when checking i8042 existence 2022-02-12 12:04:31 +01:00
Itamar
506c13d143 HackStudio: Put the Build directory inside the Serenity repository
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.
2022-02-12 11:51:48 +01:00
Lady Gegga
83688d0610 Base: Add Cypro-Minoan characters to font Katica Regular 10
12F90-12FF2 https://www.unicode.org/charts/PDF/U12F90.pdf
2022-02-12 11:51:32 +01:00
Itamar
8bb4d46676 HackStudio: Only query token information if semantic highlighting is on 2022-02-12 11:24:32 +01:00
Guilherme Gonçalves
a456759d7a LibWeb: Ignore malformed at-rules in CSS parser
Fixes #12405.
2022-02-12 11:24:17 +01:00
electrikmilk
dece108f9a PixelPaint: Implement IconBag to organize icons
Implement IconBag method of organizing menubar icons from Browser.
2022-02-12 11:24:00 +01:00
DerpyCrabs
29078d4d53 LibWebSocket: Don't try to send empty payload inside of frame
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.
2022-02-12 11:12:43 +01:00
DerpyCrabs
e379147f64 LibHTTP: Make reason phrase of HTTP response's status line optional
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.
2022-02-12 02:56:17 +03:30
Gaven Rendell
78ef608a6b Documentation: Add coreutils dep to Alpine Linux build instructions
`build-image-qemu.sh` depends on GNU's version of `du`:

43d706a29e/Meta/build-image-qemu.sh (L47-L48)

Alpine Linux doesn't use that version by default.
2022-02-11 23:24:25 +00:00
Wesley Moore
849f849905 LibHTTP: Remove redundant can_read_without_blocking call
When entering the InBody state LibHTTP performs a
can_read_without_blocking check, which is duplicated immediately
afterwards. This initial call is removed.
2022-02-12 02:53:57 +03:30