Bug 220213 - [LFC Display] Give display boxes a previousSibling pointer
Summary: [LFC Display] Give display boxes a previousSibling pointer
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-31 12:32 PST by Simon Fraser (smfr)
Modified: 2021-08-15 07:25 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.49 KB, patch)
2020-12-31 12:33 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (4.97 KB, patch)
2021-08-14 18:10 PDT, Simon Fraser (smfr)
zalan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2020-12-31 12:32:19 PST
[LFC Display] Give display boxes a previousSibling pointer
Comment 1 Simon Fraser (smfr) 2020-12-31 12:33:00 PST
Created attachment 416869 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-01-02 17:37:17 PST
Note to self: need to add a lastChild pointer to ContainerBox.
Comment 3 Radar WebKit Bug Importer 2021-01-07 12:33:12 PST
<rdar://problem/72900722>
Comment 4 Simon Fraser (smfr) 2021-08-14 18:10:12 PDT
Created attachment 435554 [details]
Patch
Comment 5 zalan 2021-08-15 07:25:27 PDT
Comment on attachment 435554 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        Hit-testing will need to iterate Display::Box siblings in reverse order, so add
> +        a pointer to the previous sibling box, and assign it during tree building. Also
> +        add a lastChild pointer to Display::ContainerBox.

In integration we just iterate the vector backwards.
nvm, it looks like DisplayBox objects are already forming a tree.

> Source/WebCore/display/css/DisplayBox.h:101
> +    Box* m_previousSibling { nullptr };

WeakPtr?

> Source/WebCore/display/css/DisplayContainerBox.h:51
> +    Box* m_lastChild { nullptr };

WeakPtr?