Commit graph

41673 commits

Author SHA1 Message Date
Nico Weber ff4b912b7c LibGfx: Remove a workaround for clang before 11
This bug has long been fixed.
2022-10-04 23:35:07 +01:00
Andrew Kaster 636602a54e LibWeb: Implement <input type=file> behavior
This includes punting on the actual file picker implementation all the
way out to the PageClient. It's likely that some of the real details
should be implemented somewhere closer, like the BrowsingContext or the
Page, but we'll get there.

For now, this allows https://copy.sh/v86 to load the emulation of the
preselected images all the way until it hits a call to
URL.createObjectURL.
2022-10-04 22:05:14 +02:00
Andrew Kaster ffab9fb44e LibWeb: Add FileList from the FileAPI spec 2022-10-04 22:05:14 +02:00
Andreas Kling 162e4179fc LibWeb: Implement a simple version of Element.scrollIntoView()
We parse the arguments that come in, but since we don't yet track
scrollable overflow, we can't do the full "scroll an element into view"
algorithm. For now, we just call out to the PageClient and ask it to
bring the nearest principal box into the visible viewport.
2022-10-04 21:46:56 +02:00
Andreas Kling 3ca44e2258 BindingsGenerator: Allow the word "inline" in IDL identifiers
This has to be treated carefully since it's a C++ keyword.
2022-10-04 21:30:58 +02:00
Andreas Kling f5844b85ff LibWeb: Let FFC parent context "handle" sizing of child FFC container
When we have nested flexbox layouts within one another, and the child
context wants to call up to the parent context and ask for help with
dimensioning the child flex container, we now simply do nothing.

As far as I can tell, this works out just fine, since the child flex
container will already be dimensioned by the flex layout algorithm.
2022-10-04 21:30:58 +02:00
Andreas Kling 97ca45d9c6 LibWeb: Store HTML tag name token data as FlyString while parsing
This makes checking if a token is a specific tag O(1) instead of O(n).
2022-10-04 21:30:58 +02:00
Andreas Kling d39f4edc99 LibWeb: Avoid a bunch of unnecessary copying in CSS::ComputedValues 2022-10-04 21:30:58 +02:00
Linus Groh 58b0edef7d LibWeb: Remove redundant JS::Value() calls in XMLHttpRequest::response() 2022-10-04 20:05:09 +01:00
Linus Groh 183462acfd LibWeb: Use Infra AO for JSON parsing in XMLHttpRequest::response() 2022-10-04 20:05:09 +01:00
Linus Groh d2e9faf2da LibWeb: Run 'UTF-8 decode' in parse_json_bytes_to_javascript_value() 2022-10-04 20:05:09 +01:00
Linus Groh 0db55693a9 LibWeb: Fix ReadableStream's WEB_PLATFORM_OBJECT() class name 2022-10-04 20:05:09 +01:00
Timothy Flynn 08ce8cb996 Applications: Use title-case for group box titles in settings
Capitalization was quite inconsistent, even amongst single settings
applications. This aligns group box titles to all be title case.
2022-10-04 18:19:45 +01:00
Timothy Flynn 5d15fdd6e6 BrowserSettings: Remove overly verbose dbgln statement
This is a bit much, especially with 850+ filters.
2022-10-04 18:19:45 +01:00
Tobias Christiansen 4fdd916f26 LibGUI: Shade Weekends in a slightly different background color
Now, weekends can finally be displayed in the Calender Widget as they
are supposed to. They even update when the settings are changed!
2022-10-04 12:13:54 -04:00
Tobias Christiansen 170b8cad04 LibGUI: Teach Calendar about the new Config Items
Now the Calendar living in LibGUI knows about FirstDayOfWeekend and
WeekendLength.
2022-10-04 12:13:54 -04:00
Tobias Christiansen eca559d65d CalendarSettings: Add Weekend-specific settings
In some calendars, weekends start on other days than saturday and can
also have different lengths than 2 days. This patch allows you to set
these values, however they don't do anything yet as Serenity's Calendar
doesn't care about Weekends at the moment.
2022-10-04 12:13:54 -04:00
Andreas Kling 2a0a274898 LibWeb: Identify as "Ladybird" instead of "Browser"
Here's a small step towards integrating Ladybird and Browser. We now
identify ourselves as "Ladybird" to websites.
2022-10-04 15:27:04 +02:00
Andreas Kling c48931d15c LibWeb: Only calculate intrinsic size in the desired flex axis
Previously, FlexFormattingContext would calculate intrinsic sizes in
both axes simultaneously, despite only one being needed.

