MozillaZine

An Australis customization problem and how it was fixed

Discuss application theming and theme development.
mcdavis

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

Post Posted March 31st, 2014, 2:22 pm

For the record:

I was having a problem in Fx29 where I would enter customization mode but not be able to exit it. Clicking the Exit Customize button at the bottom of the simulated menupanel would do nothing (other than throw errors, see below). To get out of customization, I had to close the tab holding the customization screen and restart the browser.

It turned out I was using the wrong binding on #nav-bar, which was breaking customization. I was using
Code: Select all
   -moz-binding:url("chrome://global/content/bindings/toolbar.xml#toolbar-drag")

, which was wrong; the correct one is
Code: Select all
-moz-binding:url("chrome://browser/content/customizableui/toolbar.xml#toolbar")

Using the right binding (or, in my case, not overwriting the right binding, since it's applied in content/browser.css) fixed it.

The errors being thrown were:

Area not yet restored CustomizableUI.jsm:2947
"[CustomizeMode]" TypeError: target is null CustomizeMode.jsm:928
"[CustomizeMode]" TypeError: currentPlacements is undefined CustomizableUI.jsm:2384
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 May 7th, 2014, 9:31 am

Here's a summary of toolbar-related bindings used in the main browser window for Fx29. The last time I went over this in detail was for Fx29b3, but I think it's still good.

Code: Select all
toolbar binding situation with australis fx29b3 with def theme

      - linux:

        toolbar                   draggable   customizable    binding
        ------------------------  ----------  --------------  -------------------------------------------
        titlebar [1]              n/a         n/a             n/a
        menubar, not autohide     yes         yes             chrome://browser/content/customizableui/toolbar.xml#toolbar-drag
        menubar, autohide         no          yes [2]         chrome://browser/content/customizableui/toolbar.xml#toolbar-menubar-autohide
        tabs toolbar              yes         yes             chrome://browser/content/customizableui/toolbar.xml#toolbar-drag
        nav bar                   no          yes             chrome://browser/content/customizableui/toolbar.xml#toolbar
        bookmarks toolbar         no          yes             chrome://browser/content/customizableui/toolbar.xml#toolbar
        addon-bar                 n/a         no              chrome://browser/content/customizableui/toolbar.xml#addonbar-delegating

        also:
        - [1] #titlebar simply doesn't exist in DOM for linux, period
        - [2] it has the [customizable] attribute, but to actually drag items on/off of it, it can't be autohidden, else it stays hidden during customization
        - option to pick visible toolbars during customization: yes
        - option to show/hide titlebar during customization: no

      - osx:

        toolbar                       draggable   customizable    binding
        ----------------------------  ----------  --------------  -------------------------------------------
        titlebar, no persona [1]      n/a         n/a             chrome://global/content/bindings/general.xml#windowdragbox
        titlebar, with persona [2]    yes         no              chrome://global/content/bindings/general.xml#windowdragbox
        menubar, not autohide [3]     n/a         n/a             chrome://browser/content/customizableui/toolbar.xml#toolbar-menubar-stub
        menubar, autohide [4]         n/a         n/a             ?
        tabs toolbar                  yes         yes             chrome://browser/content/customizableui/toolbar.xml#toolbar-drag
        nav bar                       yes         yes             chrome://browser/content/customizableui/toolbar.xml#toolbar-drag
        bookmarks toolbar             yes         yes             chrome://browser/content/customizableui/toolbar.xml#toolbar-drag
        addon-bar                     n/a         no              chrome://browser/content/customizableui/toolbar.xml#addonbar-delegating

        also:
        - [1] #titlebar hidden when no persona with display: none from content/browser.css
        - [2] #titlebar not hidden when using a persona, and has height and width, but carries no visible styling (it's fully transparent)
        - [3] menubar not actually shown in browser ui; this DOM is reinterpreted into the desktop menubar
        - [4] menubar is probably never autohide on osx (desktop menubar instead)
        - option to pick visible toolbars during customization: no
        - option to show/hide titlebar during customization: yes

      - mswindows:

        toolbar                       draggable   customizable    binding
        ----------------------------  ----------  --------------  -------------------------------------------
        titlebar, no persona          yes         no              chrome://global/content/bindings/general.xml#windowdragbox
        titlebar, with persona        yes         no              chrome://global/content/bindings/general.xml#windowdragbox
        menubar, not autohide         yes         yes             chrome://browser/content/customizableui/toolbar.xml#toolbar-drag
        menubar, autohide             no          n/a [1]         chrome://browser/content/customizableui/toolbar.xml#toolbar-menubar-autohide
        tabs toolbar                  yes         yes             chrome://browser/content/customizableui/toolbar.xml#toolbar-drag
        nav bar                       no          yes             chrome://browser/content/customizableui/toolbar.xml#toolbar
        bookmarks toolbar             no          yes             chrome://browser/content/customizableui/toolbar.xml#toolbar
        addon-bar                     n/a         no              chrome://browser/content/customizableui/toolbar.xml#addonbar-delegating

        also:
        - [1] it has the [customizable] attribute, but to actually drag items on/off of it, it can't be autohidden, else it stays hidden during customization
        - option to pick visible toolbars during customization: yes
        - option to show/hide titlebar during customization: yes

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 1 guest