summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-12Kernel: Annotate all `KBuffer` and `DoubleBuffer` with a custom nameTim Schumacher
2022-07-12LibJS: Add test case for %TypedArray%.prototype.toSplicedObinna Ikeh
2022-07-12LibJS: Add %TypedArray%.prototype.toSplicedObinna Ikeh
2022-07-12LibJS: Implement Intl.PluralRules.prototype.selectRangeTimothy Flynn
2022-07-12LibUnicode: Parse and generate per-locale plural rangesTimothy Flynn
2022-07-11LibWeb: Implement all "attributes" mutation records for MutationObserverLuke Wilde
2022-07-11LibWeb: Implement "characterData" mutation record for MutationObserverLuke Wilde
2022-07-11LibWeb: Implement all "childList" mutation records for MutationObserverLuke Wilde
2022-07-11LibWeb: Introduce Mutation{Record,Observer} and observer microtasksLuke Wilde
2022-07-11LibWeb: Wrap DOM::Attribute in NodeWrapperFactoryLuke Wilde
2022-07-11LibWeb: Implement CharacterData.{append,insert,delete}DataLuke Wilde
2022-07-11LibWeb: Implement CharacterData::set_data in terms of replace_dataLuke Wilde
This makes it so that it always queues a mutation record, even if `data` is set to the same value. It also makes it follow the spec steps.
2022-07-11LibWeb: Allow creating a StaticNodeList without an r-value VectorLuke Wilde
It must accept taking a copy for DocumentFragment mutation records and empty vectors created in-place.
2022-07-11LibWeb/IDL: Add support for optional sequencesLuke Wilde
2022-07-11LibWeb: Honor preferred size as intrinsic cross size of flex itemsAndreas Kling
I'm not 100% sure this is on-spec, but it seems to me that flex items that have a specified non-auto cross size should honor that value in its min-content and max-contribution.
2022-07-11LibWeb: Implement step 9.2.3 of the flexbox layout algorithmAndreas Kling
When sizing the flex container under a min-content or a max-content constraint, flex items with a used flex basis of "content" should be sized under the same constraint.
2022-07-11LibWeb: Stop putting the FormattingState nodes in a slow hash mapAndreas Kling
Instead, put them in a Vector<OwnPtr<NodeState>>. Each layout node has a unique index into the vector. It's a simple serial ID assigned during layout tree construction. Every new layout restarts the sequence at 0 for the next ICB. This is a huge layout speed improvement on all content.
2022-07-11LibWeb: Tweak padding on button elements match other enginesAndreas Kling
2022-07-11LibWeb: Bring sizing of replaced elements closer to specAndreas Kling
We were prematurely resolving the computed size values, which meant that `auto` values were swallowed before we could resolve them via the intrinsic aspect ratio (if present)
2022-07-11LibWeb: Match WebKit and Blink re: absence of width/height on <svg>Andreas Kling
2022-07-11LibWeb: Try to work out the intrinsic size of <svg> elementsAndreas Kling
If the `width` and `height` attributes are provided, we derive the intrinsic size and ratio from them. Otherwise, we trace a rectangle around the geometry elements inside the SVG and use the size of that as the intrinsic size. This is definitely far from correct, but is still a much better guess at the intrinsic size than nothing.
2022-07-11LibWeb: Set 1:1 intrinsic aspect ratio for radio buttonsAndreas Kling
2022-07-11LibWeb: Cache reference to <svg> element in SVGFormattingContextAndreas Kling
2022-07-11LibWeb: Use the *outer* flex base size in intrinsic size calculationAndreas Kling
2022-07-11LibWeb: Use the "scaled flex shrink factor" where noted by the specAndreas Kling
2022-07-11LibWeb: Treat "flex-basis: 0px" like any other definite basis valueAndreas Kling
2022-07-11LibWeb: More specialization of intrinsic sizing layoutAndreas Kling
This patch adds a separate entry point for this kind of layout. We override it in BFC to set up initial width/height values for the BFC root block. Resulting dimensions are assigned as content_width and content_height at the end of intrinsic sizing, for each axis, if it's either "auto" or there's a min-content or max-content constraint in effect.
2022-07-11LibWeb: Don't iterate over text content inside replaced elementsAndreas Kling
This fixes an issue where whitespace inside embedded <svg> elements would create unexpected whitespace text content on the page. When combined with something like `white-space: pre-wrap`, it ended up generating a lot of surprising vertical offsets.
2022-07-11LibWeb: Use max-content main size for flex items w/ definite cross sizeAndreas Kling
If the main size is indefinite, that is.
2022-07-11LibWeb: Make sure we always apply size constraints in IFCAndreas Kling
Pre-compute the effective containing block width in the IFC constructor and use that throughout.
2022-07-11LibWeb: Cache a pointer to the containing block state in IFCAndreas Kling
2022-07-11LibWeb: Factor out BFC "layout this block-level box" to a functionAndreas Kling
2022-07-11LibWeb: Express intrinsic size layout via size constraintsAndreas Kling
Previously, we had three layout modes: - Normal: - Everything uses the computed values from CSS. - MinContent: - Containing blocks act as if they have 0 width. - All line breaking opportunities are taken. - MaxContent: - Containing blocks act as if they have infinite width. - Only forced line breaks are accepted. The above was based on a set of misunderstandings of CSS sizing. A major problem with the above was that *all* containing blocks behaved differently during intrinsic size layout, not just the relevant one. With this patch there are only two layout modes: - Normal: - Everything uses the computed values from CSS. - IntrinsicSizeDetermination: - One or more boxes have size constraints applied. There are two size constraints per layout box, set here: - FormattingState::NodeState::width_constraint - FormattingState::NodeState::height_constraint They are of type SizeConstraint and can be one of None, MinContent, or MaxContent. The default is None. When performing an IntrinsicSizeDetermination layout, we now assign a size constraint to the box we're trying to determine the intrinsic size of, which is then honored by using two new helpers to query the dimensions of containing blocks: - FormattingContext::containing_block_width_for(Box) - FormattingContext::containing_block_height_for(Box) If there's a relevant constraint in effect on the Box, the size of its containing block is adjusted accordingly. This is essentially an implementation of the "available space" constraints from CSS-SIZING-3. I'm sure some things will break from this, and we'll have to deal with that separately. Spec: https://drafts.csswg.org/css-sizing-3/#available
2022-07-11LibWeb: Move IFC result measurement from IFC to BFCAndreas Kling
Before this change, IFC would first generate all of its line boxes and then measure them. It would then write some of the values into the state of the IFC's containing block. We now move that up to BFC::layout_inline_children() instead, which is a much more natural place to decide metrics for the block.
2022-07-11LibWeb: Make BFC always drive IFCAndreas Kling
Instead of allowing FormattingContext to instantiate an IFC for anything that has inline children, move this logic to BFC. This is fine, since only BFC deals with blocks having inline children anyway.
2022-07-11LibWeb: Add FFC helpers for getting intrinsic size of flex itemsAndreas Kling
2022-07-11LibWeb: Only perform the requested form of intrinsic size calculationAndreas Kling
Before, querying any of the four intrinsic sizes would cause us to calculate all of them (the four being min-content width/height, and max-content width/height). Now, the helper functions only calculate the specific intrinsic size requested. It's then cached at the root formatting context level, so that it's never calculated twice within the same layout pass.
2022-07-11LibWeb: Make separate functions for calculating min/max content sizesAndreas Kling
At first, these are just wrappers around calculate_intrinsic_sizes(). Eventually, we'll make them do only the work necessary for their specific size.
2022-07-11LibWeb: Clamp intrinsic flex item main size contributions to min/maxAndreas Kling
2022-07-11Base: Improve visibility of PlaceholderText in themesKarol Kosek
2022-07-11HexEditor: Gray-out null bytesKarol Kosek
This should improve an overall visibility of "meaningful" data. :^)
2022-07-11Kernel: Stop committing pages for COW of uncommitted pages on sys$forkIdan Horowitz
Uncommitted pages (shared zero pages) can not contain any existing data and can not be modified, so there's no point to committing a bunch of extra pages to cover for them in the forked child.
2022-07-11LibWeb: Store MessageEvent::m_data in a JS::HandleLuke Wilde
This protects it from GC.
2022-07-11Base: Improve clipboard manpage stylekleines Filmröllchen
2022-07-11Documentation: Merge UsingFontEditor into existing FontEditor manpagekleines Filmröllchen
The generate-manpages script needs to be updated again to handle the new PNGs in section 1. (I'm intentionally not making this a multi-directory glob.)
2022-07-11Meta: Also check CONTRIBUTING with check-markdown.shkleines Filmröllchen
2022-07-11Documentation: Move IPC endpoint documentation to manpage section 4kleines Filmröllchen
2022-07-11Documentation: Move all file format documentation into its own manpagekleines Filmröllchen
The documentation is largely unchanged except for adoption into the standard manpage format.
2022-07-10AK: Treat empty string as invalid JSONLuke Wilde
Previously we would treat the empty string as `null`. This caused JavaScript like this to fail: ```js var object = {}; try { object = JSON.parse(""); } catch {} var array = object.array || []; ``` Since `JSON.parse("")` returned null instead of throwing, it would set `object` to null and then try and use it instead of using the default backup value.
2022-07-10Meta: Make utmp start out as an empty object instead of empty stringLuke Wilde
The reason empty string was treated as JSON null was to paper over an issue where UTMP would start out as the empty string and presumably cause errors when trying to parse it as JSON. This was added in commit a409b832. This changes that by making UTMP start out as an empty JSON object instead of the empty string.