Commit Graph

51124 Commits

Author SHA1 Message Date
Andreas Kling
102b8d717f LibWeb: Set flex-basis to 0% when omitted from flex shorthand
This doesn't match the spec, *but* matches what other engines do, and it
turns out this is required for web compat. (It fixes the menu on MDN.)
2023-06-08 10:05:56 +02:00
Andreas Kling
dd2080c55f LibWeb: Stub out Element.scroll() and Element.scrollTo()
With this, we stop throwing exceptions in a way that makes MDN disappear
and it's now possible to browse MDN in Ladybird. :^)
2023-06-08 10:05:56 +02:00
Andreas Kling
7f90b0cab7 LibWeb: Don't override prototype on generated iterator prototypes
Generated iterator prototypes already have the IteratorPrototype as
their prototype, but we were incorrectly hijacking them and rerouting
to ObjectPrototype.

Regressed in cfe663435e.
2023-06-08 10:05:56 +02:00
Ben Wiederhake
3f1cc7125c CI: Don't run known-failing tests on Aarch
These might be the cause of CI failures.
2023-06-08 10:03:35 +02:00
Timothy Flynn
529546e14f Ladybird: Use the same default new tab page URL as Browser 2023-06-08 07:22:00 +02:00
Timothy Flynn
e7faca4431 Base: Use a relative path to load the new tab page's browser icon
Similar to 59a1a3f463, this is to allow
using this page outside of Serenity.
2023-06-08 07:22:00 +02:00
Timothy Flynn
5a3825b561 Browser+Ladybird+LibWebView: Consolidate title handling in LibWebView
Namely, let's have empty titles behave the same in both Browser and
Ladybird (display the URL).
2023-06-08 07:21:08 +02:00
Timothy Flynn
f2a28e83de LibWeb: Implement the document title attribute closer to the spec
The main differences between our current implementation and the spec
are:

    * The title element need not be a child of the head element.

    * If the title element does not exist, the default value should be
      the empty string - we currently return a null string.

    * We've since added AOs for several of the spec steps here, so we
      do not need to implement those steps inline.
2023-06-08 07:21:08 +02:00
Timothy Flynn
43b3673198 LibWeb: Add an accessor for the document's title element 2023-06-08 07:21:08 +02:00
Timothy Flynn
e8fde316f6 LibWeb: Add spec comments to a couple of Document element getters
The implementations are correct as-is. The spec comments are mostly to
help point out that an upcoming getter (the title element) is currently
accessed incorrectly. It is currently implemented like the head element
and searches the "expected" parent head element for its first title
element; instead it should search the document itself. This incorrect
behavior becomes clearer if all of these elements have spec comments.
2023-06-08 07:21:08 +02:00
Timothy Flynn
efd8176ce3 LibWeb: Convert a couple west-const formattings to east-const 2023-06-08 07:21:08 +02:00
MacDue
7ff6d8d9e2 LibWeb: Remove rounding in CRC2D.stroke_rect()
The new rasterizer can now handle floating point positions nicely so
this rounding can be removed.
2023-06-08 07:17:43 +02:00
MacDue
d259421b69 LibWeb: Allow paint style fills for CRC2D strokes 2023-06-08 07:17:43 +02:00
MacDue
727ff6cf59 LibWeb: Don't use paint styles for solid color CRC2D fills
It is faster to avoid the extra overhead/indirection of paint styles if
possible.
2023-06-08 07:17:43 +02:00
MacDue
87c103e210 LibWeb: Fix typo and slightly tidy CRC2D.fill_rect() 2023-06-08 07:17:43 +02:00
Aliaksandr Kalenik
1c979e0ed7 LibWeb: Resolve percentage padding and margins for grid items in GFC
Adds a second pass to resolve percentage paddings and margins of grid
items after track sizes are known. If resolving percentage paddings
or margins affects tracks sizes then second pass to re-resolve track
sizes might also be needed but I cannot come up with an example to
reproduce that so we can leave it to improve in the future :)
2023-06-08 07:14:47 +02:00
Aliaksandr Kalenik
775742b35d LibWeb: Add support for horizontal margins of grid items in GFC 2023-06-08 07:14:47 +02:00
Tim Ledbetter
cbe5aeb917 LibCore: Ensure exec() keeps a reference to the executable path
When called with `SearchInPath::Yes`, calls to `Core::System::exec()`
would fail. The value returned from
`resolve_executable_from_environment()` was assigned to a StringView,
but the original reference was not kept, causing the StringView to
appear empty.
2023-06-08 00:11:01 +02:00
Aliaksandr Kalenik
0177e4e6ba LibWeb: Consider all spanned tracks while finding extra space in GFC
This fixes the issue when functions that distribute base_size
or growth_limit to tracks only considered *affected* spanned tracks
while calculating left extra that is available for distribution while
indeed it should be just *all* spanned track by specific item that
extra space size.
2023-06-07 19:44:47 +02:00
Aliaksandr Kalenik
3b3ade0b8d LibWeb: Use none as initial value for grid-template-column/rows
This fixes the issue that currently we use "auto" as initial value for
grid-template-column and grid-template-rows although spec says it
should be "none". This makes a lot of difference for these properties
because currently we represent "auto" as a list with one auto-sized
track which means initial value for grid-template-column defines one
"explicit" track while it should define none of them.

This change makes grid-auto-columns/rows be applied to the correct
tracks when initial values is used for grid-template-column/rows.
2023-06-07 14:13:07 +02:00
Emily Trau
675cf43937 Ports: Add lowdown 1.0.2 2023-06-07 13:44:44 +02:00
Ben Wiederhake
6e97dc3633 LibCore: Completely drop IODevice
Finally, the end of our journey to fallible I/O!

Now all that's left to do is to rewrite the code around each and every
.release_value_but_fixme_should_propagate_errors() call. :^)

Closes #17129.
2023-06-07 12:55:00 +02:00
Ben Wiederhake
1e1caed1f7 LibCore: Completely drop DeprecatedFile
DeprecatedFile doesn't properly handle I/O or OOM errors, and only
provides a rudimentary interface to reasonably handle it. We have long
since learned how to do it "properly" with ErrorOr<> and similar
interfaces. See also d43a7eae54.

Note that this leaves behind an invocation to DeprecatedFile in
Ladybird/AndroidPlatform.cpp. However, that part of the system has
compilation errors since at least January, and will get removed or
rewritten as part of issue #19085. Let's not wait for this Android port
to remove this deprecated API.
2023-06-07 12:55:00 +02:00
Ben Wiederhake
c5a89e7e6b LibJS: Remove unused DeprecatedFile include 2023-06-07 12:55:00 +02:00
djwisdom
732bdf07bd Ports: Update serenity-theming use latest commit cd1fd73 2023-06-07 12:35:06 +02:00
Aliaksandr Kalenik
0f1f95da46 LibWeb: Add support for grid items with negative column-start in GFC
This changes grid items position storage type from unsigned to signed
integer so it can represent negative offsets and also updates placement
for grid items with specified column to correctly handle negative
offsets.
2023-06-07 11:37:11 +02:00
Andreas Kling
2c16e8371f LibWeb: Add naive support for {margin,padding}-{block,inline}
Like other logical properties, we just alias these to the LTR TB default
properties for now.
2023-06-07 11:20:42 +02:00
Andi Gallo
af1798dd04 LibWeb: Add support for inset shadows
Also move code for outer shadows to a helper.
2023-06-07 10:14:21 +02:00
Nico Weber
df79a2720b WebP/Lossy+Alpha: Implement filtering_method for ALPH chunk
The spec says "Decoders are not required to use this information in any
specified way" about this field, but that's probably a typo and belongs
in the previous section. At least, images in the wild look wrong
without this, for example
https://fjord.dropboxstatic.com/warp/conversion/dropbox/warp/en-us/dropbox/Integrations_4@2x.png?id=ce8269af-ef1a-460a-8199-65af3dd978a3&output_type=webp

Implementation-wise, this now copies both uncompressed and compressed
data to yet another buffer for processing the alpha, then does
filtering on that buffer, and then copies the filtered alpha data
into the final image. (The RGB data comes from a lossy webp.)
This is a bit wasteful and we could probably manage without that
local copy, but that'd make the code more convoluted, so this is
good enough for now, at least until we've added tests for this case.

No test, because I haven't yet found out how to create images in this
format.
2023-06-07 08:08:52 +02:00
Nico Weber
5793579d84 Revert "WebP: Add optional debugging code for dumping ALPH as standa..."
This reverts commit 7a4dd8ad79aff9e66e8ae31820b41582be0a3a6d.
Having it in git history is enough.
2023-06-07 08:08:52 +02:00
Nico Weber
fc3249a1ca WebP: Add optional debugging code for dumping ALPH as standalone file
We can quickly revert this again, but I thought it'd be nice to have
it in git history for future debugging in this area.
2023-06-07 08:08:52 +02:00
Nico Weber
bf9e730566 WebP: Log error if there is one
Else, WebP files with a broken header just return "Decoding failed"
without any more details. This way, there's some debug logging with
more details.

