summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-10-05LibWeb: Implement 'coarsened shared current time'Linus Groh
2022-10-05LibWeb: Add DOMHighResTimeStamp typedefLinus Groh
2022-10-05LibWeb: Pass status code to ResourceLoader error callback when availableLinus Groh
2022-10-05LibWeb: Prepare to run callback in host_enqueue_promise_job()Linus Groh
...and clean up afterwards, of course. Additionally to preparing to run a script, we also prepare to run a callback here. This matches WebIDL's invoke_callback() / call_user_object_operation() functions, and prevents a crash in host_make_job_callback() when getting the incumbent settings object. Running the following JS no longer crashes after this change: ```js new Promise((resolve) => { setTimeout(resolve, 0); }).then(() => { return Promise.reject(); }); ``` See further discussion/investigation here: https://discord.com/channels/830522505605283862/830525031720943627/995019647214694511 https://discord.com/channels/830522505605283862/830525031720943627/1026824624358576158 https://discord.com/channels/830522505605283862/830525031720943627/1026922985581457458 Many thanks to Luke for doing the hard work here, tracking this down, and suggesting the fix! Co-authored-by: Luke Wilde <lukew@serenityos.org>
2022-10-04AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most placesNico Weber
Doesn't use them in libc headers so that those don't have to pull in AK/Platform.h. AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is defined in clang builds as well.) Using AK_COMPILER_GCC simplifies things some. AK_COMPILER_CLANG isn't as much of a win, other than that it's consistent with AK_COMPILER_GCC.
2022-10-04LibGfx: Remove a workaround for clang before 11Nico Weber
This bug has long been fixed.
2022-10-04LibWeb: Implement <input type=file> behaviorAndrew Kaster
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-04LibWeb: Add FileList from the FileAPI specAndrew Kaster
2022-10-04LibWeb: Implement a simple version of Element.scrollIntoView()Andreas Kling
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-04LibWeb: Let FFC parent context "handle" sizing of child FFC containerAndreas Kling
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-04LibWeb: Store HTML tag name token data as FlyString while parsingAndreas Kling
This makes checking if a token is a specific tag O(1) instead of O(n).
2022-10-04LibWeb: Avoid a bunch of unnecessary copying in CSS::ComputedValuesAndreas Kling
2022-10-04LibWeb: Remove redundant JS::Value() calls in XMLHttpRequest::response()Linus Groh
2022-10-04LibWeb: Use Infra AO for JSON parsing in XMLHttpRequest::response()Linus Groh
2022-10-04LibWeb: Run 'UTF-8 decode' in parse_json_bytes_to_javascript_value()Linus Groh
2022-10-04LibWeb: Fix ReadableStream's WEB_PLATFORM_OBJECT() class nameLinus Groh
2022-10-04Applications: Use title-case for group box titles in settingsTimothy Flynn
Capitalization was quite inconsistent, even amongst single settings applications. This aligns group box titles to all be title case.
2022-10-04BrowserSettings: Remove overly verbose dbgln statementTimothy Flynn
This is a bit much, especially with 850+ filters.
2022-10-04LibGUI: Shade Weekends in a slightly different background colorTobias Christiansen
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-04LibGUI: Teach Calendar about the new Config ItemsTobias Christiansen
Now the Calendar living in LibGUI knows about FirstDayOfWeekend and WeekendLength.
2022-10-04CalendarSettings: Add Weekend-specific settingsTobias Christiansen
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-04LibWeb: Identify as "Ladybird" instead of "Browser"Andreas Kling
Here's a small step towards integrating Ladybird and Browser. We now identify ourselves as "Ladybird" to websites.
2022-10-04LibWeb: Only calculate intrinsic size in the desired flex axisAndreas Kling
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-04LibWeb: Recreate flex lines before calculating intrinsic cross sizeAndreas Kling
This will allow us to do intrinsic cross sizing without depending on intrinsic main sizing happening first.
2022-10-04LibWeb: Pack flex container from opposite end in *-reverse directionsAndreas Kling
2022-10-03LibWeb: Make intrinsic heights dependent on available widthAndreas Kling
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-03LibWeb: Add missing null check while dispatching mouseenter eventsAndreas Kling
2022-10-03LibWeb: Get rid of FormattingContext::run_intrinsic_sizing()Andreas Kling
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-03LibC: Remove stubbed out xattr.h and xattr.cppKenneth Myhra
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-03Calculator: Add a Shrinking actionLucas CHOLLET
This action allow the user to shrink a number to a finite number of decimal.
2022-10-03Calculator: Add a "Custom" entry to the rounding menuLucas CHOLLET
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-03Calculator: Add a Rounding menuLucas CHOLLET
This menu has three actions. Each one of them enable a different level of rounding: to 0, 2 or 4 digits.
2022-10-03LibWeb: Bring CSS tokenization preprocessing closer to specSam Atkins
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-03LibWeb: Use the term "ident sequence" instead of "name"Sam Atkins
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-03Userland: Unveil /proc/all in applications which require itTimothy Flynn
These were missed in 7af5eef. It is needed for any application using e.g. FileSystemAccessServer.
2022-10-03Userland: Tighten promises by removing 'proc' where it isn't usedTimothy Flynn
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-03LibWeb: Implement HTMLImageElement.completeAndreas Kling
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-03LibWeb: Dispatch mouseenter and mouseleave events when requiredAndreas Kling
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-03LibWeb: Don't add half-leading twice to inline block boxesAndreas Kling
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-03LibWasm: Use String::join in Printer where apropriateHendiadyoin1
2022-10-03LibWasm: Use TRY in Module::parseHendiadyoin1
2022-10-03SystemServer+LoginServer+Userland: Switch to sid-based socketsPeter Elliott
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-03Utilities/logout: Refactor to use Core::SessionManagement::logoutPeter Elliott
2022-10-03LibCore: Create Core::SessionManagement for session managementPeter Elliott
2022-10-03LibCore: Make usernames optional in ProcessStatisticsReaderPeter Elliott
2022-10-03LibCore: Add Core::System wrapper for getsid()Peter Elliott
2022-10-03LibWeb: It's AK_OS_MACOS, not AK_OS_MACAndreas Kling
2022-10-02LibJS: Capture promise capability in new_promise_capability() executorLinus Groh
This is how the spec suggests implementing this; we need to be slightly more verbose as our PromiseCapability implementation cannot hold arbitrary JS values. Unfortunately it makes the error message slightly more ambiguous as we no longer expose the non-function value to the outer scope (we could!), but at least we don't UAF the stack allocated values anymore :^)
2022-10-02LibJS: Make PromiseCapability GC-allocatedLinus Groh
A struct with three raw pointers to other GC'd types is a pretty big liability, let's just turn this into a Cell itself. This comes with the additional benefit of being able to capture it in a lambda effortlessly, without having to create handles for individual members.
2022-10-02LibJS: Add Visitor::visit(GCPtr<T>) and Visitor::visit(NonnullGCPtr<T>)Linus Groh
Let's avoid reaching for ptr() as much as possible.