Bug 216257

Summary: REGRESSION (r257839): clickpay.com - password placeholder text cannot be replaced
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cmarcelo, darin, esprehn+autocc, ews-watchlist, kangil.han, koivisto, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
For EWS
ews-feeder: commit-queue-
For EWS
ews-feeder: commit-queue-
For EWS
ews-feeder: commit-queue-
For EWS
none
Patch for landing
none
Address comment none

Wenson Hsieh
Reported 2020-09-07 18:33:39 PDT
Attachments
Patch (8.02 KB, patch)
2020-09-08 16:19 PDT, Wenson Hsieh
no flags
Patch (8.66 KB, patch)
2020-09-08 18:47 PDT, Wenson Hsieh
no flags
For EWS (9.81 KB, patch)
2020-09-09 10:08 PDT, Wenson Hsieh
ews-feeder: commit-queue-
For EWS (9.83 KB, patch)
2020-09-09 10:18 PDT, Wenson Hsieh
ews-feeder: commit-queue-
For EWS (9.84 KB, patch)
2020-09-09 10:42 PDT, Wenson Hsieh
ews-feeder: commit-queue-
For EWS (9.84 KB, patch)
2020-09-09 10:56 PDT, Wenson Hsieh
no flags
Patch for landing (10.26 KB, patch)
2020-09-10 11:09 PDT, Wenson Hsieh
no flags
Address comment (2.03 KB, patch)
2020-09-10 15:37 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2020-09-08 16:19:12 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 2 2020-09-08 18:47:53 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 3 2020-09-09 10:08:18 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 4 2020-09-09 10:18:08 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 5 2020-09-09 10:42:08 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 6 2020-09-09 10:56:34 PDT
Antti Koivisto
Comment 7 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?
Wenson Hsieh
Comment 8 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!
Wenson Hsieh
Comment 9 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.
Wenson Hsieh
Comment 10 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 :/
Wenson Hsieh
Comment 11 2020-09-10 11:09:59 PDT
Created attachment 408462 [details] Patch for landing
EWS
Comment 12 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].
Darin Adler
Comment 13 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?
Wenson Hsieh
Comment 14 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.
Wenson Hsieh
Comment 15 2020-09-10 15:37:01 PDT
Reopening to attach new patch.
Wenson Hsieh
Comment 16 2020-09-10 15:37:02 PDT
Created attachment 408486 [details] Address comment
EWS
Comment 17 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].
Note You need to log in before you can comment on or make changes to this bug.