Bug 229103 - [LFC][IFC] Add support for out-of-flow box static positioning
Summary: [LFC][IFC] Add support for out-of-flow box static positioning
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-13 18:12 PDT by zalan
Modified: 2021-08-22 17:03 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.63 KB, patch)
2021-08-13 18:23 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (14.82 KB, patch)
2021-08-14 18:03 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (18.63 KB, patch)
2021-08-22 10:14 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (19.39 KB, patch)
2021-08-22 15:37 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2021-08-13 18:12:45 PDT
e.g. https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height

For the purposes of this section and the next, the term "static position" (of an element) refers, roughly, to the position an element would have had in the normal flow. More precisely, the static position for 'top' is the distance from the top edge of the containing block to the top margin edge of a hypothetical box that would have been the first box of the element if its specified 'position' value had been 'static' and its specified 'float' had been 'none' and its specified 'clear' had been 'none'. (Note that due to the rules in section 9.7 this might require also assuming a different computed value for 'display'.) The value is negative if the hypothetical box is above the containing block.
Comment 1 zalan 2021-08-13 18:23:13 PDT
Created attachment 435531 [details]
Patch
Comment 2 Antti Koivisto 2021-08-13 22:45:14 PDT
Comment on attachment 435531 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435531&action=review

> Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:260
> +    // Instead we figure out this static position after the inline layout by looking at the previous sibling (or parent) box's geometry and

Are there any cases where we should be looking for the next siblings box?

> Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:281
> +                // FIXME: In very rare cases, the previous box's content might have been completely collapsed and left us with no run.

I suppose we'll need the previous run-generating box.
Comment 3 zalan 2021-08-14 03:13:18 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 435531 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=435531&action=review
> 
> > Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:260
> > +    // Instead we figure out this static position after the inline layout by looking at the previous sibling (or parent) box's geometry and
> 
> Are there any cases where we should be looking for the next siblings box?
> 
> > Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:281
> > +                // FIXME: In very rare cases, the previous box's content might have been completely collapsed and left us with no run.
> 
> I suppose we'll need the previous run-generating box.
Yeah, that's exactly what we need.
Comment 4 zalan 2021-08-14 18:03:57 PDT
Created attachment 435553 [details]
Patch
Comment 5 Radar WebKit Bug Importer 2021-08-20 18:13:37 PDT
<rdar://problem/82193466>
Comment 6 zalan 2021-08-22 10:14:21 PDT
Created attachment 436118 [details]
Patch
Comment 7 zalan 2021-08-22 15:37:03 PDT
Created attachment 436130 [details]
Patch
Comment 8 EWS 2021-08-22 17:03:18 PDT
Committed r281424 (240814@main): <https://commits.webkit.org/240814@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436130 [details].