Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Issue 2686653003: URL.search should return the set value via setSearch (Closed)

Created:
3 years, 10 months ago by yhirano
Modified:
3 years, 10 months ago
Reviewers:
sof
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

URL.search should return the set value via setSearch DOMURLUtils and KURL trim off the leading question mark independently, which leads to trimming off two leading questions in addition. DOMURLUtilsReadOnly::search recovers one question mark and we lose one question mark in total. The special handling in DOMURLUtils is needed because KURL::setQuery handles an empty string and a null string differently. KURL::setQuery("?") is equivalent to KURL::setQuery("") but what we need is KURL::setQuery(String()). This CL fixes the problem by calling KURL::setQuery(String()) if the given value is "?", and calling KURL::setQuery with the given string if it starts with a question mark and consists of two or more characters. BUG=682150 Review-Url: https://codereview.chromium.org/2686653003 Cr-Commit-Position: refs/heads/master@{#448940} Committed: https://chromium.googlesource.com/chromium/src/+/29fc3042b1b3bea3e71a2c5b0a9a81ce435c2d39

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M third_party/WebKit/LayoutTests/fast/domurl/url-search.html View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DOMURLUtils.cpp View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 26 (22 generated)
yhirano
PTAL
3 years, 10 months ago (2017-02-08 08:55:27 UTC) #14
sof
lgtm
3 years, 10 months ago (2017-02-08 09:02:29 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2686653003/40001
3 years, 10 months ago (2017-02-08 09:08:39 UTC) #23
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 10:04:06 UTC) #26
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/29fc3042b1b3bea3e71a2c5b0a9a...

Powered by Google App Engine
This is Rietveld 408576698