Maybe we'll want to remove this again since it might lead to duplicate
error messages for files that have their error not in the header.
We'll see how this feels. (But most files don't have any errors, so
it's probably fine.)
2023-06-07 08:08:52 +02:00
Andreas Kling
0c2fcffba3 LibWeb: Make text-shadow inherited in CSS::ComputedValues
CSS text-shadow is an inherited property, so we have to make sure it's
part of the inherited substructure in ComputedValues, otherwise it gets
incorrectly reset in children.
2023-06-07 06:29:59 +02:00
Luke Wilde
42a183720b LibWeb/SVG: Support url() in the stroke attribute
This allows you to draw gradients in strokes, for example.
2023-06-07 06:29:46 +02:00
Luke Wilde
8993a710f8 LibGfx: Make it possible to stroke a path with a paint style 2023-06-07 06:29:46 +02:00
Karol Kosek
1367809142 LibCore: Fix logic deciding when to open files in non-blocking mode
The if statement for setting the O_NONBLOCK flag was written the other
way around, causing Core::File to open files in non-blocking mode, when
we didn't actually specify it.
2023-06-07 01:06:44 +02:00
Monroe Clinton
ff970e9295 mknod: Add option for specifying file permissions 2023-06-07 01:01:58 +02:00
Monroe Clinton
704d289851 mknod: Use ArgsParser for argument parsing 2023-06-07 01:01:58 +02:00
Cubic Love
3bc62b7c7b Base: Update Assistant & Tips-and-Tricks manpages
Update the Assistant manpage with instructions on how to run a command
in Terminal. Reflect this to the Assistant section in Tips-and-Tricks.
Also add instructions for launching applications with arguments.
2023-06-07 00:57:14 +02:00
Cubic Love
c7532cf084 Base: Add 3DFileViewer, CatDog & CertificateSettings manpages
Also update Applications.md to reflect this and some other previously
missing pages.
2023-06-07 00:57:14 +02:00
Simon Danner
d41e6a0451 Base: Add Unicode arrows to Katica Italic 10
2190-4
2023-06-07 00:47:22 +02:00
Karol Kosek
c0be5bc070 dd: Print elapsed time and write speed after copying 2023-06-07 00:45:26 +02:00
Karol Kosek
4020892945 dd: Make status=noxfer still print some statistics 2023-06-07 00:45:26 +02:00
Karol Kosek
2f6c99dce5 dd: Show statistics also after receiving an interrupt signal 2023-06-07 00:45:26 +02:00
Karol Kosek
f12dc8b7f5 SystemMonitor: Ignore unveil error about unexisting HackStudio binary
The minimal build configuration doesn't include HackStudio and
SystemMonitor refused to run after trying to unveil a not exiting file.

This change will just ignore this specific error for this specific file
as if nothing really happened.

The ability to quickly debug a process in HackStudio is not the main
feature of the application and HackStudio itself is rather heavy to be
put in the minimal configuration.

Additionally, I find it unnecessary to disable/hide the 'Debug in
HackStudio' action because build configurations are mostly for testing
purposes anyway. You will get a 'No such file or directory' error in the
console after activating the action though. :^)
2023-06-07 00:35:50 +02:00
Tim Ledbetter
a041f1671c LibC: Ignore signals that don't have a name in getsignalbyname()
This prevents a segfault in `kill` and `killall` when an invalid
signal name is given.
2023-06-07 00:24:09 +02:00
Tim Ledbetter
f0edf00dc0 kill: Parse multi-digit signal numbers correctly 2023-06-07 00:24:09 +02:00
Tim Ledbetter
78fbe28070 kill: Don't show SIGINVAL or SIGCANCEL in the signal list 2023-06-07 00:24:09 +02:00
Tim Ledbetter
2ffdd3e7c1 kill: Don't parse SIGINVAL as signal 0 2023-06-07 00:24:09 +02:00
Tim Ledbetter
c1b3b4d6d8 kill: Replace LibC kill call with LibCore equivalent 2023-06-07 00:24:09 +02:00