Title: [261399] trunk
- Revision
- 261399
- Author
- [email protected]
- Date
- 2020-05-08 10:57:54 -0700 (Fri, 08 May 2020)
Log Message
Fix urlsearchparams-delete.html
https://bugs.webkit.org/show_bug.cgi?id=211456
Patch by Rob Buis <[email protected]> on 2020-05-08
Reviewed by Daniel Bates.
LayoutTests/imported/w3c:
Update improved test expectation.
* web-platform-tests/url/urlsearchparams-delete-expected.txt:
Source/WebCore:
Step 2 of URLSearchParams.delete algorithm [1] indicates
we should run the update steps, even if no name-value
pairs were removed.
Behavior matches Chrome and Firefox.
[1] https://url.spec.whatwg.org/#dom-urlsearchparams-delete
Test: web-platform-tests/url/urlsearchparams-delete.html
* html/URLSearchParams.cpp:
(WebCore::URLSearchParams::remove):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (261398 => 261399)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-05-08 17:57:39 UTC (rev 261398)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-05-08 17:57:54 UTC (rev 261399)
@@ -1,3 +1,14 @@
+2020-05-08 Rob Buis <[email protected]>
+
+ Fix urlsearchparams-delete.html
+ https://bugs.webkit.org/show_bug.cgi?id=211456
+
+ Reviewed by Daniel Bates.
+
+ Update improved test expectation.
+
+ * web-platform-tests/url/urlsearchparams-delete-expected.txt:
+
2020-05-06 Alexey Shvayka <[email protected]>
Remove orphaned WPT expectations & unused harness
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt (261398 => 261399)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt 2020-05-08 17:57:39 UTC (rev 261398)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/urlsearchparams-delete-expected.txt 2020-05-08 17:57:54 UTC (rev 261399)
@@ -2,5 +2,5 @@
PASS Delete basics
PASS Deleting appended multiple
PASS Deleting all params removes ? from URL
-FAIL Removing non-existent param removes ? from URL assert_equals: url.href does not have ? expected "http://example.com/" but got "http://example.com/?"
+PASS Removing non-existent param removes ? from URL
Modified: trunk/Source/WebCore/ChangeLog (261398 => 261399)
--- trunk/Source/WebCore/ChangeLog 2020-05-08 17:57:39 UTC (rev 261398)
+++ trunk/Source/WebCore/ChangeLog 2020-05-08 17:57:54 UTC (rev 261399)
@@ -1,3 +1,23 @@
+2020-05-08 Rob Buis <[email protected]>
+
+ Fix urlsearchparams-delete.html
+ https://bugs.webkit.org/show_bug.cgi?id=211456
+
+ Reviewed by Daniel Bates.
+
+ Step 2 of URLSearchParams.delete algorithm [1] indicates
+ we should run the update steps, even if no name-value
+ pairs were removed.
+
+ Behavior matches Chrome and Firefox.
+
+ [1] https://url.spec.whatwg.org/#dom-urlsearchparams-delete
+
+ Test: web-platform-tests/url/urlsearchparams-delete.html
+
+ * html/URLSearchParams.cpp:
+ (WebCore::URLSearchParams::remove):
+
2020-05-08 Wenson Hsieh <[email protected]>
[iOS] caret appears in the middle of a search field when field is focused on agoda.com
Modified: trunk/Source/WebCore/html/URLSearchParams.cpp (261398 => 261399)
--- trunk/Source/WebCore/html/URLSearchParams.cpp 2020-05-08 17:57:39 UTC (rev 261398)
+++ trunk/Source/WebCore/html/URLSearchParams.cpp 2020-05-08 17:57:54 UTC (rev 261399)
@@ -127,8 +127,10 @@
void URLSearchParams::remove(const String& name)
{
- if (m_pairs.removeAllMatching([&] (const auto& pair) { return pair.key == name; }))
- updateURL();
+ m_pairs.removeAllMatching([&] (const auto& pair) {
+ return pair.key == name;
+ });
+ updateURL();
}
String URLSearchParams::toString() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes