Bug 180721 - is<HTMLTextFormControlElement> reports the input type.
Summary: is<HTMLTextFormControlElement> reports the input type.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-12 14:44 PST by zalan
Modified: 2017-12-12 20:05 PST (History)
6 users (show)

See Also:


Attachments
Patch (18.18 KB, patch)
2017-12-12 14:48 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (18.49 KB, patch)
2017-12-12 15:08 PST, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-elcapitan (2.41 MB, application/zip)
2017-12-12 16:05 PST, EWS Watchlist
no flags Details
Patch (19.12 KB, patch)
2017-12-12 19:12 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2017-12-12 14:44:12 PST
but it is expected to report the class type.
Comment 1 Radar WebKit Bug Importer 2017-12-12 14:44:53 PST
<rdar://problem/36005123>
Comment 2 zalan 2017-12-12 14:48:28 PST
Created attachment 329162 [details]
Patch
Comment 3 Ryosuke Niwa 2017-12-12 14:55:28 PST
Comment on attachment 329162 [details]
Patch

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

> Source/WebCore/editing/Editor.cpp:247
> +    if (is<Element>(event->target()) && downcast<Element>(*event->target()).isTextField()) {
>          auto& target = downcast<HTMLTextFormControlElement>(*event->target());

Here, we should probably check both is<HTMLTextFormControlElement>(event->target()) and downcast<Element>(*event->target()).isTextField()
so that downcast & is match.

> Source/WebCore/editing/Editor.cpp:1724
> -    if (is<HTMLTextFormControlElement>(focusedElement)) {
> +    if (focusedElement && focusedElement->isTextField()) {

Ditto.
Comment 4 zalan 2017-12-12 15:08:02 PST
Created attachment 329163 [details]
Patch
Comment 5 EWS Watchlist 2017-12-12 16:05:41 PST
Comment on attachment 329163 [details]
Patch

Attachment 329163 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/5637053

New failing tests:
fast/selectors/placeholder-shown-style-update.html
Comment 6 EWS Watchlist 2017-12-12 16:05:42 PST
Created attachment 329173 [details]
Archive of layout-test-results from ews103 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 7 WebKit Commit Bot 2017-12-12 16:13:03 PST
The commit-queue encountered the following flaky tests while processing attachment 329163 [details]:

The commit-queue is continuing to process your patch.
Comment 8 zalan 2017-12-12 19:12:35 PST
Created attachment 329193 [details]
Patch
Comment 9 WebKit Commit Bot 2017-12-12 20:05:38 PST
Comment on attachment 329193 [details]
Patch

Clearing flags on attachment: 329193

Committed r225837: <https://trac.webkit.org/changeset/225837>
Comment 10 WebKit Commit Bot 2017-12-12 20:05:39 PST
All reviewed patches have been landed.  Closing bug.