Bug 198888 - [LFC] Add Layout::Box::isContainingBlockDescendantOf
Summary: [LFC] Add Layout::Box::isContainingBlockDescendantOf
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: 2019-06-15 06:25 PDT by zalan
Modified: 2019-06-18 07:45 PDT (History)
7 users (show)

See Also:


Attachments
Patch (7.32 KB, patch)
2019-06-15 06:32 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (7.32 KB, patch)
2019-06-15 12:32 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 2019-06-15 06:25:25 PDT
and use it instead of isDescendentOf.
Comment 1 Radar WebKit Bug Importer 2019-06-15 06:25:51 PDT
<rdar://problem/51776466>
Comment 2 zalan 2019-06-15 06:32:43 PDT
Created attachment 372191 [details]
Patch
Comment 3 zalan 2019-06-15 12:32:48 PDT
Created attachment 372197 [details]
Patch
Comment 4 WebKit Commit Bot 2019-06-16 12:33:23 PDT
Comment on attachment 372197 [details]
Patch

Clearing flags on attachment: 372197

Committed r246479: <https://trac.webkit.org/changeset/246479>
Comment 5 WebKit Commit Bot 2019-06-16 12:33:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Sam Weinig 2019-06-16 12:51:43 PDT
Given how self contained LFC is, have you consider using more traditional style unit tests in addition to layout tests? Having tests for things like Box::isDescendantOf and Box::isContainingBlockDescendantOf seem like they would map very nicely to that style of testing.
Comment 7 zalan 2019-06-18 07:45:35 PDT
(In reply to Sam Weinig from comment #6)
> Given how self contained LFC is, have you consider using more traditional
> style unit tests in addition to layout tests? Having tests for things like
> Box::isDescendantOf and Box::isContainingBlockDescendantOf seem like they
> would map very nicely to that style of testing.
No I have not thought about it yet but I think it is a great idea!!!
Currently I simply match the geometries in the 2 trees after each layout frame.
1. Run RenderObject base layout
2. Run LFC layout
3. call verifyAndOutputMismatchingLayoutTree() -> assert
so yeah, I should start thinking about adding some unit tests.