Bug 207830

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

Description zalan 2020-02-16 19:00:49 PST
This is just a leftover.
Comment 1 Radar WebKit Bug Importer 2020-02-16 19:01:10 PST
<rdar://problem/59498829>
Comment 2 zalan 2020-02-16 19:04:04 PST
Created attachment 390895 [details]
Patch
Comment 3 Darin Adler 2020-02-16 22:19:30 PST
Comment on attachment 390895 [details]
Patch

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

> Source/WebCore/layout/layouttree/LayoutReplacedBox.h:-63
> -    WeakPtr<const Box> m_layoutBox;

I don’t see where this was initialized to anything. Seems like it was always null. Not sure why the code wasn’t just crashing all the time. Don’t understand why the new test covers this code.
Comment 4 Antti Koivisto 2020-02-17 01:01:45 PST
> I don’t see where this was initialized to anything. Seems like it was always
> null. Not sure why the code wasn’t just crashing all the time. Don’t
> understand why the new test covers this code.

I think the new test covers it because it explicitly enables full-tree LFC. There was no previous test coverage.
Comment 5 zalan 2020-02-17 07:19:05 PST
(In reply to Darin Adler from comment #3)
> Comment on attachment 390895 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=390895&action=review
> 
> > Source/WebCore/layout/layouttree/LayoutReplacedBox.h:-63
> > -    WeakPtr<const Box> m_layoutBox;
> 
> I don’t see where this was initialized to anything. Seems like it was always
> null. Not sure why the code wasn’t just crashing all the time. Don’t
> understand why the new test covers this code.
Yes. As Antti said this code is behind a runtime flag and wasn't regression tested.
Comment 6 WebKit Commit Bot 2020-02-17 08:03:50 PST
Comment on attachment 390895 [details]
Patch

Clearing flags on attachment: 390895

Committed r256733: <https://trac.webkit.org/changeset/256733>
Comment 7 WebKit Commit Bot 2020-02-17 08:03:51 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Darin Adler 2020-02-17 10:02:14 PST
Comment on attachment 390895 [details]
Patch

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

>>> Source/WebCore/layout/layouttree/LayoutReplacedBox.h:-63
>>> -    WeakPtr<const Box> m_layoutBox;
>> 
>> I don’t see where this was initialized to anything. Seems like it was always null. Not sure why the code wasn’t just crashing all the time. Don’t understand why the new test covers this code.
> 
> Yes. As Antti said this code is behind a runtime flag and wasn't regression tested.

Ah, I see, the new test says "LayoutFormattingContextEnabled=true". That’s what I missed!
Comment 9 zalan 2020-02-17 10:05:42 PST
(In reply to Darin Adler from comment #8)
> Comment on attachment 390895 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=390895&action=review
> 
> >>> Source/WebCore/layout/layouttree/LayoutReplacedBox.h:-63
> >>> -    WeakPtr<const Box> m_layoutBox;
> >> 
> >> I don’t see where this was initialized to anything. Seems like it was always null. Not sure why the code wasn’t just crashing all the time. Don’t understand why the new test covers this code.
> > 
> > Yes. As Antti said this code is behind a runtime flag and wasn't regression tested.
> 
> Ah, I see, the new test says "LayoutFormattingContextEnabled=true". That’s
> what I missed!
And it is actually crashing here 
https://ews-build.webkit.org/results/iOS-13-Simulator-WK2-Tests-EWS/r390898-10935/results.html
when a new test exercises this (not yet patched)code path.