Closed
Bug 1143038
Opened 9 years ago
Closed 9 years ago
Use AppConstants in tabbrowser.xml
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: billm, Assigned: billm)
References
Details
Attachments
(1 file)
13.34 KB,
patch
|
Gavin
:
review+
enndeakin
:
feedback+
|
Details | Diff | Splinter Review |
If you're wondering why it's okay to remove clicktoscroll="true" on the arrowscrollbox, it's because it serves no purpose. The arrowscrollbox has a class="tabbrowser-arrowscrollbox" attribute, and that attribute causes it to use the tabbrowser-arrowscrollbox XBL binding, which inherits from scrollbox.xml#arrowscrollbox-clicktoscroll unconditionally. This change appears to have happened in 2007, so we should probably just call it the expected behavior at this point.
Attachment #8577307 -
Flags: review?(gavin.sharp)
Comment 1•9 years ago
|
||
Comment on attachment 8577307 [details] [diff] [review] patch Neil, can you r+ the clicktoscroll change specifically? >diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml >+ if (this.AppConstants.platform == "macosx") { >+ return dt.effectAllowed = event.altKey ? "copy" : "move"; >+ } else { >+ return dt.effectAllowed = event.ctrlKey ? "copy" : "move"; >+ } I think this might be clearer as: let copyModifier = this.AppConstants.platform == "macosx" ? event.altKey : event.ctrlKey; return dt.effectAllowed = copyModifier ? "copy" : "move"; >+ if (this.AppConstants.platform == "macosx") { >+ if (!event.metaKey) >+ return; >+ } else { >+ if (!event.ctrlKey || event.metaKey) >+ return; >+ } Similarly: let wrongModifiers; if (this.AppConstants.platform == "macosx") { wrongModifiers = !event.metaKey; } else { wrongModifiers = !event.ctrlKey || event.metaKey; } if (wrongModifiers) return; >+ let props = { screenX: left, screenY: top }; >+ if (this.AppConstants.platform != "win") { >+ props.outerWidth = winWidth; >+ props.outerHeight = winHeight; >+ } >+ this.tabbrowser.replaceTabWithWindow(draggedTab, prop); typo here: prop -> props. No test coverage for this I guess? :(
Attachment #8577307 -
Flags: review?(gavin.sharp)
Attachment #8577307 -
Flags: review+
Attachment #8577307 -
Flags: feedback?(enndeakin)
Assignee | ||
Comment 2•9 years ago
|
||
Could you please get to this soon Neil? Every time I have to lookup a line number in preprocessed JS or run make in browser/base, I feel a twinge of pain.
Comment 3•9 years ago
|
||
Comment on attachment 8577307 [details] [diff] [review] patch This is ok, but I would have removed the special tabbrowser-arrowscrollbox -moz-binding in tabbrowser.css instead so that we consistently use clicktoscroll to get that binding.
Attachment #8577307 -
Flags: feedback?(enndeakin) → feedback+
Assignee | ||
Comment 4•9 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/347dbe653fb3 I filed bug 145734 as a follow-up to address comment 3.
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/347dbe653fb3
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
You need to log in
before you can comment on or make changes to this bug.
Description
•