Bug 216257 - REGRESSION (r257839): clickpay.com - password placeholder text cannot be replaced
Summary: REGRESSION (r257839): clickpay.com - password placeholder text cannot be repl...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-07 18:33 PDT by Wenson Hsieh
Modified: 2020-09-10 17:01 PDT (History)
10 users (show)

See Also:


Attachments
Patch (8.02 KB, patch)
2020-09-08 16:19 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (8.66 KB, patch)
2020-09-08 18:47 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
For EWS (9.81 KB, patch)
2020-09-09 10:08 PDT, Wenson Hsieh
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
For EWS (9.83 KB, patch)
2020-09-09 10:18 PDT, Wenson Hsieh
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
For EWS (9.84 KB, patch)
2020-09-09 10:42 PDT, Wenson Hsieh
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
For EWS (9.84 KB, patch)
2020-09-09 10:56 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch for landing (10.26 KB, patch)
2020-09-10 11:09 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Address comment (2.03 KB, patch)
2020-09-10 15:37 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2020-09-07 18:33:39 PDT
<rdar://problem/68150686>
Comment 1 Wenson Hsieh 2020-09-08 16:19:12 PDT Comment hidden (obsolete)
Comment 2 Wenson Hsieh 2020-09-08 18:47:53 PDT Comment hidden (obsolete)
Comment 3 Wenson Hsieh 2020-09-09 10:08:18 PDT Comment hidden (obsolete)
Comment 4 Wenson Hsieh 2020-09-09 10:18:08 PDT Comment hidden (obsolete)
Comment 5 Wenson Hsieh 2020-09-09 10:42:08 PDT Comment hidden (obsolete)
Comment 6 Wenson Hsieh 2020-09-09 10:56:34 PDT
Created attachment 408345 [details]
For EWS
Comment 7 Antti Koivisto 2020-09-10 09:49:37 PDT
Comment on attachment 408345 [details]
For EWS

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

> Source/WebCore/dom/Element.cpp:3422
> +    auto* style = hasNodeFlag(NodeFlag::IsComputedStyleInvalidFlag) ? nullptr : existingComputedStyle();
>      if (!style)
>          style = const_cast<Element&>(*this).resolveComputedStyle(ResolveComputedStyleMode::RenderedOnly);

Shouldn't we clear the flag in resolveComputedStyle?
Comment 8 Wenson Hsieh 2020-09-10 09:59:45 PDT
Comment on attachment 408345 [details]
For EWS

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

>> Source/WebCore/dom/Element.cpp:3422
>>          style = const_cast<Element&>(*this).resolveComputedStyle(ResolveComputedStyleMode::RenderedOnly);
> 
> Shouldn't we clear the flag in resolveComputedStyle?

Whoops — that’s right, we should clear the flag when we cache the computed style in that function. Will update the patch to do so!
Comment 9 Wenson Hsieh 2020-09-10 10:20:58 PDT
After chatting with Antti, we both think this new flag should exist in ElementRareData alongside the computedStyle it is about, too.
Comment 10 Wenson Hsieh 2020-09-10 10:47:41 PDT
(In reply to Wenson Hsieh from comment #9)
> After chatting with Antti, we both think this new flag should exist in
> ElementRareData alongside the computedStyle it is about, too.

…but as it turns out, doing so would require us to increase the size of ElementRareData, so just having the flag here is more optimal :/
Comment 11 Wenson Hsieh 2020-09-10 11:09:59 PDT
Created attachment 408462 [details]
Patch for landing
Comment 12 EWS 2020-09-10 12:56:12 PDT
Committed r266887: <https://trac.webkit.org/changeset/266887>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408462 [details].
Comment 13 Darin Adler 2020-09-10 15:00:35 PDT
Comment on attachment 408462 [details]
Patch for landing

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

> Source/WebCore/dom/Element.cpp:1976
> +    if (hasRareData() && elementRareData()->computedStyle())
> +        setNodeFlag(NodeFlag::IsComputedStyleInvalidFlag);

Do we really need to check computedStyle for null? Isn’t it harmless to set this flag if there is no computed style?
Comment 14 Wenson Hsieh 2020-09-10 15:09:02 PDT
Comment on attachment 408462 [details]
Patch for landing

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

>> Source/WebCore/dom/Element.cpp:1976
>> +        setNodeFlag(NodeFlag::IsComputedStyleInvalidFlag);
> 
> Do we really need to check computedStyle for null? Isn’t it harmless to set this flag if there is no computed style?

Good question! The thought here was that if we hadn’t already set a computed style at this point, then we shouldn’t need to mark as invalid. However, after adding code to clear the flag when setting computed style below, I agree this check is not very useful. The only other codepath that calls setComputedStyle is in `Element::storeDisplayContentsStyle`, so we should be able to remove this if we make sure to clear the flag out there as well.

I’ll do this in a followup.
Comment 15 Wenson Hsieh 2020-09-10 15:37:01 PDT
Reopening to attach new patch.
Comment 16 Wenson Hsieh 2020-09-10 15:37:02 PDT
Created attachment 408486 [details]
Address comment
Comment 17 EWS 2020-09-10 17:01:47 PDT
Committed r266899: <https://trac.webkit.org/changeset/266899>

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