This patch reduces the amount of unnecessary work by only calculating
the requested intrinsic size.
2022-10-04 11:56:59 +02:00
Andreas Kling 4d84e349ae LibWeb: Recreate flex lines before calculating intrinsic cross size
This will allow us to do intrinsic cross sizing without depending on
intrinsic main sizing happening first.
2022-10-04 11:55:58 +02:00
Andreas Kling 181fc6cead LibWeb: Pack flex container from opposite end in *-reverse directions 2022-10-04 09:42:17 +02:00
Andreas Kling b13a8706e1 LibWeb: Make intrinsic heights dependent on available width
After speaking with fantasai at CSSWG about this, it turns out I had
misunderstood intrinsic heights. I originally believed all intrinsic
sizes had to be computed with no influence from the surrounding context.

As it turns out, intrinsic heights *are* influenced by the available
width, since it's needed to determine where lines break.

The APIs for calculating min-content and max-content heights now take
the available width as inputs. This instantly improves layout in many
cases where we'd previously make things way too wide.
2022-10-03 23:49:23 +02:00
Andreas Kling b4f9db84ca LibWeb: Add missing null check while dispatching mouseenter events 2022-10-03 23:49:23 +02:00
Andreas Kling 3408f7a3c5 LibWeb: Get rid of FormattingContext::run_intrinsic_sizing()
Now that we have AvailableSpace, it's actually quite convenient to
simply set up the available space and call run() with that directly.
2022-10-03 23:49:23 +02:00
Kenneth Myhra 1464ce6fbb LibC: Remove stubbed out xattr.h and xattr.cpp
Serenity does not support extended attributes (xattr) and the only port
that needed those were the GLib port. The GLib port has now been updated
to compiled without xattr support.
2022-10-03 22:48:56 +01:00
Kenneth Myhra 8989482293 Ports/glib: Do not flag support for extended attributes (xattr) 2022-10-03 22:48:56 +01:00
Kenneth Myhra 64b46794b9 Ports/glib: Update GLib to version 2.74.0 2022-10-03 22:48:56 +01:00
vl-ms d8b6f38748 Lagom: Change dl to ${CMAKE_DL_LIBS} for portability 2022-10-03 20:36:04 +01:00
Lucas CHOLLET 2ff773a6ba Calculator: Add a Shrinking action
This action allow the user to shrink a number to a finite number of
decimal.
2022-10-03 15:12:47 -04:00
Lucas CHOLLET e3b22c395d Calculator: Add a "Custom" entry to the rounding menu
This entry pop a dialog to ask the user to enter a value. The Calculator
will automatically put itself in this mode if you enter a number with
more digits in the fractional part than the actual maximum length.
2022-10-03 15:12:47 -04:00
Lucas CHOLLET de568f87fd Calculator: Add a Rounding menu
This menu has three actions. Each one of them enable a different level
of rounding: to 0, 2 or 4 digits.
2022-10-03 15:12:47 -04:00
Sam Atkins 164094e161 LibWeb: Bring CSS tokenization preprocessing closer to spec
This is based on an editorial change in the December 2021 version of
SYNTAX-3: https://www.w3.org/TR/2021/CRD-css-syntax-3-20211224/

They named this step "filter code points", so let's use that name.
2022-10-03 17:09:41 +01:00
Sam Atkins 97e174afcd LibWeb: Use the term "ident sequence" instead of "name"
This is an editorial change in the December 2021 version of SYNTAX-3:
https://www.w3.org/TR/2021/CRD-css-syntax-3-20211224/
2022-10-03 17:09:41 +01:00
Timothy Flynn 7cab86ad28 Userland: Unveil /proc/all in applications which require it
These were missed in 7af5eef. It is needed for any application using
e.g. FileSystemAccessServer.
2022-10-03 17:09:21 +01:00
Timothy Flynn 25e0ab3ee4 Userland: Tighten promises by removing 'proc' where it isn't used
This is a partial revert of commit 7af5eef. After 97d15e9, the 'proc'
promise is not needed for operations using getsid().

