WebKit Bugzilla
Attachment 359995 Details for
Bug 193758
: [iOS] Unable to make a selection in jsfiddle.net using arrow keys when requesting desktop site
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for EWS
bug-193758-20190123224539.patch (text/plain), 14.30 KB, created by
Wenson Hsieh
on 2019-01-23 22:45:39 PST
(
hide
)
Description:
Patch for EWS
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-01-23 22:45:39 PST
Size:
14.30 KB
patch
obsolete
>Subversion Revision: 240352 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 7f2118b95d5b512794c91cd7ae3c2f90e69a9b65..b7bbf4eb48814376237bd63bb5985c05fb8e9608 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2019-01-23 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Unable to make a selection in jsfiddle.net using arrow keys when requesting desktop site >+ https://bugs.webkit.org/show_bug.cgi?id=193758 >+ <rdar://problem/43614978> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ CodeMirror's script adds a repeating timer that periodically normalizes the logical selection in the editor >+ (this is distinct from the actual DOM selection, which is inside a hidden textarea element). This script defines >+ a helper method to select all the text inside of a text form control, called `selectInput`, which normally >+ invokes `node.select()`. However, in the case of iOS, the script works around broken `select()` behavior by >+ setting `selectionStart` and `selectionEnd` to encompass all the content in the form control. When requesting >+ the desktop version of the site, CodeMirror no longer attempts to apply its iOS workaround. >+ >+ This iOS-specific behavior was introduced to fix <rdar://problem/4901923>. However, the original bug no longer >+ reproduces even without this quirk. To fix this bug, we can simply roll out this ancient demo hack, in favor of >+ standardized behavior. >+ >+ This causes 11 existing layout tests to begin passing on iOS, and is also covered by rebaselining some more test >+ expectations to be consistent with macOS. >+ >+ * html/HTMLTextFormControlElement.cpp: >+ (WebCore::HTMLTextFormControlElement::select): >+ > 2019-01-23 Wenson Hsieh <wenson_hsieh@apple.com> > > Need a way for JavaScript (or bundle) code to participate in undo >diff --git a/Source/WebCore/html/HTMLTextFormControlElement.cpp b/Source/WebCore/html/HTMLTextFormControlElement.cpp >index 15bf27192df73065530f812a06b30c6f7888a1e0..8136933ad554c5a1f7e0c6ca7879d965efc3dca9 100644 >--- a/Source/WebCore/html/HTMLTextFormControlElement.cpp >+++ b/Source/WebCore/html/HTMLTextFormControlElement.cpp >@@ -189,14 +189,7 @@ void HTMLTextFormControlElement::setSelectionDirection(const String& direction) > > void HTMLTextFormControlElement::select(SelectionRevealMode revealMode, const AXTextStateChangeIntent& intent) > { >- // FIXME: We should abstract the selection behavior into an EditingBehavior function instead >- // of hardcoding the behavior using a macro define. >-#if PLATFORM(IOS_FAMILY) >- // We don't want to select all the text on iOS. Instead use the standard textfield behavior of going to the end of the line. >- setSelectionRange(std::numeric_limits<int>::max(), std::numeric_limits<int>::max(), SelectionHasForwardDirection, revealMode, intent); >-#else > setSelectionRange(0, std::numeric_limits<int>::max(), SelectionHasNoDirection, revealMode, intent); >-#endif > } > > String HTMLTextFormControlElement::selectedText() const >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 3a251f673d8380d8d828528c33299d1e349db02d..01689336f5d887f34ed81bed308bc6129cf9eed3 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,22 @@ >+2019-01-23 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Unable to make a selection in jsfiddle.net using arrow keys when requesting desktop site >+ https://bugs.webkit.org/show_bug.cgi?id=193758 >+ <rdar://problem/43614978> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rebaseline iOS expectation for a few existing layout tests, and additionally unmark a number of currently >+ failing tests on iOS. >+ >+ * platform/ios-wk2/fast/forms/textfield-outline-expected.txt: >+ * platform/ios/TestExpectations: >+ * platform/ios/editing/text-iterator/hidden-textarea-selection-quirk-expected.txt: Removed. >+ * platform/ios/fast/forms/input-appearance-focus-expected.txt: >+ * platform/ios/fast/forms/input-appearance-readonly-expected.txt: >+ * platform/ios/fast/forms/input-double-click-selection-gap-bug-expected.txt: >+ * platform/ios/fast/forms/textfield-outline-expected.txt: >+ > 2019-01-23 Wenson Hsieh <wenson_hsieh@apple.com> > > Need a way for JavaScript (or bundle) code to participate in undo >diff --git a/LayoutTests/platform/ios-wk2/fast/forms/textfield-outline-expected.txt b/LayoutTests/platform/ios-wk2/fast/forms/textfield-outline-expected.txt >index 45d93ae40b8860fb516e82d78532d9b4c940e821..c3380a4cc57a934f8bd9d716aa17a2381f9f64af 100644 >--- a/LayoutTests/platform/ios-wk2/fast/forms/textfield-outline-expected.txt >+++ b/LayoutTests/platform/ios-wk2/fast/forms/textfield-outline-expected.txt >@@ -12,4 +12,5 @@ layer at (21,35) size 222x25 scrollX 292 scrollWidth 512 > RenderBlock {DIV} at (11,5) size 223x25 > RenderText {#text} at (0,0) size 511x25 > text run at (0,0) width 511: "This tests that typing doesn't cut holes in the focus outline" >-caret: position 61 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body >+selection start: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body >+selection end: position 61 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index 2b3325b9a27ec5da26f0d071c48b5b48c17b1aff..3027531b9bb812d72d83bb23e8a05b8c8a56e9d0 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -1337,7 +1337,6 @@ webkit.org/b/178963 fast/css/sticky/sticky-writing-mode-vertical-lr.html [ Image > webkit.org/b/178963 fast/css/sticky/sticky-writing-mode-vertical-rl.html [ ImageOnlyFailure ] > > # editing/deleting tests to triage >-editing/deleting/delete-all-text-in-text-field-assertion.html [ Failure ] > editing/deleting/delete-cell-contents.html [ Failure ] > editing/deleting/smart-delete-002.html [ Failure ] > editing/deleting/smart-delete-across-editable-boundaries.html [ Failure ] >@@ -1682,7 +1681,6 @@ fast/forms/hidpi-textfield-background-bleeding.html [ ImageOnlyFailure ] > fast/forms/input-baseline.html [ Failure ] > fast/forms/input-live-pseudo-selectors.html [ Failure ] > fast/forms/input-no-renderer.html [ Failure ] >-fast/forms/input-select-webkit-user-select-none.html [ Failure ] > fast/forms/input-set-composition-scroll.html [ Failure ] > fast/forms/input-textarea-padding-match.html [ ImageOnlyFailure ] > fast/forms/listbox-clip.html [ Failure ] >@@ -1707,12 +1705,10 @@ fast/forms/select-live-pseudo-selectors.html [ Failure ] > fast/forms/select-overflow-scroll-inherited.html [ Failure ] > fast/forms/select-overflow-scroll.html [ Failure ] > fast/forms/select/option-selecting.html [ Failure ] >-fast/forms/shadow-tree-exposure.html [ Failure ] > fast/forms/textarea-input-event.html [ Failure ] > fast/forms/textarea-live-pseudo-selectors.html [ Failure ] > fast/forms/textarea-metrics.html [ Failure ] > fast/forms/textarea-placeholder-wrapping.html [ ImageOnlyFailure ] >-fast/forms/textarea-set-defaultvalue-after-value.html [ Failure ] > fast/forms/textfield-overflow-by-value-update.html [ Failure ] > fast/frames/calculate-fixed.html [ Failure ] > fast/frames/calculate-order.html [ Failure ] >@@ -2114,10 +2110,8 @@ editing/pasteboard/4242293-1.html [ Failure ] > editing/pasteboard/5780697-2.html [ Failure ] > editing/pasteboard/clipboard-customData.html [ Failure ] > editing/pasteboard/copy-backslash-with-euc.html [ Failure ] >-editing/pasteboard/copy-in-password-field.html [ Failure ] > editing/pasteboard/copy-inside-h1-preserves-h1.html [ Failure ] > editing/pasteboard/copy-text-with-backgroundcolor.html [ Failure ] >-editing/pasteboard/copy-two-pasteboard-types-both-work.html [ Failure ] > webkit.org/b/177961 editing/pasteboard/data-transfer-items.html [ Skip ] > editing/pasteboard/dataTransfer-setData-getData.html [ Failure ] > editing/pasteboard/display-block-on-spans.html [ Failure ] >@@ -2125,8 +2119,6 @@ editing/pasteboard/emacs-ctrl-k-with-move.html [ Failure ] > editing/pasteboard/emacs-ctrl-k-y-001.html [ Failure ] > editing/pasteboard/emacs-killring-alternating-append-prepend.html [ Failure ] > editing/pasteboard/emacs-killring-backward-delete-prepend.html [ Failure ] >-editing/pasteboard/input-with-display-none-div.html [ Failure ] >-editing/pasteboard/input-with-visibility-hidden.html [ Failure ] > editing/pasteboard/insert-div-text-into-text.html [ Failure ] > editing/pasteboard/merge-end-3.html [ Failure ] > editing/pasteboard/merge-end-5.html [ Failure ] >@@ -2137,11 +2129,8 @@ editing/pasteboard/paste-before-tab-span.html [ Failure ] > editing/pasteboard/paste-blockquote-3.html [ Failure ] > editing/pasteboard/paste-global-selection.html [ Failure ] > editing/pasteboard/paste-list-004.html [ Failure ] >-editing/pasteboard/paste-placeholder-input.html [ Failure ] >-editing/pasteboard/paste-plaintext-user-select-none.html [ Failure ] > editing/pasteboard/paste-sanitize-crash-1.html [ Failure ] > editing/pasteboard/paste-sanitize-crash-2.html [ Failure ] >-editing/pasteboard/paste-text-events.html [ Failure ] > editing/pasteboard/smart-paste-001.html [ Failure ] > editing/pasteboard/smart-paste-002.html [ Failure ] > editing/pasteboard/smart-paste-003.html [ Failure ] >diff --git a/LayoutTests/platform/ios/editing/text-iterator/hidden-textarea-selection-quirk-expected.txt b/LayoutTests/platform/ios/editing/text-iterator/hidden-textarea-selection-quirk-expected.txt >deleted file mode 100644 >index c2d243280a89bde348fe1f5995bbac2861aac516..0000000000000000000000000000000000000000 >--- a/LayoutTests/platform/ios/editing/text-iterator/hidden-textarea-selection-quirk-expected.txt >+++ /dev/null >@@ -1,11 +0,0 @@ >- >- >-FAIL Selecting in barely visible textarea assert_equals: expected "test text" but got "" >-PASS Selecting in barely visible div >-PASS Selecting in textarea hidden by container >-PASS Selecting in div hidden by container >-FAIL Selecting in absolute positioned textarea hidden by container assert_equals: expected "test text" but got "" >-PASS Selecting in absolute positioned div hidden by container >-FAIL Selecting in absolute positioned zero content width textarea hidden by container (quirk behavior) assert_equals: expected "test text" but got "" >-PASS Selecting in absolute positioned zero content width div hidden by container >- >diff --git a/LayoutTests/platform/ios/fast/forms/input-appearance-focus-expected.txt b/LayoutTests/platform/ios/fast/forms/input-appearance-focus-expected.txt >index 27ab211c2cd82f7e1bf856d00588ddfe6d015844..f1b7408d4955f59f3a8972b47372c797942d3165 100644 >--- a/LayoutTests/platform/ios/fast/forms/input-appearance-focus-expected.txt >+++ b/LayoutTests/platform/ios/fast/forms/input-appearance-focus-expected.txt >@@ -31,4 +31,5 @@ layer at (160,49) size 122x14 > RenderBlock {DIV} at (6,3) size 123x15 > RenderText {#text} at (0,0) size 74x14 > text run at (0,0) width 74: "My Text Field 2" >-caret: position 15 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of child 1 {P} of body >+selection start: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of child 1 {P} of body >+selection end: position 15 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of child 1 {P} of body >diff --git a/LayoutTests/platform/ios/fast/forms/input-appearance-readonly-expected.txt b/LayoutTests/platform/ios/fast/forms/input-appearance-readonly-expected.txt >index a18e54b16b1f2ec997088867bca446ed21eb26e9..39638741463ce9b7b0409fd73293644fc4234616 100644 >--- a/LayoutTests/platform/ios/fast/forms/input-appearance-readonly-expected.txt >+++ b/LayoutTests/platform/ios/fast/forms/input-appearance-readonly-expected.txt >@@ -12,4 +12,5 @@ layer at (17,33) size 122x14 > RenderBlock {DIV} at (6,3) size 123x15 > RenderText {#text} at (0,0) size 60x14 > text run at (0,0) width 60: "Test Passed" >-caret: position 11 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 2 {INPUT} of body >+selection start: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 2 {INPUT} of body >+selection end: position 11 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 2 {INPUT} of body >diff --git a/LayoutTests/platform/ios/fast/forms/input-double-click-selection-gap-bug-expected.txt b/LayoutTests/platform/ios/fast/forms/input-double-click-selection-gap-bug-expected.txt >index 2002042394777a4b8f017cff90c3bf87bf26baaa..eaf122c541adfbc3a598ba301b44e3d2f54f03ae 100644 >--- a/LayoutTests/platform/ios/fast/forms/input-double-click-selection-gap-bug-expected.txt >+++ b/LayoutTests/platform/ios/fast/forms/input-double-click-selection-gap-bug-expected.txt >@@ -27,4 +27,5 @@ layer at (39,411) size 122x14 > RenderBlock {DIV} at (6,3) size 123x15 > RenderText {#text} at (0,0) size 35x14 > text run at (0,0) width 35: "foo bar" >-caret: position 7 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 1 {TD} of child 0 {TR} of child 1 {TBODY} of child 3 {TABLE} of body >+selection start: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 1 {TD} of child 0 {TR} of child 1 {TBODY} of child 3 {TABLE} of body >+selection end: position 7 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 1 {INPUT} of child 1 {TD} of child 0 {TR} of child 1 {TBODY} of child 3 {TABLE} of body >diff --git a/LayoutTests/platform/ios/fast/forms/textfield-outline-expected.txt b/LayoutTests/platform/ios/fast/forms/textfield-outline-expected.txt >index 0c49a139d32e86a85ee9b78a9cf36f8cea0f6fc0..b3f39b9163744dbe8ec82f065ec0530e9a182a40 100644 >--- a/LayoutTests/platform/ios/fast/forms/textfield-outline-expected.txt >+++ b/LayoutTests/platform/ios/fast/forms/textfield-outline-expected.txt >@@ -12,4 +12,5 @@ layer at (21,35) size 222x25 scrollX 303 scrollWidth 523 > RenderBlock {DIV} at (11,5) size 223x25 > RenderText {#text} at (0,0) size 522x25 > text run at (0,0) width 522: "This tests that typing doesn't cut holes in the focus outlinea" >-caret: position 62 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body >+selection start: position 0 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body >+selection end: position 61 of child 0 {#text} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193758
:
359995
|
360037
|
361025
|
361054
|
361112
|
361117