Bug 198888

Summary: [LFC] Add Layout::Box::isContainingBlockDescendantOf
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, koivisto, sam, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.