This commit is contained in:
Mike Conley 2013-04-24 11:17:47 -04:00
commit a8b2de3815
37 changed files with 104 additions and 41 deletions

View File

@ -10,7 +10,7 @@ searchbar {
}
#nav-bar {
-moz-binding: url("chrome://browser/content/toolbar.xml#toolbar");
-moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar");
}
tabbrowser {

View File

@ -3508,7 +3508,8 @@ var XULBrowserWindow = {
statusText: "",
isBusy: false,
// The pages in this array should be kept in sync with what pages that
// panelUIOverlay.xul is set to overlay in /browser/base/jar.mn
// panelUIOverlay.xul is set to overlay in
// browser/components/customizableui/content/jar.mn
inContentWhitelist: ["about:addons", "about:downloads", "about:permissions",
"about:sync-progress", "about:preferences"],

View File

@ -9,7 +9,7 @@
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/panelUIOverlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?>
@ -468,7 +468,7 @@
</popupnotificationcontent>
</popupnotification>
#include panelUI.inc
#include ../../components/customizableui/content/panelUI.inc.xul
</popupset>
#ifdef CAN_DRAW_IN_TITLEBAR
@ -1117,7 +1117,7 @@
</vbox>
<vbox id="browser-border-end" hidden="true" layer="true"/>
</hbox>
#include customize.inc
#include ../../components/customizableui/content/customizeMode.inc.xul
</deck>
<hbox id="full-screen-warning-container" hidden="true" fadeout="true">

View File

@ -9,6 +9,6 @@
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
<script type="application/javascript" src="chrome://browser/content/downloads/downloads.js"/>
<script type="application/javascript" src="chrome://browser/content/downloads/indicator.js"/>
<script type="application/javascript" src="chrome://browser/content/panelUI.js"/>
<script type="application/javascript" src="chrome://browser/content/customizableui/panelUI.js"/>
<script type="application/javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>
<script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/>

View File

@ -14,13 +14,6 @@ browser.jar:
% overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul
% overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul
# These overlays should be kept in sync with what pages are in
# XULBrowserWindow.inContentWhitelist in browser.js
% overlay about:addons chrome://browser/content/panelUIOverlay.xul
% overlay about:preferences chrome://browser/content/panelUIOverlay.xul
% overlay about:permissions chrome://browser/content/panelUIOverlay.xul
% overlay about:sync-progress chrome://browser/content/panelUIOverlay.xul
* content/browser/aboutDialog.xul (content/aboutDialog.xul)
* content/browser/aboutDialog.js (content/aboutDialog.js)
content/browser/aboutDialog.css (content/aboutDialog.css)
@ -66,7 +59,6 @@ browser.jar:
* content/browser/browser.xul (content/browser.xul)
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
content/browser/content.js (content/content.js)
content/browser/customizing.xhtml (content/customizing.xhtml)
content/browser/newtab/newTab.xul (content/newtab/newTab.xul)
* content/browser/newtab/newTab.js (content/newtab/newTab.js)
content/browser/newtab/newTab.css (content/newtab/newTab.css)
@ -79,9 +71,6 @@ browser.jar:
content/browser/pageinfo/feeds.xml (content/pageinfo/feeds.xml)
content/browser/pageinfo/permissions.js (content/pageinfo/permissions.js)
content/browser/pageinfo/security.js (content/pageinfo/security.js)
content/browser/panelUI.js (content/panelUI.js)
content/browser/panelUIOverlay.xul (content/panelUIOverlay.xul)
content/browser/panelUIOverlay.js (content/panelUIOverlay.js)
#ifdef MOZ_SERVICES_SYNC
content/browser/sync/aboutSyncTabs.xul (content/sync/aboutSyncTabs.xul)
content/browser/sync/aboutSyncTabs.js (content/sync/aboutSyncTabs.js)
@ -101,8 +90,6 @@ browser.jar:
content/browser/sync/progress.js (content/sync/progress.js)
content/browser/sync/progress.xhtml (content/sync/progress.xhtml)
#endif
content/browser/panelUI.xml (content/panelUI.xml)
content/browser/toolbar.xml (content/toolbar.xml)
content/browser/openLocation.js (content/openLocation.js)
content/browser/openLocation.xul (content/openLocation.xul)
content/browser/safeMode.css (content/safeMode.css)

View File

@ -84,7 +84,7 @@ static RedirEntry kRedirMap[] = {
{ "healthreport", "chrome://browser/content/abouthealthreport/abouthealth.xhtml",
nsIAboutModule::ALLOW_SCRIPT },
#endif
{ "customizing", "chrome://browser/content/customizing.xhtml",
{ "customizing", "chrome://browser/content/customizableui/aboutCustomizing.xhtml",
nsIAboutModule::ALLOW_SCRIPT },
};
static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);

View File

@ -0,0 +1,19 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
content/browser/customizableui/aboutCustomizing.xhtml
content/browser/customizableui/panelUI.js
content/browser/customizableui/panelUI.xml
content/browser/customizableui/panelUIOverlay.xul
content/browser/customizableui/panelUIOverlay.js
content/browser/customizableui/toolbar.xml
# These overlays should be kept in sync with what pages are in
# XULBrowserWindow.inContentWhitelist in browser.js
% overlay about:addons chrome://browser/content/customizableui/panelUIOverlay.xul
% overlay about:preferences chrome://browser/content/customizableui/panelUIOverlay.xul
% overlay about:permissions chrome://browser/content/customizableui/panelUIOverlay.xul
% overlay about:sync-progress chrome://browser/content/customizableui/panelUIOverlay.xul

View File

@ -0,0 +1,6 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -67,7 +67,7 @@
whether or not it is shown. That's not good for our case, since we
want to allow each subview to be uniquely sized. -->
<box id="PanelUI-subViews">
<vbox id="PanelUI-bookmarks" class="PanelUI-subView" flex="1">
<vbox id="PanelUI-bookmarks" flex="1">
<label value="&appMenuBookmarks.label;"/>
<vbox flex="1">
<toolbarbutton label="&bookmarkThisPageCmd.label;"/>

View File

@ -56,6 +56,13 @@ const PanelUI = {
this.clickCapturer.addEventListener("click", this._onCapturerClick,
true);
var self = this;
this.subViews.addEventListener("overflow", function() {
// Resize the subview on the next tick.
Services.tm.currentThread.dispatch(self._syncContainerWithSubView.bind(self),
Ci.nsIThread.DISPATCH_NORMAL);
});
// Get a MutationObserver ready to react to subview size changes. We
// only attach this MutationObserver when a subview is being displayed.
this._subViewObserver = new MutationObserver(function(aMutations) {

View File

@ -10,11 +10,11 @@
%browserDTD;
]>
<?xml-stylesheet href="chrome://browser/skin/panelUIOverlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
<overlay id="panelUIOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://browser/content/panelUIOverlay.js"/>
<script type="application/javascript" src="chrome://browser/content/customizableui/panelUIOverlay.js"/>
<hbox id="app-extension-point-end">
<toolbarbutton id="PanelUI-menu-button"

View File

@ -0,0 +1,10 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
PARALLEL_DIRS += [
'content',
'src',
]

View File

@ -123,7 +123,7 @@ XPCOMUtils.defineLazyGetter(this, "gBuiltInWidgets", function() {
},
onViewShowing: function(aEvent) {
// Populate our list of history
const kMaxResults = 10;
const kMaxResults = 15;
let doc = aEvent.detail.ownerDocument;
let options = PlacesUtils.history.getNewQueryOptions();
@ -729,6 +729,10 @@ let CustomizableUIInternal = {
throw new Error("Could not find the view node with id: " + aWidget.viewId);
}
// PanelUI relies on the .PanelUI-subView class to be able to show only
// one sub-view at a time.
viewNode.classList.add("PanelUI-subView");
for (let eventName of kSubviewEvents) {
let handler = "on" + eventName;
if (typeof aWidget[handler] == "function") {

View File

@ -531,6 +531,12 @@ CustomizeMode.prototype = {
return;
}
// Do nothing if the target was dropped onto itself (ie, no change in area
// or position).
if (draggedWrapper == targetNode) {
return;
}
// Is the target area the customization palette? If so, we have two cases -
// either the originArea was the palette, or a customizable area.
if (targetArea.id == kPaletteId) {

View File

@ -0,0 +1,17 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXTRA_JS_MODULES = \
CustomizableUI.jsm \
CustomizeMode.jsm \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,6 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

View File

@ -7,6 +7,7 @@
PARALLEL_DIRS += [
'about',
'certerror',
'customizableui',
'dirprovider',
'downloads',
'feeds',

View File

@ -13,8 +13,6 @@ include $(topsrcdir)/config/config.mk
EXTRA_JS_MODULES = \
BrowserNewTabPreloader.jsm \
CustomizableUI.jsm \
CustomizeMode.jsm \
openLocationLastURL.jsm \
NetworkPrioritizer.jsm \
offlineAppCache.jsm \

View File

@ -2175,7 +2175,7 @@ chatbox {
/* Customization mode */
%include ../shared/customization.inc.css
%include ../shared/customizableui/customizeMode.inc.css
/* End customization mode */

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -5,7 +5,7 @@
%filter substitution
%define menuPanelWidth 21em
%include ../shared/panelUIOverlay.inc.css
%include ../../shared/customizableui/panelUIOverlay.inc.css
#PanelUI-cut-btn {
list-style-image: url("moz-icon://stock/gtk-cut?size=toolbar");

View File

@ -21,7 +21,7 @@ browser.jar:
skin/classic/browser/appmenu.png
* skin/classic/browser/browser.css
skin/classic/browser/click-to-play-warning-stripes.png
skin/classic/browser/customization/customization-mode-background.jpg (customization/customization-mode-background.jpg)
skin/classic/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
* skin/classic/browser/engineManager.css
skin/classic/browser/Geolocation-16.png
skin/classic/browser/Geolocation-64.png
@ -41,7 +41,6 @@ browser.jar:
* skin/classic/browser/pageInfo.css
skin/classic/browser/pageInfo.png
skin/classic/browser/page-livemarks.png
* skin/classic/browser/panelUIOverlay.css
skin/classic/browser/pointerLock-16.png
skin/classic/browser/pointerLock-64.png
skin/classic/browser/Privacy-16.png
@ -58,6 +57,7 @@ browser.jar:
skin/classic/browser/webRTC-shareDevice-16.png
skin/classic/browser/webRTC-shareDevice-64.png
skin/classic/browser/webRTC-sharingDevice-16.png
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
skin/classic/browser/downloads/download-glow-small.png (downloads/download-glow-small.png)

View File

@ -3607,7 +3607,7 @@ chatbox {
/* Customization mode */
%include ../shared/customization.inc.css
%include ../shared/customizableui/customizeMode.inc.css
/* End customization mode */

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -5,7 +5,7 @@
%filter substitution
%define menuPanelWidth 26em
%include ../shared/panelUIOverlay.inc.css
%include ../../shared/customizableui/panelUIOverlay.inc.css
.PanelUI-pageControls toolbarbutton {
list-style-image: url("chrome://browser/skin/Toolbar.png");

View File

@ -21,7 +21,7 @@ browser.jar:
skin/classic/browser/appmenu.png
* skin/classic/browser/browser.css (browser.css)
skin/classic/browser/click-to-play-warning-stripes.png
skin/classic/browser/customization/customization-mode-background.jpg (customization/customization-mode-background.jpg)
skin/classic/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
* skin/classic/browser/engineManager.css (engineManager.css)
skin/classic/browser/Geolocation-16.png
skin/classic/browser/Geolocation-16@2x.png
@ -60,7 +60,6 @@ browser.jar:
skin/classic/browser/page-livemarks.png
skin/classic/browser/page-livemarks@2x.png
skin/classic/browser/pageInfo.css
* skin/classic/browser/panelUIOverlay.css
skin/classic/browser/pointerLock-16.png
skin/classic/browser/pointerLock-16@2x.png
skin/classic/browser/pointerLock-64.png
@ -93,6 +92,7 @@ browser.jar:
skin/classic/browser/webRTC-shareDevice-64@2x.png
skin/classic/browser/webRTC-sharingDevice-16.png
skin/classic/browser/webRTC-sharingDevice-16@2x.png
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
skin/classic/browser/downloads/buttons@2x.png (downloads/buttons@2x.png)
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)

View File

@ -5,7 +5,7 @@
/* Customization mode */
#main-window[customizing] {
background-image: url("chrome://browser/skin/customization/customization-mode-background.jpg");
background-image: url("chrome://browser/skin/customizableui/customization-mode-background.jpg");
background-size: 100% 100%;
background-repeat: no-repeat;
}

View File

@ -84,6 +84,7 @@
margin-left: 38px;
transform: translateX(@menuPanelWidth@);
transition: transform 150ms;
overflow-y: hidden;
}
#PanelUI-subViews > .PanelUI-subView:not([current]) {

View File

@ -2941,7 +2941,7 @@ chatbox {
/* Customization mode */
%include ../shared/customization.inc.css
%include ../shared/customizableui/customizeMode.inc.css
/* End customization mode */

View File

@ -5,7 +5,7 @@
%filter substitution
%define menuPanelWidth 23em
%include ../shared/panelUIOverlay.inc.css
%include ../../shared/customizableui/panelUIOverlay.inc.css
.PanelUI-pageControls toolbarbutton {
list-style-image: url("chrome://browser/skin/Toolbar.png");

View File

@ -26,7 +26,7 @@ browser.jar:
* skin/classic/browser/browser.css
* skin/classic/browser/browser-lightweightTheme.css
skin/classic/browser/click-to-play-warning-stripes.png
skin/classic/browser/customization/customization-mode-background.jpg (customization/customization-mode-background.jpg)
skin/classic/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
* skin/classic/browser/engineManager.css
skin/classic/browser/Geolocation-16.png
skin/classic/browser/Geolocation-64.png
@ -50,7 +50,6 @@ browser.jar:
skin/classic/browser/pageInfo.css
skin/classic/browser/pageInfo.png
skin/classic/browser/page-livemarks.png (feeds/feedIcon16.png)
* skin/classic/browser/panelUIOverlay.css
skin/classic/browser/pointerLock-16.png
skin/classic/browser/pointerLock-64.png
skin/classic/browser/Privacy-16.png
@ -76,6 +75,7 @@ browser.jar:
skin/classic/browser/webRTC-shareDevice-16.png
skin/classic/browser/webRTC-shareDevice-64.png
skin/classic/browser/webRTC-sharingDevice-16.png
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
skin/classic/browser/downloads/buttons.png (downloads/buttons.png)
skin/classic/browser/downloads/download-glow.png (downloads/download-glow.png)
skin/classic/browser/downloads/download-notification-finish.png (downloads/download-notification-finish.png)
@ -284,7 +284,7 @@ browser.jar:
* skin/classic/aero/browser/browser.css (browser-aero.css)
* skin/classic/aero/browser/browser-lightweightTheme.css
skin/classic/aero/browser/click-to-play-warning-stripes.png
skin/classic/aero/browser/customization/customization-mode-background.jpg (customization/customization-mode-background.jpg)
skin/classic/aero/browser/customizableui/customization-mode-background.jpg (customizableui/customization-mode-background.jpg)
* skin/classic/aero/browser/engineManager.css
skin/classic/aero/browser/Geolocation-16.png
skin/classic/aero/browser/Geolocation-64.png
@ -308,7 +308,6 @@ browser.jar:
skin/classic/aero/browser/pageInfo.css
skin/classic/aero/browser/pageInfo.png (pageInfo-aero.png)
skin/classic/aero/browser/page-livemarks.png (feeds/feedIcon16-aero.png)
* skin/classic/aero/browser/panelUIOverlay.css
skin/classic/aero/browser/pointerLock-16.png (pointerLock-16.png)
skin/classic/aero/browser/pointerLock-64.png (pointerLock-64.png)
skin/classic/aero/browser/Privacy-16.png (Privacy-16-aero.png)
@ -334,6 +333,7 @@ browser.jar:
skin/classic/aero/browser/webRTC-shareDevice-16.png
skin/classic/aero/browser/webRTC-shareDevice-64.png
skin/classic/aero/browser/webRTC-sharingDevice-16.png
* skin/classic/aero/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
skin/classic/aero/browser/downloads/buttons.png (downloads/buttons-aero.png)
skin/classic/aero/browser/downloads/download-glow.png (downloads/download-glow.png)
skin/classic/aero/browser/downloads/download-notification-finish.png (downloads/download-notification-finish.png)