This also fixes launching several applications in which 7af5eef added
the 'proc' promise only in the second call to pledge().
2022-10-03 17:09:21 +01:00
Andreas Kling 0455af4441 LibWeb: Implement HTMLImageElement.complete
This was fairly straightforward, although a small part had to be ad-hoc
since we don't yet load images through Fetch.

With this, we can now see annotation labels on deskto.ps :^)
2022-10-03 17:22:08 +02:00
Andreas Kling 9749eda09f LibWeb: Dispatch mouseenter and mouseleave events when required
I've left a FIXME here about populating the events with mouse
coordinates, button states, etc. We also need to verify that the
dispatch order either doesn't matter or at least match other engines.
2022-10-03 17:22:08 +02:00
Andreas Kling f260afedb1 LibWeb: Don't add half-leading twice to inline block boxes
Inline-level blocks already have the half-leading applied internally,
so by adding it twice, we were offsetting their baseline by the
half-leading of the line.

This fixes an issue where inline-blocks were vertically offset from
the line they're supposed to sit on.
2022-10-03 17:22:08 +02:00
Nico Weber ffbf5596cd Lagom: Work around gcc codegen bug
Without this, GenerateUnicodeData crashes when run during the build.
With this, `serenity.sh run` brings up a running SerenityOS.
Since GenerateUnicodeData doesn't take a lot of time to run, just
disable optimizations to work around the problem for now.

Works around #15449.
2022-10-03 15:30:51 +01:00
Hendiadyoin1 e0a6ed4bc0 LibWasm: Use String::join in Printer where apropriate 2022-10-03 14:15:46 +01:00
Hendiadyoin1 8a9d4246f1 LibWasm: Use TRY in Module::parse 2022-10-03 14:15:46 +01:00
Timothy Flynn 97d15e9b8f Kernel: Do not require 'proc' promise in getsid() and getpgid()
These only require 'stdio' according to:
https://man.openbsd.org/pledge.2
2022-10-03 13:48:03 +02:00
Liav A 74018be739 Meta: Make x86-64 target the default
This is a preparation to check if our users find noticeable bugs in the
x86-64 target, before we can decide if we want to remove the i686 target
for good.
2022-10-03 11:14:53 +02:00
Liav A 4e0f85432a Kernel/Storage: Remove the ramdisk implementation
Nobody uses this because the x86 prekernel environment is corrupting the
ramdisk image prior to running the actual kernel. In the future we can
ensure that the prekernel doesn't corrupt the ramdisk if we want to
bring support back. In addition to that, we could just use a RAM based
filesystem to load whatever is needed like in Linux, without the need of
additional filesystem driver.

For the mentioned corruption problem, look at issue #9893.
2022-10-03 11:12:35 +02:00
Peter Elliott 37f527be9c Documentation: Change references to uid based sockets to sids 2022-10-03 11:11:29 +02:00
Peter Elliott 7af5eef0dd SystemServer+LoginServer+Userland: Switch to sid-based sockets
This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
  names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.

Userland: Switch over servers to sid based sockets

Userland: Properly pledge and unveil for sid based sockets
2022-10-03 11:11:29 +02:00
Peter Elliott 1df4cc1926 Utilities/logout: Refactor to use Core::SessionManagement::logout 2022-10-03 11:11:29 +02:00
Peter Elliott 2c3caa7e17 LibCore: Create Core::SessionManagement for session management 2022-10-03 11:11:29 +02:00
Peter Elliott 76c67b7ae9 LibCore: Make usernames optional in ProcessStatisticsReader 2022-10-03 11:11:29 +02:00
Peter Elliott 71728f3ea6 LibCore: Add Core::System wrapper for getsid() 2022-10-03 11:11:29 +02:00