Closed Bug 601060 Opened 14 years ago Closed 14 years ago

Hovering links shows "moz-action:switchtab" text and hides "Switch to tab:" label in URL bar when it contains a switch-to-tab URL

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 4.0b11
Tracking Status
blocking2.0 --- -

People

(Reporter: matjk7, Assigned: fryn)

References

Details

(Keywords: polish, Whiteboard: [switch-to-tab])

Attachments

(1 file, 6 obsolete files)

User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0b7pre) Gecko/20100930 Firefox/4.0b7pre Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b7pre) Gecko/20100930 Firefox/4.0b7pre Looks like the "Switch to tab" message doesn't play nicely with link previews. Reproducible: Always Steps to Reproduce: 1.Select an open tab using the keyboard so that the "Switch to tab | http://example.com" message appears 2.Hover a link Actual Results: Awesomebar shows the current URL as moz-action:switchtab, http://example.com Expected Results: Current URL should be displayed correctly.
Blocks: 587908
blocking2.0: --- → ?
Version: unspecified → Trunk
I cant reproduce it on Win7.
Confirming, thanks for filing.
Status: UNCONFIRMED → NEW
Ever confirmed: true
The "moz-action" text part is really easy to fix: _updateOverLink in urlbarBindings.xml should use this._value, which is basically the the URL bar's value to the outside world, rather than this.value, which can include the moz-action prefix. But the "Switch to tab:" label shouldn't be hidden, and that will take some rearranging of the binding's children.
Summary: Switch-to-tab shows bogus moz-action:switchtab when hovering links → Hovering links shows "moz-action:switchtab" text and hides "Switch to tab:" label in URL bar when it contains a switch-to-tab URL
Janky. Nice find.
blocking2.0: ? → final+
Assignee: nobody → fryn
(In reply to comment #3) > The "moz-action" text part is really easy to fix: _updateOverLink in > urlbarBindings.xml should use this._value, which is basically the the URL bar's > value to the outside world, rather than this.value, which can include the > moz-action prefix. Changing this.value to this._value didn't fix the bug. It seems that the url bar's _value property is being modified to match its value property before the following line runs: this._originLabel.value = this.value; What does fix it is using: this._originLabel.value = this._parseActionUrl(this.value).param; adw, any thoughts?
Attached patch patch (obsolete) (deleted) — Splinter Review
Fixes the -moz-action bit using the above method. Unhides the label with a trivial change to the binding. I don't think this requires ui-review, but if it does, let me know.
Attachment #490727 - Flags: review?(dao)
Status: NEW → ASSIGNED
(In reply to comment #6) > adw, any thoughts? (In reply to comment #7) > Unhides the label with a trivial change to the binding. Nice!
Comment on attachment 490727 [details] [diff] [review] patch This increases the location bar height when "Switch to tab" is displayed. Tested on Linux.
Attachment #490727 - Flags: review?(dao) → review-
Attached patch patch v2 (obsolete) (deleted) — Splinter Review
fixed margins on Windows and Linux.
Attachment #490727 - Attachment is obsolete: true
Attachment #493891 - Flags: review?(dao)
Comment on attachment 493891 [details] [diff] [review] patch v2 With this, "Switch to tab" is vertically misaligned on Windows, and I'm getting this error a lot: Error: this._parseActionUrl(this._value) is null Source File: chrome://browser/content/urlbarBindings.xml Line: 737
Attachment #493891 - Flags: review?(dao) → review-
Attached patch patch v3 (obsolete) (deleted) — Splinter Review
On Windows 7, the 1-pixel misalignment only occurred in Windows classic (not basic, not aero), and I tracked it to a difference in the padding between the windows themes for html|input: https://mxr.mozilla.org/mozilla-central/source/layout/reftests/editor/xul/input.css#15 Fixed it using :-moz-system-metric.
Attachment #493891 - Attachment is obsolete: true
Attachment #495172 - Flags: review?(dao)
(In reply to comment #12) > On Windows 7, the 1-pixel misalignment only occurred in Windows classic (not > basic, not aero), and I tracked it to a difference in the padding between the > windows themes for html|input: > https://mxr.mozilla.org/mozilla-central/source/layout/reftests/editor/xul/input.css#15 Still seeing it on XP. I don't see why that file is relevant here, it's only used in reftests.
Attachment #495172 - Flags: review?(dao) → review-
blocking2.0: final+ → -
Keywords: polish
Attached patch patch v4 (obsolete) (deleted) — Splinter Review
Wraps the <label> in a <box align="center"> for consistent styling on Windows. Due to padding on the url bar, we still need some negative margins, but it's still much better than before.
Attachment #495172 - Attachment is obsolete: true
Attachment #498027 - Flags: review?(dao)
Attached patch patch v5 (obsolete) (deleted) — Splinter Review
my bad: forgot to add padding-top: 1px; to pinstripe/.../browser.css tested on ubuntu 10.10, windows xp, windows 7 aero + aero basic + classic, and os x 10.6
Attachment #498027 - Attachment is obsolete: true
Attachment #498030 - Flags: review?(dao)
Attachment #498027 - Flags: review?(dao)
Attached patch patch v6 (updated to tip of tree) (obsolete) (deleted) — Splinter Review
Attachment #498030 - Attachment is obsolete: true
Attachment #498158 - Flags: review?(dao)
Attachment #498030 - Flags: review?(dao)
Comment on attachment 498158 [details] [diff] [review] patch v6 (updated to tip of tree) The 1px top padding is likely only needed because the label's vertical margins are uneven. Seems like these should be set to 0.
Attachment #498158 - Flags: review?(dao) → review-
(In reply to comment #17) > Comment on attachment 498158 [details] [diff] [review] > patch v6 (updated to tip of tree) > > The 1px top padding is likely only needed because the label's vertical margins > are uneven. Seems like these should be set to 0. The uneven vertical margins are there to align the top and bottom of the right border with the urlbar border. Setting these all to 0 will break that. I haven't found a more elegant way to do this. You can give it a shot.
You seem to be talking about the margin of the box.
Attached patch patch v7 (deleted) — Splinter Review
(In reply to comment #17) > Comment on attachment 498158 [details] [diff] [review] > patch v6 (updated to tip of tree) > > The 1px top padding is likely only needed because the label's vertical margins > are uneven. Seems like these should be set to 0. Addressed and tested on OS X, Ubuntu, Windows 7 (Aero Glass, Aero Basic, Windows Classic), and Windows XP.
Attachment #498158 - Attachment is obsolete: true
Attachment #503015 - Flags: review?(dao)
Attachment #503015 - Flags: review?(dao) → review+
Attachment #503015 - Flags: approval2.0?
Attachment #503015 - Flags: approval2.0? → approval2.0+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b11
Depends on: 631184
Whiteboard: [switch-to-tab]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: