Commit Graph

49530 Commits

Author SHA1 Message Date
Sam Atkins
7458cf4231 LibWeb: Check flex longhands first when parsing flex shorthand
Currently, `property_accepts_value()` always returns `true` if the
property is a shorthand. (This is a bug, and should actually be fixed
properly at some point...) This means that all identifiers are caught
here, including `auto`, which should be handled by the `flex-basis`
branch instead.

This works currently because `auto` is a LengthStyleValue, but that's
about to change!
2023-04-19 18:25:18 +02:00
Sam Atkins
6bf5371124 LibWeb: Properly handle auto in StyleProperties::length_percentage()
This relied on `auto` being a LengthStyleValue, which soon will not be
true. :^)
2023-04-19 18:25:18 +02:00
Sam Atkins
22cb74d9ff LibWeb: Properly handle auto when parsing background-size
This code assumed that `auto` was always stored as a LengthStyleValue,
which will not be true in the next commit. (And was not a safe
assumption to make anyway.)
2023-04-19 18:25:18 +02:00
Andreas Kling
8c03d21e95 LibWeb: Fix broken handling of flex: <flex-grow> shorthand
This is a tiny bit messy because:

- The spec says we should expand this to `flex: <flex-grow> 1 0`
- All major engines expand it to `flex: <flex-grow> 1 0%`

Spec bug: https://github.com/w3c/csswg-drafts/issues/5742
2023-04-19 12:07:16 +02:00
Hendiadyoin1
d10e838efd Kernel: Add a FIXME about SD card synchronicity
This is a major bottleneck when booting the system, especially in
non-smp mode.
2023-04-19 10:53:33 +01:00
Hendiadyoin1
863d0ac260 Kernel: Add High Speed support to the SDHC driver
This should not affect boot times on qemu, as that does not use
dynamic transfer delays in its adma code path.
On real hardware this could potentially double the data throughput,
decreasing load times.
2023-04-19 10:53:33 +01:00
Hendiadyoin1
857c9b4558 Kernel: Add basic ADMA2 support to the SD card driver
It only takes ~10s to fully boot with smp enabled!
2023-04-19 10:53:33 +01:00
Hendiadyoin1
daf85732bc Kernel: Make SDHC InterruptStatus a bitfield
A raw accessor was left as a means to use already existing codepaths.
2023-04-19 10:53:33 +01:00
Hendiadyoin1
35ec96fd28 Kernel: Add V4.10 fields to SDHC Command struct
They are not used yet but might become helpful in the future
2023-04-19 10:53:33 +01:00
Hendiadyoin1
fb79b09688 Kernel: Turn SD CapabilitiesRegister into a bit-field 2023-04-19 10:53:33 +01:00
Karol Kosek
7e33857afa WindowServer+LibGUI: Port WindowServer's Menu name to new String 2023-04-19 07:59:54 +02:00
Karol Kosek
51bd9ca037 LibGUI+Userland: Make Menu::*add_submmenu take name using new string 2023-04-19 07:59:54 +02:00
Karol Kosek
969543a847 LibGUI+Userland: Make Window::*add_menu take name using new string 2023-04-19 07:59:54 +02:00
Karol Kosek
60a338758c LibGUI: Port Menubar to new string 2023-04-19 07:59:54 +02:00
Karol Kosek
dccd70385d LibGUI+Browser: Set menu names using the new String class 2023-04-19 07:59:54 +02:00
Karol Kosek
956f4d9205 Userland: Construct Menus with name using the non-deprecated String 2023-04-19 07:59:54 +02:00
Karol Kosek
c4c1df7621 LibGUI: Store Menu names as new String 2023-04-19 07:59:54 +02:00
Timothy Flynn
f8d6a67294 LibWeb: Implement the HTMLMediaElement crossOrigin attribute 2023-04-19 07:57:52 +02:00
Timothy Flynn
7833b321a3 LibWeb: Stub out the HTMLMediaElement buffered attribute
This is needed by https://store.steampowered.com. For now, we return an
empty TimeRanges object.
2023-04-19 07:57:52 +02:00
Timothy Flynn
680a9f748e LibWeb: Stub out the HTML TimeRanges IDL interface
This is used by media elements. Provide a stub for websites which depend
on the interface existing.
2023-04-19 07:57:52 +02:00
Tim Schumacher
6f47c53ff9 Ports: Force patch regeneration after resolving conflicts
Otherwise, the post-conflict state will be used as a reference point,
and no changes will be detected.
2023-04-19 07:53:18 +02:00
Tim Schumacher
fb049d6913 Ports: Don't mangle patches when requiring manual edits
While at it, pass the `--3way` option to give the user something to work
with. Otherwise, Git will just prepare the commit metadata and nothing
else. Note that this has a relatively low chance of working, since the
recorded blob hashes aren't known to a freshly imported repository.
2023-04-19 07:53:18 +02:00
Andreas Kling
ce5a939148 LibWeb: Layout <svg> nested inside <svg>
This is far from perfect, but let's at least make an attempt at laying
out <svg> when encountering it inside another <svg>.

