Bug 236741

Summary: Web Inspector: [Flexbox] Gaps and free space do not have pattern fills when navigating to a page with Web Inspector already open
Product: WebKit Reporter: Patrick Angle <pangle>
Component: Web InspectorAssignee: Patrick Angle <pangle>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 235820    
Attachments:
Description Flags
Patch v1.0
none
Patch v1.1 none

Description Patrick Angle 2022-02-16 16:10:09 PST
<rdar://88995157>
Comment 1 Patrick Angle 2022-02-16 16:19:38 PST
Created attachment 452269 [details]
Patch v1.0
Comment 2 Devin Rousso 2022-02-16 18:06:29 PST
Comment on attachment 452269 [details]
Patch v1.0

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

r=me, neato :)

> Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:-365
> -    m_flexibleBoxRendererCachedItemsAtStartOfLine.clear();

I agree that it's *probably* fine to not clear since it's a `WeakHashSet`, but I am afraid this could easily be proven an incorrect analysis.  Would it make sense to clear this inside `relayoutDocument` since we're gonna do a full layout anyways (and therefore probably immediately re-fill `m_flexibleBoxRendererCachedItemsAtStartOfLine`)?
Comment 3 Patrick Angle 2022-02-17 08:56:05 PST
Created attachment 452376 [details]
Patch v1.1
Comment 4 Patrick Angle 2022-02-17 08:58:45 PST
Comment on attachment 452269 [details]
Patch v1.0

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

>> Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:-365
>> -    m_flexibleBoxRendererCachedItemsAtStartOfLine.clear();
> 
> I agree that it's *probably* fine to not clear since it's a `WeakHashSet`, but I am afraid this could easily be proven an incorrect analysis.  Would it make sense to clear this inside `relayoutDocument` since we're gonna do a full layout anyways (and therefore probably immediately re-fill `m_flexibleBoxRendererCachedItemsAtStartOfLine`)?

Good point - I've added it to `relayoutDocument()` since we will be getting the new info anyways.
Comment 5 EWS 2022-02-17 12:06:47 PST
Committed r290047 (247419@main): <https://commits.webkit.org/247419@main>

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