Bug 211139

Summary: [WebKitLegacy] Implement -hidePlaceholder and -showPlaceholderIfNecessary in terms of setCanShowPlaceholder()
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, eric.carlson, esprehn+autocc, ews-watchlist, gyuyoung.kim, mifenton, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
To Land - now with 50% less indentation none

Description Daniel Bates 2020-04-28 12:11:09 PDT
Implement -hidePlaceholder and -showPlaceholderIfNecessary in terms of -setCanShowPlaceholder, which was added in the patch for bug #206459. Why do this? Because:

1. Unlike -hidePlaceholder and -showPlaceholderIfNecessary, -setCanShowPlaceholder does NOT of reach into the guts of the field and mutate its CSS.
2. Because of (1), it works correctly should future code be written then modifies the DOM or CSS of the placeholder (which is in the guts of the field).
3. Unlike -hidePlaceholder and -showPlaceholderIfNecessary, there is test coverage of setCanShowPlaceholder() to ensure (2).
Comment 1 Daniel Bates 2020-04-28 12:32:32 PDT
Created attachment 397871 [details]
Patch
Comment 2 Daniel Bates 2020-04-28 16:05:49 PDT
Window failure unrelated.
Comment 3 Simon Fraser (smfr) 2020-04-28 16:25:48 PDT
Comment on attachment 397871 [details]
Patch

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

> Source/WebKitLegacy/mac/ChangeLog:11
> +                1. Unlike -hidePlaceholder and -showPlaceholderIfNecessary, setCanShowPlaceholder() does NOT of

So much indent.
Comment 4 Daniel Bates 2020-04-28 16:34:44 PDT
Created attachment 397901 [details]
To Land - now with 50% less indentation
Comment 5 Daniel Bates 2020-04-28 16:35:12 PDT
Committed r260854: <https://trac.webkit.org/changeset/260854>
Comment 6 Radar WebKit Bug Importer 2020-04-28 16:36:14 PDT
<rdar://problem/62556174>
Comment 7 Eric Carlson 2020-04-28 16:39:12 PDT
Comment on attachment 397901 [details]
To Land - now with 50% less indentation

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

> Source/WebKitLegacy/mac/ChangeLog:11
> +            1. Unlike -hidePlaceholder and -showPlaceholderIfNecessary, setCanShowPlaceholder() does NOT of

s/does NOT of/does Not/
Comment 8 Daniel Bates 2020-04-28 16:57:50 PDT
Comment on attachment 397901 [details]
To Land - now with 50% less indentation

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

>> Source/WebKitLegacy/mac/ChangeLog:11
>> +            1. Unlike -hidePlaceholder and -showPlaceholderIfNecessary, setCanShowPlaceholder() does NOT of
> 
> s/does NOT of/does Not/

yep, I noticed that too AFTER I landed it. I may fix it up in the ChangeLog...