Bug 238894 - [:has() pseudo-class] Support invalidation for :placeholder-shown
Summary: [:has() pseudo-class] Support invalidation for :placeholder-shown
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks: 234556
  Show dependency treegraph
 
Reported: 2022-04-06 14:42 PDT by Tim Nguyen (:ntim)
Modified: 2022-04-06 21:30 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.98 KB, patch)
2022-04-06 14:54 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff
Patch (3.96 KB, patch)
2022-04-06 15:08 PDT, Tim Nguyen (:ntim)
simon.fraser: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
[fast-cq] Patch (4.05 KB, patch)
2022-04-06 21:22 PDT, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2022-04-06 14:42:23 PDT
See title
Comment 1 Tim Nguyen (:ntim) 2022-04-06 14:54:36 PDT
Created attachment 456866 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2022-04-06 14:56:09 PDT
<rdar://problem/91377662>
Comment 3 Tim Nguyen (:ntim) 2022-04-06 15:08:53 PDT
Created attachment 456871 [details]
Patch
Comment 4 EWS 2022-04-06 17:10:06 PDT
Found 1 new test failure: imported/blink/fast/forms/textarea-placeholder-visibility-3.html
Comment 5 Tim Nguyen (:ntim) 2022-04-06 21:22:28 PDT
Created attachment 456888 [details]
[fast-cq] Patch
Comment 6 Tim Nguyen (:ntim) 2022-04-06 21:26:47 PDT
For the imported/blink/fast/forms/textarea-placeholder-visibility-3.html failure, it seems like we need to call TextControlPlaceholderElement::resolveCustomStyle(). Not sure if this is an isolated case where Style::PseudoClassChangeInvalidation is not enough compared to invalidateStyleForSubtree(), but might be worth checking.

In the meantime, I've added this for the placeholder case:

    if (RefPtr placeholder = placeholderElement())
        placeholder->invalidateStyle();
Comment 7 EWS 2022-04-06 21:30:18 PDT
Committed r292523 (249361@main): <https://commits.webkit.org/249361@main>

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