Last Comment Bug 613199 - URLBar FixUps [2010-11]
: URLBar FixUps [2010-11]
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: Location Bar (show other bugs)
: Trunk
: All All
: -- normal (vote)
: seamonkey2.1b2
Assigned To: Philip Chee
:
Mentors:
Depends on: 599833
Blocks: 480537
  Show dependency treegraph
 
Reported: 2010-11-18 06:54 PST by Philip Chee
Modified: 2010-12-17 04:57 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch v1.0 [CopyCut] (4.02 KB, patch)
2010-11-18 20:37 PST, Philip Chee
no flags Details | Diff | Splinter Review
Patch v1.1 [CopyCut] (3.59 KB, patch)
2010-11-19 10:08 PST, Philip Chee
neil: review+
Details | Diff | Splinter Review

Description Philip Chee 2010-11-18 06:54:33 PST
Port more Firefox URLBar patches now that Bug 599833 has introduced a suitable framework.
Comment 1 Philip Chee 2010-11-18 20:37:50 PST
Created attachment 491765 [details] [diff] [review]
Patch v1.0 [CopyCut]

This patch does the following:

1. Port Bug 607518 (After performed Paste & Go and Paste & Search , Ctrl+Z makes blank, Ctrl+Z is necessary twice to undo it.)
2. Add copy and cut to the urlBar custom controller.
3. Implement "_getSelectedValueForClipboard() which fixes Bug 480537 (copied URL's from location bar are decoded and not meet RFC.)


> --- a/suite/browser/urlbarBindings.xml
> 
>                case "cmd_pasteAndGo":
> -                this.value = "";
> +                this.select();

c.f. https://bugzilla.mozilla.org/show_bug.cgi?id=473368#c3
Comment 2 neil@parkwaycc.co.uk 2010-11-19 05:33:46 PST
Comment on attachment 491765 [details] [diff] [review]
Patch v1.0 [CopyCut]

>           _fireEvent: this._fireEvent.bind(this),
Not sure we ended up using this ;-)

>+            if (!this._editItemsController.supportsCommand(aCommand))
>+              return false;
Not sure why we need this, we won't get called for an unsupported command.

>+                  let start = this.selectionStart;
>+                  let end = this.selectionEnd;
>+                  this.value = this.inputField.value.substring(0, start) +
>+                               this.inputField.value.substring(end);
>+                  this.selectionStart = this.selectionEnd = start;
>+                  SetPageProxyState("invalid", null);
IIRC this can all be replaced by goDoCommand("cmd_delete");
Also, this should happen after the copy.
Comment 3 Philip Chee 2010-11-19 10:08:31 PST
Created attachment 491864 [details] [diff] [review]
Patch v1.1 [CopyCut]

> neil@parkwaycc.co.uk      2010-11-19 05:33:46 PST
> 
> >           _fireEvent: this._fireEvent.bind(this),
> Not sure we ended up using this ;-)
Removed.

> >+            if (!this._editItemsController.supportsCommand(aCommand))
> >+              return false;
> Not sure why we need this, we won't get called for an unsupported command.
Removed.

> >+                  let start = this.selectionStart;
> >+                  let end = this.selectionEnd;
> >+                  this.value = this.inputField.value.substring(0, start) +
> >+                               this.inputField.value.substring(end);
> >+                  this.selectionStart = this.selectionEnd = start;
> >+                  SetPageProxyState("invalid", null);
> IIRC this can all be replaced by goDoCommand("cmd_delete");
Fixed.

> Also, this should happen after the copy.
Fixed.
Comment 4 neil@parkwaycc.co.uk 2010-11-21 06:22:57 PST
Comment on attachment 491864 [details] [diff] [review]
Patch v1.1 [CopyCut]

>+                val = uri.spec;
>+
>+                // Parentheses are known to confuse third-party applications (bug 458565).
>+                val = val.replace(/[()]/g, function (c) escape(c));
[If it wasn't for the comment this would fit on one line...]
Comment 5 Philip Chee 2010-11-21 07:38:47 PST
Part1. Followup to PasteAndGo, implement copy and cut, and fix Bug 480537.
Checked in to comm-central
http://hg.mozilla.org/comm-central/rev/2ceaa8229eb1
Comment 6 Philip Chee 2010-12-17 04:54:32 PST
It's December. Closing. and moving subsequent work to other bugs :D
Comment 7 Philip Chee 2010-12-17 04:57:22 PST
*** Bug 531210 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.