Bug 239641

Summary: Bail out from text decoration computation if none is requested
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Layout and RenderingAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, ntim, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Antti Koivisto 2022-04-22 01:21:15 PDT
We look for them unnecessarily.
Comment 1 Antti Koivisto 2022-04-22 01:26:37 PDT
Created attachment 458120 [details]
Patch
Comment 2 Tim Nguyen (:ntim) 2022-04-22 03:09:42 PDT
Comment on attachment 458120 [details]
Patch

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

> Source/WebCore/rendering/TextDecorationPainter.cpp:413
> +    if (requestedDecorations.isEmpty())
> +        return { };

Can we use the same more strict check like above? or does that cause issues? Fwiw, blink isn't supported, and none should do nothing.
Comment 3 Antti Koivisto 2022-04-22 03:54:01 PDT
Created attachment 458134 [details]
Patch for landing
Comment 4 Antti Koivisto 2022-04-22 03:55:14 PDT
> Can we use the same more strict check like above? or does that cause issues?
> Fwiw, blink isn't supported, and none should do nothing.

Good point, though I went to other directions by just using isEmpty(). I also removed the unused None value.
Comment 5 EWS 2022-04-22 05:03:27 PDT
Committed r293217 (249886@main): <https://commits.webkit.org/249886@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458134 [details].
Comment 6 Radar WebKit Bug Importer 2022-04-22 05:04:14 PDT
<rdar://problem/92157483>