MozillaZine

Bug 944836 - No longer possible to move the Firefox window w

Discuss application theming and theme development.
mcdavis

User avatar
 
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Post Posted January 6th, 2015, 10:57 pm

Bug 944836 is one that has to be taken for themes running on OSX. This bug changes the way draggable areas are defined for moving the entire window, for the case when the system-drawn window titlebar is hidden and also for dragging by (some) toolbars whether the titlebar is shown or hidden. Before, this was done by applying drag bindings in-theme. As of this bug, for Firefox 35 and up only, on OSX only, draggable regions are defined with -moz-window-drag: drag, and the drag bindings are removed.

If you don't take this patch, the main browser window and some other windows become undraggable for cases when the system-drawn titlebar is hidden.

The bug starts by talking about a problem with dragging when Firefox is paused by an external debugger, but the solution changes how dragging works in all cases, not just when using an external debugger.

patch:
- (2014-09-18) (Fx35) https://hg.mozilla.org/mozilla-central/rev/aa6432518ad1 (nsCSSKeywordList.h, nsCSSPropList.h, etc.) Bug 944836 - Add CSS property -moz-window-dragging: drag | no-drag.
- (2014-09-18) (Fx35) https://hg.mozilla.org/mozilla-central/rev/1c9e801f66aa (nsDisplayList.cpp, nsLayoutUtils.cpp, nsBoxFrame.cpp, etc.) Bug 944836 - Build a draggable region for the window based on the -moz-window-dragging property.
- (2014-09-18) (Fx35) https://hg.mozilla.org/mozilla-central/rev/08f2238d29ee (cocoa/nsChildView.mm, nsCocoaWindow.mm, etc.) Bug 944836 - Implement nsChildView::UpdateWindowDraggingRegion.
- (2014-09-18) (Fx35) https://hg.mozilla.org/mozilla-central/rev/71a8e9cb15c5 (osx/browser.css, general.xml, osx/global.css) Bug 944836 - Add -moz-window-dragging CSS styles.
- (2014-09-18) (Fx35) https://hg.mozilla.org/mozilla-central/rev/14e633eeb251 (test) Bug 944836 - Remove test that uses MozMouseHitTest on a statusbar.

Before, in global.css:

Code: Select all
toolbar:not([nowindowdrag="true"]) {
  -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
}

statusbar:not([nowindowdrag="true"]) {
  -moz-binding: url("chrome://global/content/bindings/general.xml#statusbar-drag");
}

windowdragbox {
  -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");


After, in global.css:

Code: Select all
titlebar,
toolbar:not([nowindowdrag="true"]):not([customizing="true"]),
statusbar:not([nowindowdrag="true"]),
windowdragbox {
  -moz-window-dragging: drag;
}

toolbarbutton,
button,
textbox,
searchbar,
tab,
radio,
splitter {
  -moz-window-dragging: no-drag;
}


and in browser.css:

Code: Select all
#titlebar {
  -moz-window-dragging: drag;
}


There's no change from this bug for platforms other than OSX, and on other platforms the drag bindings still need to be used.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted January 8th, 2015, 7:06 pm

mcdavis wrote:There's no change from this bug for platforms other than OSX, and on other platforms the drag bindings still need to be used.


That's rather odd.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

mcdavis

User avatar
 
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Post Posted January 25th, 2015, 6:30 am

Bug 1104036 - With RTL UI, click and drag in the address bar moves the window instead of selecting text.
Bug 1122942 - Can't drag or move Firefox window when a third-party theme is installed.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted January 25th, 2015, 2:10 pm

Why do they keep messing around with the drag code?
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

mcdavis

User avatar
 
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Post Posted January 25th, 2015, 10:51 pm

patrickjdempsey wrote:Why do they keep messing around with the drag code?


There was an issue with RTL users on OSX. They had to change something to make that work.

It looks like this change (the RTL part) is the whole reason for Fx35.0.1. I unpacked 35 and 35.0.1 and compared; this is the only change I see.

EDIT - no wait, that's not necessarily true. It's the only change in chrome on OSX; I didn't look at binary components or other platforms.
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed

mcdavis

User avatar
 
Posts: 3195
Joined: December 9th, 2005, 5:51 am

Post Posted February 1st, 2015, 8:33 am

