Bug 239641 - Bail out from text decoration computation if none is requested
Summary: Bail out from text decoration computation if none is requested
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antti Koivisto
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-22 01:21 PDT by Antti Koivisto
Modified: 2022-04-22 05:04 PDT (History)
11 users (show)

See Also:


Attachments
Patch (2.64 KB, patch)
2022-04-22 01:26 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch for landing (4.06 KB, patch)
2022-04-22 03:54 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>