Closed
Bug 1034077
Opened 11 years ago
Closed 11 years ago
Location bar shouldn't strip whitespace when pasting
Categories
(Firefox :: Address Bar, defect, P1)
Firefox
Address Bar
Tracking
()
Tracking | Status | |
---|---|---|
firefox33 | --- | fixed |
People
(Reporter: andrei, Assigned: dao)
References
()
Details
(Keywords: regression, reproducible, Whiteboard: [mozmill-test-failure])
Attachments
(2 files, 2 obsolete files)
1.83 KB,
patch
|
AndreeaMatei
:
review+
|
Details | Diff | Splinter Review |
1.15 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
Module: testPasteLocationBar
Test: /testAwesomeBar/testPasteLocationBar.js
Failure: Location bar should contain pasted clipboard content - expected ipsum
Branches: default
Platforms: Win
Report: http://mozmill-daily.blargon7.com/#/functional/report/8e52cc909fb28910195c4e255e31f105
So far only reported failures are on windows.
Reporter | ||
Comment 1•11 years ago
|
||
Only Windows is affected, no need to disable the test on other platforms.
Attachment #8450201 -
Flags: review?(andreea.matei)
Comment 2•11 years ago
|
||
Comment on attachment 8450201 [details] [diff] [review]
skip.patch
Review of attachment 8450201 [details] [diff] [review]:
-----------------------------------------------------------------
Disabled:
http://hg.mozilla.org/qa/mozmill-tests/rev/af856bfc3f97 (default)
Attachment #8450201 -
Flags: review?(andreea.matei) → review+
Updated•11 years ago
|
Whiteboard: [mozmill-test-failure] → [mozmill-test-failure][mozmill-test-skipped]
Reporter | ||
Comment 3•11 years ago
|
||
I can reproduce it manually.
We get an extra whitespace character selected when double clicking on a word.
Steps:
1) open a webpage (eg. mozilla.org)
2) double click a word (eg: "are")
Expected selection: "are"
Actual selection: "are "
Reporter | ||
Comment 4•11 years ago
|
||
Pushlog is pretty big: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7075808c3306&tochange=38ecfc3922b8
Nothing stands out related to text selection. Will probably have to run some tinderbox builds.
Comment 5•11 years ago
|
||
Here is the pushlog:
http://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=5bc01fa51b24&tochange=740ef090bec0
What actually changed is that text is stripped from spaces at the beginning/end when we paste it in the url bar.
I'm not sure about the default behavior in firefox on windows when we select a word (it also selects the space after the word) that exists for a while.
Blocks: 1018154
Comment 6•11 years ago
|
||
Hrm. I don't think it was intentional that the patch from bug 1018154 strips leading and trailing whitespace. On the other hand... I can't well imagine a case where it's problematic. Dão, should we fix this? I lean on the side of 'yes', but I'd like your opinion before I try and write a patch.
Flags: needinfo?(dao)
Assignee | ||
Comment 7•11 years ago
|
||
This sounds like something we should fix, since users may want to type after pasting and expect the space to be there.
Flags: needinfo?(dao)
Comment 8•11 years ago
|
||
Making the strip function not alter the result because (a) that's what it says on the tin, and (b) both consumers currently expect this, and that seems more sane than the alternative, even if I find the current structure in the function slightly kludgy...
Attachment #8450977 -
Flags: review?(dao)
Updated•11 years ago
|
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Updated•11 years ago
|
Iteration: --- → 33.2
Points: --- → 1
Component: Mozmill Tests → Location Bar
OS: Windows 8 → All
Product: Mozilla QA → Firefox
Version: unspecified → Trunk
Updated•11 years ago
|
Flags: firefox-backlog+
Keywords: regressionwindow-wanted
Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 8450977 [details] [diff] [review]
url bar shouldn't strip whitespace on all pastes,
Using pastedURI as a proxy for "this is at least the second loop run" makes this too weirdly structured for my taste at this point. Can you initialize pastedURI outside of the loop and make it a while-loop?
Attachment #8450977 -
Flags: review?(dao) → review-
Updated•11 years ago
|
Attachment #8450977 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #11)
> Created attachment 8450990 [details] [diff] [review]
> url bar shouldn't strip whitespace on all pastes,
>
> Like this?
Kind of. I think this can be simplified significantly, though.
Attachment #8450998 -
Flags: review?(gijskruitbosch+bugs)
Comment 13•11 years ago
|
||
Comment on attachment 8450998 [details] [diff] [review]
patch
Review of attachment 8450998 [details] [diff] [review]:
-----------------------------------------------------------------
The reason that I didn't go this far is that it behaves differently to my patch if you paste something that parses as a URI (when trimmed), e.g. "http://x ". I'm not sure we should let that happen, especially what with the "manual paste" behaviour that we use in urlbarBindings.
Comment 14•11 years ago
|
||
Comment on attachment 8450998 [details] [diff] [review]
patch
Review of attachment 8450998 [details] [diff] [review]:
-----------------------------------------------------------------
Hrm, no it wouldn't. I missed that you're only trimming the input to makeURL.
Attachment #8450998 -
Flags: review?(gijskruitbosch+bugs) → review+
Updated•11 years ago
|
Attachment #8450990 -
Attachment is obsolete: true
Attachment #8450990 -
Flags: review?(dao)
Updated•11 years ago
|
Assignee: gijskruitbosch+bugs → dao
Assignee | ||
Comment 15•11 years ago
|
||
QA Whiteboard: [qa?] → [qa+]
Summary: Test failure 'Location bar should contain pasted clipboard content - expected ipsum' in /testAwesomeBar/testPasteLocationBar.js → Location bar shouldn't strip whitespace when pasting
Comment 16•11 years ago
|
||
Gijs, thanks for the quick fix. For the next time could we please create a new bug for fixing the core issue, instead of moving it away from our own component? It kills our tracking. Thanks.
Comment 17•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Reporter | ||
Comment 18•11 years ago
|
||
Tested on a tinderbox mc build, fix works fine.
Backed out skip: https://hg.mozilla.org/qa/mozmill-tests/rev/ef1acb57fd2b (default)
Whiteboard: [mozmill-test-failure][mozmill-test-skipped] → [mozmill-test-failure]
Comment 19•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #6)
> Hrm. I don't think it was intentional that the patch from bug 1018154 strips
> leading and trailing whitespace.
I thought it was, for the case listed in bug 1018154 comment 1 and Chrome/IE parity.
Comment 20•11 years ago
|
||
(In reply to James Ross from comment #19)
> (In reply to :Gijs Kruitbosch from comment #6)
> > Hrm. I don't think it was intentional that the patch from bug 1018154 strips
> > leading and trailing whitespace.
>
> I thought it was, for the case listed in bug 1018154 comment 1 and Chrome/IE
> parity.
We strip it for "dangerous" URL cases, but not if you paste in "foopy ".
Updated•11 years ago
|
Iteration: 33.2 → 33.3
Comment 21•11 years ago
|
||
Hi Florin, can a QA contact be assigned for verification of this bug. Dao provided the following on how to verify, "One just needs to copy a string with a trailing space, e.g. "foo ". When pasted into the location bar, the trailing space should be preserved."
Flags: needinfo?(florin.mezei)
QA Contact: mozmill-tests
Comment 22•11 years ago
|
||
Our Mozmill test, which detected this regression by accident, is passing again. So I don't think it needs manual verification. But it would be good to have a specific test, which we can run on buildbot.
Flags: in-testsuite?
Updated•11 years ago
|
Flags: needinfo?(florin.mezei)
Comment 23•11 years ago
|
||
Marking as [qa-] based on Henrik's comment 22.
QA Whiteboard: [qa+] → [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•