Bug 211139 - [WebKitLegacy] Implement -hidePlaceholder and -showPlaceholderIfNecessary in terms of setCanShowPlaceholder()
Summary: [WebKitLegacy] Implement -hidePlaceholder and -showPlaceholderIfNecessary in ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-28 12:11 PDT by Daniel Bates
Modified: 2020-04-28 16:57 PDT (History)
8 users (show)

See Also:


Attachments
Patch (6.11 KB, patch)
2020-04-28 12:32 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
To Land - now with 50% less indentation (6.01 KB, patch)
2020-04-28 16:34 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

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