summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2021-10-13LibWeb: Add CSS::FlexBasisData::is_definite()Andreas Kling
This will allow some more expressive code in FlexFormattingContext.
2021-10-13LibWeb: Add FFC::flex_container() and use throughoutAndreas Kling
Since FFC is only ever run() on the flex container, we can assume (but verify) that the run box is the flex container and use an accessor throughout. The end result: less parameter passing.
2021-10-13LibWeb: Make FFC line and item vectors members instead of localsAndreas Kling
This gives all member functions access to these vectors without having to pass them as arguments.
2021-10-13LibWeb: Make various function parameters const in FlexFormattingContextAndreas Kling
This is mainly to validate that inputs are treated as inputs only and don't get written to.
2021-10-13LibWeb: Move FFC layout algorithm step 16 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 15 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 14 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 12 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 11 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 8 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 7 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 6 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 5 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 4 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 3 to a separate functionAndreas Kling
2021-10-13LibWeb: Move FFC layout algorithm step 2 into a separate functionAndreas Kling
Determining the available main and cross space is now done by a separate function. The signature is a little bit hairy since this function computes some things that are used by subsequent algorithm steps. Factoring can definitely be improved further.
2021-10-13LibWeb: Turn FlexFormattingContext helper lambdas into member functionsAndreas Kling
Continuing on the quest towards making FlexFormattingContext readable.
2021-10-13LibWeb: Call the FlexFormattingContext context box "flow_container"Andreas Kling
This is what the spec calls it and makes the code much less ambiguous.
2021-10-13LibWeb: Split out FFC's "generate anonymous flex items" to a functionAndreas Kling
Let's begin splitting the FlexFormattingContext layout algorithm into separate functions to make it more manageable.
2021-10-13LibWeb: Fix bogus 'none' values for resolved min-width and min-heightAndreas Kling
In CSS 'none' is not a valid value for min-width or min-height. The fallback resolved value should be 'auto' for them.
2021-10-13LibWeb: CSS display:position does not imply definite sizeAndreas Kling
Per css-sizing-3: Additionally, the size of the containing block of an absolutely positioned element is always definite with respect to that element. As I understand this, it doesn't mean that all absolutely positioned boxes have definite size, but that the containing block of an absolutely positioned descendant has definite size from the perspective of the descendant.
2021-10-13LibC: Use the new pread syscall to implement preadRodrigo Tobar
This new implementation of pread saves two lseek system calls and is thread-safe thanks to it simply forwarding the call to the pread system call.
2021-10-13LibJS: Convert to_object() to ThrowCompletionOrLinus Groh
2021-10-13LibJS: Convert to_primitive() to ThrowCompletionOrLinus Groh
2021-10-13LibJS: Convert to_primitive_string() to ThrowCompletionOrLinus Groh
2021-10-13LibJS: Convert to_utf16_string() to ThrowCompletionOrLinus Groh
2021-10-13LibJS: Convert to_string() to ThrowCompletionOrLinus Groh
Also update get_function_name() to use ThrowCompletionOr, but this is not a standard AO and should be refactored out of existence eventually.
2021-10-12LibWeb: Mark elements for style update after their children changeAndreas Kling
2021-10-12LibWeb: Re-mark nodes as needing style after moving between documentsAndreas Kling
Since style update is driven by Document, moving a node with dirty style from one document to another means that we have to schedule a style update in the new document.
2021-10-12LibWeb: Style update must recurse into nodes with dirty childrenAndreas Kling
It's not enough to only visit nodes which are themselves dirty, we have to also visit those with dirty children.
2021-10-12LibWeb: Remove a bunch of pointless "else" in EventHandlerAndreas Kling
2021-10-12LibWeb: Use strong pointers and null checks in handle_keydown()Andreas Kling
2021-10-12LibWeb: Use strong pointers and null checks in handle_keyup()Andreas Kling
2021-10-12LibWeb: Stop the style/layout update timers after updating style/layoutAndreas Kling
If we had a scheduled update of either of these kind, make sure to cancel it after performing an update. Otherwise we might do a redundant second update with the same results. This could happen if something schedules an async layout, and before it can happen, something requires a sync layout, which we do right away.
2021-10-12LibWeb: Add missing upcalls in HTMLSelectElementAndreas Kling
2021-10-12LibWeb: Add missing upcalls in HTMLInputElementAndreas Kling
We need to call the base class in overrides of inserted() and removed_from(), or things like style invalidation will break.
2021-10-11LibJS+LibWeb: Let WrapperGenerator deal with legacy_null_to_empty_stringLinus Groh
This concept is not present in ECMAScript, and it bothers me every time I see it. It's only used by WrapperGenerator, and even there only relevant in two places, so let's fully remove it from LibJS and use a simple ternary expression instead: cpp_name = js_name.is_null() && legacy_null_to_empty_string ? String::empty() : js_name.to_string(global_object);
2021-10-11LibJS: Make sure queued promise jobs have an execution context when runAndreas Kling
2021-10-11LibWeb: Flexbox: Assume container size before layouting childrenTobias Christiansen
Before layouting the children of a flex container we now either assume the parent's size or the specified size of the container.
2021-10-11LibWeb: Flexbox: Use right margins when direction is columnTobias Christiansen
Previously both branches of the if were the same which is obviously not correct.
2021-10-11LibWeb: Add Event.timeStampAndreas Kling
Note that the value is always 0 for now. Actually initializing the time stamp is left as a FIXME.
2021-10-11LibWeb: Implement PromiseRejectionEventLinus Groh
This paves the way for the rejectionhandled and unhandledrejection events. It's also used by core-js (in browsers, at least) to check whether Promise needs to be polyfilled, so adding it should allow more websites to leverage LibJS's native Promise implementation :^)
2021-10-11LibWeb: Replace heycam.github.io/webidl URLs with webidl.spec.whatwg.orgLinus Groh
Web IDL is now a WHATWG standard and the specification was moved accordingly: https://twitter.com/annevk/status/1445311275026821120 The old URLs now redirect, but let's use canonical ones.
2021-10-11LibWeb: Consider empty fragments the same as whitespace in LineBoxDana Burkart
When computing whether whitespace should be collapsed or not, we have to consider empty fragments, since <br> will produce an empty fragment to force a line break. LineBox::is_empty_or_ends_in_whitespace() is amended to look at the length of the last fragment, and return true if it is 0.
2021-10-11LibJS: Implement Temporal.PlainMonthDay.prototype.toPlainDate()Linus Groh
2021-10-11LibJS: Implement Temporal.PlainYearMonth.prototype.toPlainDate()Linus Groh
2021-10-11LibJS: Implement Temporal.Calendar.prototype.dateUntil()Linus Groh
2021-10-11LibWeb: Stub out a basic ResizeObserver interfaceAndreas Kling
This patch establishes scaffolding for the ResizeObserver API.
2021-10-11LibWeb: Stub out a basic Selection interfaceAndreas Kling
This patch establishes scaffolding for the Selection API.
2021-10-10LibMarkdown: Implement introspection of the document treeBen Wiederhake