Just noting that both Bug 1104036 and Bug 1122942 - both mentioned above - have landed for Fx36 on beta and for Fx37 on aurora, as well as for Fx38 nightlies.

There's not yet a beta release with this in it; beta 6 will be the first one.

I'm not sure yet which aurora build will have this.

This means, at this time, with respect to window dragging, for OS X only:

For Fx34:

- none of this touches Fx34; Fx34 is the "before" case
- use drag bindings in global.css as before
- -moz-window-dragging doesn't exist yet

For Fx35:

- first introduction of -moz-window-dragging
- see Bug 944836
- use of -moz-window-dragging required in-theme for proper function of window dragging
- in-theme CSS changes in browser.css and global.css to apply -moz-window-dragging and remove drag bindings
- Fx35 exhibits problem for OSX RTL users as in Bug 1104036

For Fx35.0.1:

- Bug 944836 reverted for causing Bug 1104036
- restoration of drag bindings in in-theme global.css required for full drag functionality e.g. dragging with the developer toolbar
- however, other drag bindings probably in browser.css still allow window dragging by navbar and other main toolbars, e.g. customizableui/toolbar.xml#toolbar-drag
- use of -moz-window-dragging (as for Fx35) should be removed but benign if kept (CSS error, undefined property, declaration ignored)

For Fx36 beta 1 through beta 5:

- this is essentially the same case as Firefox 35
- Bug 944836 landed for this
- Bug 1104036 and Bug 1122942 didn't yet
- use of -moz-window-dragging required in-theme for proper function of window dragging
- drag bindings in global.css still gone as they have been since Bug 944836 (since that was only backed out on the release repo)

For Fx36 beta 6 and up:

- it's not out yet
- but Bug 1104036 and Bug 1122942 are both in it
- meaning you don't have to do anything in-theme for window dragging to work
- -moz-window-dragging now applied in content/browser.css and in xul.css
- -moz-window-dragging can be removed from in-theme CSS (but you still need it for fx35.0 and for old beta, old auroras and old nightlies)
- the default theme keeps using customizableui/toolbar.xml#toolbar-drag in browser.css, but i wonder if that should be changed to customizableui/toolbar.xml#toolbar
- drag bindings in global.css still gone as they have been since Bug 944836 (since that was only backed out on the release repo)

For Fx37 aurora 1 through ??:

- this is essentially the same case as Firefox 35
- Bug 944836 landed for this
- Bug 1104036 and Bug 1122942 didn't yet
- use of -moz-window-dragging required in-theme for proper function of window dragging
- drag bindings in global.css still gone as they have been since Bug 944836 (since that was only backed out on the release repo)

For Fx37 aurora ??? and up:

- it may not be out yet
- but Bug 1104036 and Bug 1122942 are both in it
- meaning you don't have to do anything in-theme for window dragging to work
- -moz-window-dragging now applied in content/browser.css and in xul.css
- -moz-window-dragging can be removed from in-theme CSS (but you still need it for old betas, old auroras and old nightlies)
- the default theme keeps using customizableui/toolbar.xml#toolbar-drag in browser.css, but i wonder if that should be changed to customizableui/toolbar.xml#toolbar
- drag bindings in global.css still gone as they have been since Bug 944836 (since that was only backed out on the release repo)


For Fx38 nightly up through 2015-01-24:

- this is essentially the same case as Firefox 35
- Bug 944836 landed for this
- Bug 1104036 and Bug 1122942 didn't yet
- use of -moz-window-dragging required in-theme for proper function of window dragging
- drag bindings in global.css still gone as they have been since Bug 944836 (since that was only backed out on the release repo)

For Fx38 nightly 2015-01-25 and up:

- Bug 1104036 and Bug 1122942 are both in it
- meaning you don't have to do anything in-theme for window dragging to work
- -moz-window-dragging now applied in content/browser.css and in xul.css
- -moz-window-dragging can be removed from in-theme CSS (but you still need it for old betas, old auroras and old nightlies)
- the default theme keeps using customizableui/toolbar.xml#toolbar-drag in browser.css, but i wonder if that should be changed to customizableui/toolbar.xml#toolbar
- drag bindings in global.css still gone as they have been since Bug 944836 (since that was only backed out on the release repo)
Theme Development is Radical Participation.
NNL Beta Builds for Current and Up-coming Firefox
Dear User: Your Help is Needed

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 2 guests