Title: [256207] trunk
- Revision
- 256207
- Author
- [email protected]
- Date
- 2020-02-10 13:23:12 -0800 (Mon, 10 Feb 2020)
Log Message
Don't update selection when calling setSelectionRange on a disconnected input element
https://bugs.webkit.org/show_bug.cgi?id=207357
Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:
Rebaselined the test that progressed a little. The test now passes offset checks but still fails direction check.
* web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea-expected.txt:
Source/WebCore:
Don't update FrameSelection when the text form control element is disconnected from document.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):
LayoutTests:
Rebaselined the test that has progressed with this change.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (256206 => 256207)
--- trunk/LayoutTests/ChangeLog 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/LayoutTests/ChangeLog 2020-02-10 21:23:12 UTC (rev 256207)
@@ -1,3 +1,16 @@
+2020-02-07 Ryosuke Niwa <[email protected]>
+
+ Don't update selection when calling setSelectionRange on a disconnected input element
+ https://bugs.webkit.org/show_bug.cgi?id=207357
+
+ Reviewed by Antti Koivisto.
+
+ Rebaselined the test that has progressed with this change.
+
+ * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+ * platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+ * platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+
2020-02-10 Truitt Savell <[email protected]>
[ Win ] (r255383) webanimations/width-and-opacity-separate-animation-yields-compositing.html is failing
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (256206 => 256207)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-02-10 21:23:12 UTC (rev 256207)
@@ -1,3 +1,14 @@
+2020-02-07 Ryosuke Niwa <[email protected]>
+
+ Don't update selection when calling setSelectionRange on a disconnected input element
+ https://bugs.webkit.org/show_bug.cgi?id=207357
+
+ Reviewed by Antti Koivisto.
+
+ Rebaselined the test that progressed a little. The test now passes offset checks but still fails direction check.
+
+ * web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea-expected.txt:
+
2020-02-07 youenn fablet <[email protected]>
Filter out TURN/STUN .local URLs from a RTCPeerConnection iceServers list
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea-expected.txt (256206 => 256207)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea-expected.txt 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea-expected.txt 2020-02-10 21:23:12 UTC (rev 256207)
@@ -1,3 +1,3 @@
-FAIL text field selection for the input textarea assert_equals: updated selectionStart expected 1 but got 0
+FAIL text field selection for the input textarea assert_equals: final selectionDirection expected "forward" but got "none"
Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt (256206 => 256207)
--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt 2020-02-10 21:23:12 UTC (rev 256207)
@@ -252,12 +252,12 @@
FAIL change state from time to reset Type error
FAIL change state from time to button Type error
FAIL change state from number to hidden Type error
-FAIL change state from number to text assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to search assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to tel assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to url assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to email assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to password assert_equals: selectionStart should be unchanged expected 2 but got 0
+PASS change state from number to text
+PASS change state from number to search
+PASS change state from number to tel
+PASS change state from number to url
+PASS change state from number to email
+PASS change state from number to password
FAIL change state from number to datetime-local Type error
FAIL change state from number to date Type error
FAIL change state from number to month Type error
Modified: trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt (256206 => 256207)
--- trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt 2020-02-10 21:23:12 UTC (rev 256207)
@@ -252,17 +252,17 @@
FAIL change state from time to reset Type error
FAIL change state from time to button Type error
FAIL change state from number to hidden Type error
-FAIL change state from number to text assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to search assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to tel assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to url assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to email assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to password assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to datetime-local assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to date assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to month assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to week assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to time assert_equals: selectionStart should be unchanged expected 2 but got 0
+PASS change state from number to text
+PASS change state from number to search
+PASS change state from number to tel
+PASS change state from number to url
+PASS change state from number to email
+PASS change state from number to password
+PASS change state from number to datetime-local
+PASS change state from number to date
+PASS change state from number to month
+PASS change state from number to week
+PASS change state from number to time
FAIL change state from number to range Type error
FAIL change state from number to color assert_equals: input.value should be '#000000' after change of state expected "#000000" but got ""
FAIL change state from number to checkbox assert_equals: input.value should be 'on' after change of state expected "on" but got ""
Modified: trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt (256206 => 256207)
--- trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt 2020-02-10 21:23:12 UTC (rev 256207)
@@ -252,17 +252,17 @@
FAIL change state from time to reset Type error
FAIL change state from time to button Type error
FAIL change state from number to hidden Type error
-FAIL change state from number to text assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to search assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to tel assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to url assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to email assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to password assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to datetime-local assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to date assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to month assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to week assert_equals: selectionStart should be unchanged expected 2 but got 0
-FAIL change state from number to time assert_equals: selectionStart should be unchanged expected 2 but got 0
+PASS change state from number to text
+PASS change state from number to search
+PASS change state from number to tel
+PASS change state from number to url
+PASS change state from number to email
+PASS change state from number to password
+PASS change state from number to datetime-local
+PASS change state from number to date
+PASS change state from number to month
+PASS change state from number to week
+PASS change state from number to time
FAIL change state from number to range Type error
FAIL change state from number to color Type error
FAIL change state from number to checkbox assert_equals: input.value should be 'on' after change of state expected "on" but got ""
Modified: trunk/Source/WebCore/ChangeLog (256206 => 256207)
--- trunk/Source/WebCore/ChangeLog 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/Source/WebCore/ChangeLog 2020-02-10 21:23:12 UTC (rev 256207)
@@ -1,3 +1,15 @@
+2020-02-07 Ryosuke Niwa <[email protected]>
+
+ Don't update selection when calling setSelectionRange on a disconnected input element
+ https://bugs.webkit.org/show_bug.cgi?id=207357
+
+ Reviewed by Antti Koivisto.
+
+ Don't update FrameSelection when the text form control element is disconnected from document.
+
+ * html/HTMLTextFormControlElement.cpp:
+ (WebCore::HTMLTextFormControlElement::setSelectionRange):
+
2020-02-10 Jiewen Tan <[email protected]>
[WebAuthn] Merge some of the CTAP response decoder's code
Modified: trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp (256206 => 256207)
--- trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp 2020-02-10 21:14:39 UTC (rev 256206)
+++ trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp 2020-02-10 21:23:12 UTC (rev 256207)
@@ -296,6 +296,11 @@
auto innerText = innerTextElement();
bool hasFocus = document().focusedElement() == this;
if (!hasFocus && innerText) {
+ if (!isConnected()) {
+ cacheSelection(start, end, direction);
+ return;
+ }
+
// FIXME: Removing this synchronous layout requires fixing setSelectionWithoutUpdatingAppearance not needing up-to-date style.
document().updateLayoutIgnorePendingStylesheets();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes