Closed
Bug 554919
Opened 15 years ago
Closed 14 years ago
Support panels which can be moved by dragging their background
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
People
(Reporter: enndeakin, Assigned: enndeakin)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 2 obsolete files)
9.50 KB,
patch
|
dao
:
review+
smaug
:
review+
|
Details | Diff | Splinter Review |
This involves: - modifying WindowDraggingUtils.jsm to support panels as well as windows - hooking this up if some attribute is set on the panel
Comment 1•15 years ago
|
||
popup's moveTo method <method name="moveTo"> <parameter name="aLeft"/> <parameter name="aTop"/> <body> <![CDATA[ this.popupBoxObject.moveTo(aLeft, aTop); ]]> </body> </method> uses popupBoxObject property <property name="popupBoxObject"> <getter> return this.boxObject.QueryInterface(Components.interfaces.nsIPopupBoxObject); </getter> </property> which calls QueryInterface every time without a reason, making everything slow so making lazygetter for popupBoxObject is needed for this too
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Comment 2•14 years ago
|
||
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #456350 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Attachment #520629 -
Flags: review?(dao)
Comment 4•14 years ago
|
||
Comment on attachment 520629 [details] [diff] [review] patch, with gtk support and test > handleEvent: function(aEvent) { >-#ifdef XP_WIN >- if (this.shouldDrag(aEvent)) >- aEvent.preventDefault(); >-#else > switch (aEvent.type) { > case "mousedown": > if (!this.shouldDrag(aEvent)) > return; > >+ let isPanel = this.isPanel(); >+#ifdef XP_WIN >+ if (!isPanel) { >+ aEvent.preventDefault(); >+ return; >+ } >+#endif This new code seems unreachable, since MozMouseHittest is used instead of mousedown in the XP_WIN case. >--- a/toolkit/content/widgets/popup.xml >+++ b/toolkit/content/widgets/popup.xml >+ <field name="_alive">true</field> That doesn't work this way anymore, we changed this in bug 624157. smaug, sicking, jst or bz should probably review the change to beginWindowMove.
Attachment #520629 -
Flags: review?(dao) → review-
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #520629 -
Attachment is obsolete: true
Attachment #521187 -
Flags: review?(dao)
Assignee | ||
Updated•14 years ago
|
Attachment #521187 -
Flags: review?(Olli.Pettay)
Comment 6•14 years ago
|
||
Comment on attachment 521187 [details] [diff] [review] Address comments r+ for the dom/ part. Is 'backdrag' such attribute that it can be set only before ctor has run? Is there some way to disable the feature for sometime and then enable it again?
Attachment #521187 -
Flags: review?(Olli.Pettay) → review+
Assignee | ||
Comment 7•14 years ago
|
||
There isn't a way to modify it currently. I can add that in a followup bug.
Comment 8•14 years ago
|
||
Comment on attachment 521187 [details] [diff] [review] Address comments WindowDraggingUtils.jsm doesn't seem to handle elements inside of panels in a sensible way. This can be taken care of in a separate bug (I could do it in bug 574971). >+ if (isPanel) { >+ var screenRect = this._elem.getOuterScreenRect(); >+ this._deltaX = aEvent.screenX - screenRect.left; >+ this._deltaY = aEvent.screenY - screenRect.top; >+ } >+ if (this._draggingWindow) { >+ var toDrag = this.isPanel() ? this._elem : this._window; >+ toDrag.moveTo(aEvent.screenX - this._deltaX, aEvent.screenY - this._deltaY); >+ } s/var/let/
Attachment #521187 -
Flags: review?(dao) → review+
Assignee | ||
Comment 9•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9c21ad3d7f72
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Keywords: dev-doc-needed
Comment 10•13 years ago
|
||
To clarify before I begin writing: this is about the new "backdrag" attribute on the XUL panel element, correct?
Assignee | ||
Comment 11•13 years ago
|
||
Yes, setting backdrag="true" allows the panel to be moved around on the screen by dragging on a background area of the panel.
Comment 12•13 years ago
|
||
Documentation written: https://developer.mozilla.org/en/XUL/Attribute/backdrag Pages updated: https://developer.mozilla.org/en/XUL/panel https://developer.mozilla.org/en/XUL/PopupGuide/Panels#Letting_panels_be_dragged_by_grabbing_the_background And listed on Firefox 7 for developers.
Keywords: dev-doc-needed → dev-doc-complete
Comment 13•7 years ago
|
||
Moving to Core:XUL per https://bugzilla.mozilla.org/show_bug.cgi?id=1455336
Component: XP Toolkit/Widgets: XUL → XUL
You need to log in
before you can comment on or make changes to this bug.
Description
•