This makes https://awesomekling.substack.com actually load and render
instead of asserting. :^)
2023-04-19 07:52:26 +02:00
Andreas Kling
ec5d5918c4 LibWeb: Make SVG <g> elements generate a SVGGraphicsPaintable
...instead of defaulting to a PaintableBox. This way it gets the same
behavior as other SVG boxes during paint.
2023-04-19 07:52:26 +02:00
Jelle Raaijmakers
0e8ef1b886 LibGfx: Prevent out-of-bounds accumulation in PathRasterizer
Negative accumulation on the right-hand side of the accumulation bitmap
would wrap around to the left, causing a negative start for certain
lines which resulted in horizontal streaks of lower alpha values.
Prevent this by not writing out of bounds :^)

Fixes #18394
2023-04-19 06:05:10 +02:00
Jelle Raaijmakers
8dc55f5fda LibGfx: Clean up PathRasterizer
No functional changes; mainly cleaning up the code style and
simplifying the code so I could understand it better.
2023-04-19 06:05:10 +02:00
Jelle Raaijmakers
8f736be711 LibGfx: Increase tolerance for bezier curves
An oval approximated by quadratic bezier curves ended up with 2048 line
segments when rasterized to a bitmap of around 35 by 35 pixels, which
seems a bit much. :^)

