WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
237361
[InputElement] Selection after type change needs to follow HTML specification
https://bugs.webkit.org/show_bug.cgi?id=237361
Summary
[InputElement] Selection after type change needs to follow HTML specification
zsun
Reported
2022-03-02 05:56:21 PST
https://html.spec.whatwg.org/multipage/input.html#input-type-change
(step 8 & 9)
Attachments
Patch
(24.71 KB, patch)
2022-03-02 06:16 PST
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(5.14 KB, patch)
2022-04-27 03:10 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(12.87 KB, patch)
2022-04-28 02:11 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(12.84 KB, patch)
2022-04-28 02:37 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(13.05 KB, patch)
2022-04-28 02:45 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(13.04 KB, patch)
2022-04-28 04:39 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(33.10 KB, patch)
2022-04-28 05:42 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(36.22 KB, patch)
2022-04-29 01:33 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(36.22 KB, patch)
2022-05-02 00:04 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(33.14 KB, patch)
2022-05-04 02:51 PDT
,
zsun
no flags
Details
Formatted Diff
Diff
Show Obsolete
(9)
View All
Add attachment
proposed patch, testcase, etc.
zsun
Comment 1
2022-03-02 06:16:39 PST
Created
attachment 453600
[details]
Patch
zsun
Comment 2
2022-03-02 06:17:47 PST
Not ready for review yet. I need to rebase the test expectations across platforms.
Radar WebKit Bug Importer
Comment 3
2022-03-09 05:57:17 PST
<
rdar://problem/90027274
>
zsun
Comment 4
2022-04-27 03:10:25 PDT
Created
attachment 458437
[details]
Patch
zsun
Comment 5
2022-04-28 02:11:34 PDT
Created
attachment 458502
[details]
Patch
zsun
Comment 6
2022-04-28 02:37:03 PDT
Created
attachment 458505
[details]
Patch
zsun
Comment 7
2022-04-28 02:45:44 PDT
Created
attachment 458506
[details]
Patch
zsun
Comment 8
2022-04-28 04:39:46 PDT
Created
attachment 458511
[details]
Patch
zsun
Comment 9
2022-04-28 05:42:06 PDT
Created
attachment 458520
[details]
Patch
Chris Dumez
Comment 10
2022-04-28 11:00:21 PDT
Comment on
attachment 458520
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=458520&action=review
> Source/WebCore/html/HTMLTextFormControlElement.cpp:97 > + m_cachedSelectionDirection = document.frame() && document.frame()->editor().behavior().shouldConsiderSelectionAsDirectional() ? SelectionHasForwardDirection: SelectionHasNoDirection;
Why did you move this out of the initializer list? It seems like it could / should stay in the initializer list.
zsun
Comment 11
2022-04-29 01:33:03 PDT
Created
attachment 458575
[details]
Patch
Tim Nguyen (:ntim)
Comment 12
2022-05-01 02:55:17 PDT
Comment on
attachment 458575
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=458575&action=review
> Source/WebCore/html/HTMLTextFormControlElement.cpp:91 > + , m_cachedSelectionDirection(document.frame() && document.frame()->editor().behavior().shouldConsiderSelectionAsDirectional() ? SelectionHasForwardDirection: SelectionHasNoDirection)
nit: please add a space after `SelectionHasForwardDirection`
zsun
Comment 13
2022-05-02 00:04:38 PDT
Created
attachment 458664
[details]
Patch
Tim Nguyen (:ntim)
Comment 14
2022-05-02 11:37:48 PDT
Comment on
attachment 458664
[details]
Patch Why does imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt need different expectations per-platform?
zsun
Comment 15
2022-05-03 01:44:29 PDT
(In reply to Tim Nguyen (:ntim) from
comment #14
)
> Comment on
attachment 458664
[details]
> Patch > > Why does > imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/ > selection-start-end-extra-expected.txt need different expectations > per-platform?
This patch fixes the sub-test "Shortening value by turning the input type into 'color' and back to 'text'" in selection-start-end-extra.html for all the platforms except mac-wk1.
Tim Nguyen (:ntim)
Comment 16
2022-05-03 04:59:53 PDT
(In reply to zsun from
comment #15
)
> (In reply to Tim Nguyen (:ntim) from
comment #14
) > > Comment on
attachment 458664
[details]
> > Patch > > > > Why does > > imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/ > > selection-start-end-extra-expected.txt need different expectations > > per-platform? > > This patch fixes the sub-test "Shortening value by turning the input type > into 'color' and back to 'text'" in selection-start-end-extra.html for all > the platforms except mac-wk1.
If that's the case, can we make the failing expectation specific to mac-wk1 and just update the common expectation for all the other platforms?
zsun
Comment 17
2022-05-03 05:20:27 PDT
(In reply to Tim Nguyen (:ntim) from
comment #16
)
> (In reply to zsun from
comment #15
) > > (In reply to Tim Nguyen (:ntim) from
comment #14
) > > > Comment on
attachment 458664
[details]
> > > Patch > > > > > > Why does > > > imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/ > > > selection-start-end-extra-expected.txt need different expectations > > > per-platform? > > > > This patch fixes the sub-test "Shortening value by turning the input type > > into 'color' and back to 'text'" in selection-start-end-extra.html for all > > the platforms except mac-wk1. > > If that's the case, can we make the failing expectation specific to mac-wk1 > and just update the common expectation for all the other platforms?
This was my initial thought at
https://bugs.webkit.org/attachment.cgi?id=458520&action=diff
but mac-wk1 didn't seem picking up the mac-wk1 expectation file.
Tim Nguyen (:ntim)
Comment 18
2022-05-03 10:01:45 PDT
(In reply to zsun from
comment #17
)
> (In reply to Tim Nguyen (:ntim) from
comment #16
) > > (In reply to zsun from
comment #15
) > > > (In reply to Tim Nguyen (:ntim) from
comment #14
) > > > > Comment on
attachment 458664
[details]
> > > > Patch > > > > > > > > Why does > > > > imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/ > > > > selection-start-end-extra-expected.txt need different expectations > > > > per-platform? > > > > > > This patch fixes the sub-test "Shortening value by turning the input type > > > into 'color' and back to 'text'" in selection-start-end-extra.html for all > > > the platforms except mac-wk1. > > > > If that's the case, can we make the failing expectation specific to mac-wk1 > > and just update the common expectation for all the other platforms? > > This was my initial thought at >
https://bugs.webkit.org/attachment.cgi?id=458520&action=diff
but mac-wk1 > didn't seem picking up the mac-wk1 expectation file.
Looks like it didn't work because your paths don't match up. You put the expectation in: LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/selection-start-end-extra-expected.txt when it should be in: LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-extra-expected.txt
zsun
Comment 19
2022-05-04 02:51:42 PDT
Created
attachment 458784
[details]
Patch
zsun
Comment 20
2022-05-04 02:53:17 PDT
(In reply to Tim Nguyen (:ntim) from
comment #18
)
> (In reply to zsun from
comment #17
) > > (In reply to Tim Nguyen (:ntim) from
comment #16
) > > > (In reply to zsun from
comment #15
) > > > > (In reply to Tim Nguyen (:ntim) from
comment #14
) > > > > > Comment on
attachment 458664
[details]
> > > > > Patch > > > > > > > > > > Why does > > > > > imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/ > > > > > selection-start-end-extra-expected.txt need different expectations > > > > > per-platform? > > > > > > > > This patch fixes the sub-test "Shortening value by turning the input type > > > > into 'color' and back to 'text'" in selection-start-end-extra.html for all > > > > the platforms except mac-wk1. > > > > > > If that's the case, can we make the failing expectation specific to mac-wk1 > > > and just update the common expectation for all the other platforms? > > > > This was my initial thought at > >
https://bugs.webkit.org/attachment.cgi?id=458520&action=diff
but mac-wk1 > > didn't seem picking up the mac-wk1 expectation file. > > Looks like it didn't work because your paths don't match up. You put the > expectation in: > > LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/ > forms/the-input-element/selection-start-end-extra-expected.txt > > when it should be in: > > LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/ > forms/textfieldselection/selection-start-end-extra-expected.txt
Oops! I was so careless. Thank you!
Tim Nguyen (:ntim)
Comment 21
2022-05-04 06:25:39 PDT
Comment on
attachment 458784
[details]
Patch Thanks for addressing the comments! I assume this is ready to land.
EWS
Comment 22
2022-05-04 07:49:37 PDT
Committed
r293773
(
250252@main
): <
https://commits.webkit.org/250252@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 458784
[details]
.
zsun
Comment 23
2022-05-10 01:19:50 PDT
***
Bug 239769
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug