Bug 220867

Summary: DisplayList::Replayer should stop replay and inform clients after encountering an invalid item
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebCore Misc.Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, simon.fraser, thorton, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=220948
Bug Depends on:    
Bug Blocks: 219097    
Attachments:
Description Flags
Patch
cdumez: review+
Patch for landing ews-feeder: commit-queue-

Description Wenson Hsieh 2021-01-22 10:15:35 PST
WIP for #219097.
Comment 1 Wenson Hsieh 2021-01-22 10:54:18 PST
Created attachment 418157 [details]
Patch
Comment 2 Chris Dumez 2021-01-22 11:58:00 PST
Comment on attachment 418157 [details]
Patch

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

> Source/WebCore/platform/graphics/displaylists/DisplayList.h:129
> +                m_isValid ? Optional<ItemHandle> {{ m_currentBufferForItem }} : WTF::nullopt,

nit: makeOptional() may look nicer.

> Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:42
> +static constexpr CGFloat contextWidth = 100;

static is not needed since global & const.

> Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:43
> +static constexpr CGFloat contextHeight = 100;

ditto.
Comment 3 Wenson Hsieh 2021-01-22 12:06:26 PST
Comment on attachment 418157 [details]
Patch

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

Thanks for the review!

>> Source/WebCore/platform/graphics/displaylists/DisplayList.h:129
>> +                m_isValid ? Optional<ItemHandle> {{ m_currentBufferForItem }} : WTF::nullopt,
> 
> nit: makeOptional() may look nicer.

Changed to use makeOptional().

>> Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:42
>> +static constexpr CGFloat contextWidth = 100;
> 
> static is not needed since global & const.

Removed the static.

>> Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:43
>> +static constexpr CGFloat contextHeight = 100;
> 
> ditto.

👍🏻
Comment 4 Wenson Hsieh 2021-01-22 12:10:00 PST
Created attachment 418168 [details]
Patch for landing
Comment 5 EWS 2021-01-22 12:37:50 PST
commit-queue failed to commit attachment 418168 [details] to WebKit repository.
Comment 6 Wenson Hsieh 2021-01-22 12:40:28 PST
Committed r271757: <https://trac.webkit.org/changeset/271757>
Comment 7 Radar WebKit Bug Importer 2021-01-22 12:41:13 PST
<rdar://problem/73511358>