By increasing the tolerance by an order of magnitude, that same oval is
now split up into 512 line segments, which is still more than enough for
a high quality render.
2023-04-19 06:05:10 +02:00
Timothy Flynn
229cc67fee LibWeb: Implement HTMLMediaElement's autoplay attribute 2023-04-18 16:30:02 +02:00
Timothy Flynn
1ffd533ea2 Ladybird: Propagate autoplay settings to the WebContent process 2023-04-18 16:30:02 +02:00
Timothy Flynn
fed2606591 Browser: Propagate autoplay settings to the WebContent process 2023-04-18 16:30:02 +02:00
Timothy Flynn
65283d6879 BrowserSettings: Add a tab to control the Browser's autoplay settings
This adds a checkbox to enable autoplay on all websites (disabled by
default) and a website list to enable autoplay on individual websites
(set to file:// URLs only by default).
2023-04-18 16:30:02 +02:00
Timothy Flynn
7966fc4780 LibWeb+LibWebView+WebContent: Add APIs to manage an autoplay allowlist
The spec defines a Permissions Policy to control some browser behaviors
on a per-origin basis. Management of these permissions live in their own
spec: https://w3c.github.io/webappsec-permissions-policy/

This implements a somewhat ad-hoc Permissions Policy for autoplaying
media elements. We will need to implement the entire policy spec for
this to be more general.
2023-04-18 16:30:02 +02:00
Timothy Flynn
6131e621d6 LibWeb: Render HTMLVideoElement controls when scripting is disabled
The spec recommends exposing the user agent interface when scripting is
disabled on the media element.
2023-04-18 16:30:02 +02:00
Timothy Flynn
19cc1327af LibWeb: Organize LibWeb forwarding header
Alphabetically sort everything (namespaces and forward declarations
within namespaces), and de-duplicate repeated namespaces (namely the
Web namespace appeared twice).
2023-04-18 16:30:02 +02:00
Andreas Kling
0d5e0d27aa LibWeb: Treat unresolvable percentage flex-basis values as 'content'
Per CSS-FLEXBOX-1, we should treat percentage values of flex-basis as
'content' if they resolve against an indefinite size of the flex
container.
2023-04-18 10:06:02 +02:00
Nico Weber
8f988b7bae Meta: Move more common flags to common_compile_options.cmake
For the most part no behavior change, except that we now pass
-Wno-implicit-const-int-float-conversion and -Wno-literal-suffix
only to clang and gcc each in both lagom and serenity builds,
while we previously passed them to both in lagom builds (and
passed them to one each in serenity builds). The former is
a clang flag, the latter a gcc flag, but since we also use
-Wno-unknown-warning-option it doesn't really matter.
2023-04-18 10:05:49 +02:00
thankyouverycool
5872fe6536 SpreadSheet: Use new InputBox features
Rename now uses a compact box and populates the editor with the
old name, and "Add new" now has a comfy icon. Both prevent empty
names.
2023-04-18 10:05:21 +02:00
thankyouverycool
bc8b409a3c FontEditor: Use compact InputBox for Go to Glyph action 2023-04-18 10:05:21 +02:00
thankyouverycool
8d86f2e69f Calculator: Use numeric InputBox for digit rounding and shrinking
Calc was using a bespoke SpinBox dialog which is no longer necessary.
2023-04-18 10:05:21 +02:00
thankyouverycool
a55d2be147 MasterWord: Use numeric InputBox for settings
And use proper ellipses and capitalization in related action text.
2023-04-18 10:05:21 +02:00
thankyouverycool
14072ce8f0 FileManager: Use InputBox icons for file and directory creation
And set a window icon in desktop mode.
2023-04-18 10:05:21 +02:00
thankyouverycool
ca8918f310 LibGUI: Add a numeric input type to InputBox
This should be a more convenient API and a better UX for apps that
want simple integer input from the user.
2023-04-18 10:05:21 +02:00
thankyouverycool
33ccbc9415 LibGUI: Implement calculated_min_size() for SpinBox 2023-04-18 10:05:21 +02:00
thankyouverycool
b66a76f73b LibGUI: Allow SpinBox to set its value with return key
Previously SpinBox did not update on return or changes to the editor.
The widget had to lose focus or be manually incremented. This lets
the editor update on return and now always displays the most recent
clamped value. set_value_from_current_text() will also be useful to
programmatically set SpinBox within layouts whose default buttons
consume return key presses.
2023-04-18 10:05:21 +02:00
thankyouverycool
7c314f3855 LibGUI: Let InputBox display an ImageWidget
InputBox can now be given a bitmap to display alongside its
prompt and editor. Prompts are now optional to allow for
compact dialogs.
2023-04-18 10:05:21 +02:00
thankyouverycool
02a9e5d3f6 LibGUI+Userland: Improve error and font handling for InputBox
Adds fallible factories, ports DeprecatedString, and rebuilds the
layout to accomodate system font changes.
2023-04-18 10:05:21 +02:00
thankyouverycool
9c2bcffe83 LibGUI: Improve calculated_min_size() for single-line TextEditor
TextBox now shrinks to fit the current font based on preferred line
height, maintaining its historical minimum size of 40x22
2023-04-18 10:05:21 +02:00
thankyouverycool
7304556ff2 LibGUI: Add Window::on_font_change() hook 2023-04-18 10:05:21 +02:00
thankyouverycool
b7cac829ae WindowServer: Show complete title when Window is not resizable
Saves Dialogs the trouble of accounting for variable width titles and
makes all unresizable windows more responsive to font changes.
2023-04-18 10:05:21 +02:00
Romain Chardiny
eef07d2f57 ldd: Pledge map_fixed 2023-04-17 19:29:20 -04:00