Back out bug 511107 (e75c771c6ab8) due to browser-chrome test failures.

--HG--
extra : rebase_source : 1a85c6929ee9d57873c6866297431022fe8a86c8
This commit is contained in:
Ryan Flint 2009-09-03 22:12:28 -04:00
Родитель 547b038370
Коммит 3eb797f66d
19 изменённых файлов: 12 добавлений и 380 удалений

Просмотреть файл

@ -17,16 +17,6 @@ toolbarpaletteitem[place="palette"] > toolbaritem > hbox[type="places"] {
display: none;
}
#main-window[lwtheme="true"] {
background-repeat: no-repeat;
background-position: top right;
}
#browser-bottombox[lwthemefooter="true"] {
background-repeat: no-repeat;
background-position: bottom left;
}
/* ::::: location bar ::::: */
#urlbar {
-moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);

Просмотреть файл

@ -80,8 +80,6 @@
titlemodifier_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
#endif
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
lightweightthemes="true"
lightweightthemesfooter="browser-bottombox"
windowtype="navigator:browser"
screenX="4" screenY="4"
browsingmode="normal"

Просмотреть файл

@ -70,16 +70,6 @@
padding-top: 0;
}
#main-window[lwtheme="true"] #urlbar:not([focused="true"]),
#main-window[lwtheme="true"] #searchbar > textbox:not([focused="true"]),
#main-window[lwtheme="true"] .tabbrowser-tab:not([selected="true"]) {
opacity: .85;
}
#main-window[lwtheme="true"] .tabbrowser-tab {
text-shadow: none;
}
/* Places toolbar */
toolbarbutton.bookmark-item {
margin: 0;

Просмотреть файл

@ -46,79 +46,6 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
#main-window[lwtheme="true"] #urlbar:not([focused="true"]),
#main-window[lwtheme="true"] #searchbar > textbox:not([focused="true"]) {
opacity: .9;
}
#main-window[lwtheme="true"] > #navigator-toolbox toolbarbutton {
color: inherit !important;
text-shadow: inherit;
}
#main-window[lwtheme="true"] #PersonalToolbar,
#main-window[lwtheme="true"] #nav-bar {
-moz-appearance: none !important;
background: none !important;
border-style: none !important;
}
#main-window[lwtheme="true"] .tabbrowser-strip,
#main-window[lwtheme="true"] .tabbrowser-tabs {
background: none !important;
}
#main-window[lwtheme="true"] .tabbrowser-tab,
#main-window[lwtheme="true"]:not([active="true"]) .tabbrowser-tab {
color: inherit;
text-shadow: inherit;
}
#main-window[lwtheme="true"] .tabbrowser-tab[selected="true"] {
background-color: transparent !important;
}
#main-window[lwtheme="true"] .tabbrowser-tab:not([selected="true"]):not(:hover) > .tab-text {
opacity: .8;
}
#main-window[lwtheme="true"] .tabbrowser-arrowscrollbox > .tabs-newtab-button {
width: auto;
-moz-box-flex: 1;
-moz-box-pack: start;
border-style: none;
background: none;
}
#main-window[lwthemetextcolor="bright"] .tabbrowser-tab {
-moz-border-left-colors: rgba(255,255,255,.1) rgba(255,255,255,.6) rgba(255,255,255,.2);
-moz-border-bottom-colors: rgba(255,255,255,.1) rgba(255,255,255,.6) rgba(255,255,255,.2);
-moz-border-right-colors: rgba(255,255,255,.1) rgba(255,255,255,.6) rgba(255,255,255,.2);
}
#main-window[lwthemetextcolor="bright"] .tabbrowser-tab[selected="true"] {
-moz-border-left-colors: rgba(255,255,255,.6) rgba(255,255,255,.2);
-moz-border-bottom-colors: rgba(255,255,255,.6) rgba(255,255,255,.2);
-moz-border-right-colors: rgba(255,255,255,.6) rgba(255,255,255,.2);
}
#main-window[lwthemetextcolor="dark"] .tabs-newtab-button,
#main-window[lwthemetextcolor="dark"] .tabs-alltabs-button,
#main-window[lwthemetextcolor="dark"] .tabs-container > .tabs-closebutton,
#main-window[lwthemetextcolor="dark"] .tabbrowser-arrowscrollbox > .scrollbutton-up,
#main-window[lwthemetextcolor="dark"] .tabbrowser-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down,
#main-window[lwthemetextcolor="dark"] .tabbrowser-tab:not([selected="true"]) {
-moz-box-shadow: inset 0 1px 0 rgba(50,50,50,.5);
}
#main-window[lwthemetextcolor="bright"] .tabs-newtab-button,
#main-window[lwthemetextcolor="bright"] .tabs-alltabs-button,
#main-window[lwthemetextcolor="bright"] .tabs-container > .tabs-closebutton,
#main-window[lwthemetextcolor="bright"] .tabbrowser-arrowscrollbox > .scrollbutton-up,
#main-window[lwthemetextcolor="bright"] .tabbrowser-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down,
#main-window[lwthemetextcolor="bright"] .tabbrowser-tab:not([selected="true"]) {
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
#main-window {
-moz-appearance: none;
background-color: #eeeeee;
@ -1349,7 +1276,6 @@ richlistitem[selected="true"][current="true"] > hbox > .ac-result-type-bookmark,
sidebarheader {
background-color: #d4dde5;
padding: 2px;
text-shadow: none;
}
#sidebar-box {
@ -1495,6 +1421,7 @@ tabbrowser > tabbox {
margin-bottom: 0;
font: message-box;
font-weight: bold;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.tabbrowser-tab,
@ -1502,7 +1429,6 @@ tabbrowser > tabbox {
-moz-appearance: none;
-moz-border-radius: 0 0 6px 6px;
color: #222;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
margin: 0 0 1px;
padding: 0 5px;
border-style: none solid solid;

Просмотреть файл

@ -46,19 +46,6 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
#main-window[lwtheme="true"] #urlbar:not([focused="true"]),
#main-window[lwtheme="true"] #searchbar > textbox:not([focused="true"]) {
opacity: .85;
}
#main-window[lwtheme="true"] .tabbrowser-tab[selected="true"] {
text-shadow: none;
}
#main-window[lwtheme="true"] .tabbrowser-tab:not([selected="true"]) {
color: inherit;
}
#menubar-items {
-moz-box-orient: vertical; /* for flex hack */
}

Просмотреть файл

@ -1,121 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org Code.
*
* The Initial Developer of the Original Code is
* Dao Gottwald <dao@mozilla.com>.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
let EXPORTED_SYMBOLS = ["LightweightThemeConsumer"];
function LightweightThemeConsumer(aDocument) {
this._doc = aDocument;
this._footerId = aDocument.documentElement.getAttribute("lightweightthemesfooter");
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService)
.addObserver(this, "lightweight-theme-changed", false);
var temp = {};
Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", temp);
this._update(temp.LightweightThemeManager.currentTheme);
}
LightweightThemeConsumer.prototype = {
observe: function (aSubject, aTopic, aData) {
if (aTopic != "lightweight-theme-changed")
return;
this._update(JSON.parse(aData));
},
destroy: function () {
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService)
.removeObserver(this, "lightweight-theme-changed");
this._doc = null;
},
_update: function (aData) {
if (!aData)
aData = { headerURL: "", footerURL: "", textColor: "", dominantColor: "" };
var root = this._doc.documentElement;
var active = !!aData.headerURL;
if (active) {
root.style.color = aData.textColor || "black";
let [r, g, b] = _parseRGB(this._doc.defaultView.getComputedStyle(root, "").color);
let brightness = (r + g + b) / 3;
root.setAttribute("lwthemetextcolor", brightness <= 127 ? "dark" : "bright");
root.setAttribute("lwtheme", "true");
} else {
root.style.color = "";
root.removeAttribute("lwthemetextcolor");
root.removeAttribute("lwtheme");
}
_setImage(root, active, aData.headerURL);
if (this._footerId) {
let footer = this._doc.getElementById(this._footerId);
_setImage(footer, active, aData.footerURL);
if (active && aData.footerURL)
footer.setAttribute("lwthemefooter", "true");
else
footer.removeAttribute("lwthemefooter");
}
if (root.hasAttribute("activetitlebarcolor")) {
if (!root.hasAttribute("originalactivetitlebarcolor")) {
root.setAttribute("originalactivetitlebarcolor",
root.getAttribute("activetitlebarcolor"));
root.setAttribute("originalinactivetitlebarcolor",
root.getAttribute("inactivetitlebarcolor"));
}
root.setAttribute("activetitlebarcolor", aData.dominantColor
|| root.getAttribute("originalactivetitlebarcolor"));
root.setAttribute("inactivetitlebarcolor", aData.dominantColor
|| root.getAttribute("originalinactivetitlebarcolor"));
}
}
}
function _setImage(aElement, aActive, aURL) {
aElement.style.backgroundImage =
(aActive && aURL) ? 'url("' + aURL.replace('"', '\\"', "g") + '")' : "";
}
function _parseRGB(aColorString) {
var rgb = aColorString.match(/^rgba?\((\d+), (\d+), (\d+)/);
rgb.shift();
return rgb.map(function (x) parseInt(x));
}

Просмотреть файл

@ -80,7 +80,6 @@ endif
EXTRA_JS_MODULES = \
debug.js \
LightweightThemeConsumer.jsm \
WindowDraggingUtils.jsm \
$(NULL)

Просмотреть файл

@ -4,11 +4,14 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="dialog" extends="chrome://global/content/bindings/general.xml#root-element">
<binding id="dialog-base">
<resources>
<stylesheet src="chrome://global/skin/dialog.css"/>
</resources>
</binding>
<binding id="dialog" extends="chrome://global/content/bindings/dialog.xml#dialog-base">
<content>
<xul:vbox class="box-inherit dialog-content-box" flex="1">
<children/>
@ -418,10 +421,7 @@
</binding>
<binding id="dialogheader">
<resources>
<stylesheet src="chrome://global/skin/dialog.css"/>
</resources>
<binding id="dialogheader" extends="chrome://global/content/bindings/dialog.xml#dialog-base">
<content>
<xul:label class="dialogheader-title" xbl:inherits="value=title,crop" crop="right" flex="1"/>
<xul:label class="dialogheader-description" xbl:inherits="value=description"/>

Просмотреть файл

@ -60,25 +60,6 @@
</implementation>
</binding>
<binding id="root-element">
<implementation>
<field name="_lightweightTheme">null</field>
<constructor><![CDATA[
if (this.hasAttribute("lightweightthemes")) {
let temp = {};
Components.utils.import("resource://gre/modules/LightweightThemeConsumer.jsm", temp);
this._lightweightTheme = new temp.LightweightThemeConsumer(this.ownerDocument);
}
]]></constructor>
<destructor><![CDATA[
if (this._lightweightTheme) {
this._lightweightTheme.destroy();
this._lightweightTheme = null;
}
]]></destructor>
</implementation>
</binding>
<!--
Inline Editable UI Element
- This binding forms the basis of the inline edit treecell and the inline edit

Просмотреть файл

@ -16,10 +16,7 @@
</resources>
</binding>
<binding id="wizard" extends="chrome://global/content/bindings/general.xml#root-window">
<resources>
<stylesheet src="chrome://global/skin/wizard.css"/>
</resources>
<binding id="wizard" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
<content>
<xul:hbox class="wizard-header" anonid="Header"/>

Просмотреть файл

@ -19,7 +19,6 @@
:root {
text-rendering: optimizeLegibility;
-moz-binding: url("chrome://global/content/bindings/general.xml#root-element");
}
:root:-moz-locale-dir(rtl) {
@ -989,8 +988,7 @@ stringbundle {
/********** dialog **********/
dialog,
dialog:root /* ovverride :root from above */ {
dialog {
-moz-binding: url("chrome://global/content/bindings/dialog.xml#dialog");
-moz-box-orient: vertical;
}
@ -1007,8 +1005,7 @@ page {
/********** wizard **********/
wizard,
wizard:root /* ovverride :root from above */ {
wizard {
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard");
-moz-box-orient: vertical;
width: 40em;
@ -1031,8 +1028,7 @@ wizardpage {
/********** preferences ********/
prefwindow,
prefwindow:root /* ovverride :root from above */ {
prefwindow {
-moz-binding: url("chrome://global/content/bindings/preferences.xml#prefwindow");
-moz-box-orient: vertical;
}

Просмотреть файл

@ -188,36 +188,6 @@ toolbar[mode="text"] .toolbarbutton-text {
/* ::::: miscellaneous formatting ::::: */
:root[lwtheme="true"],
[lwthemefooter="true"],
:root[lwtheme="true"] toolbar,
:root[lwtheme="true"] statusbarpanel {
-moz-appearance: none;
}
:root[lwtheme="true"] sidebarheader {
background: none;
}
:root[lwthemetextcolor="dark"] {
text-shadow: 1px 1px 2px white;
}
:root[lwthemetextcolor="bright"] {
text-shadow: 1px 1px 2px black;
}
:root[lwtheme="true"] menubar > menu,
:root[lwtheme="true"] toolbarbutton {
text-shadow: none;
}
:root[lwtheme="true"] menubar > menu:not([open="true"]),
:root[lwtheme="true"] toolbarbutton:not(:hover):not([checked="true"]):not([open="true"]):not([disabled="true"]) {
color: inherit;
text-shadow: inherit;
}
.inset {
border: 1px solid ThreeDShadow;
border-right-color: ThreeDHighlight;

Просмотреть файл

@ -3,7 +3,6 @@
notification {
background-color: InfoBackground;
color: InfoText;
text-shadow: none;
}
notification[type="info"] {

Просмотреть файл

@ -42,7 +42,6 @@ findbar {
border: @roundButtonBorder@;
background: @roundButtonBackground@;
-moz-box-shadow: @roundButtonShadow@;
color: buttontext;
}
.findbar-container > toolbarbutton:focus {

Просмотреть файл

@ -164,41 +164,6 @@ statusbarpanel {
/* ::::: miscellaneous formatting ::::: */
:root[lwtheme="true"],
[lwthemefooter="true"], {
-moz-appearance: none;
}
:root[lwthemetextcolor="dark"] {
text-shadow: 1px 1px 2px white;
}
:root[lwthemetextcolor="bright"] {
text-shadow: 1px 1px 2px black;
}
:root[lwtheme="true"] toolbar,
:root[lwtheme="true"] findbar,
:root[lwtheme="true"] statusbar {
-moz-appearance: none;
background: none;
border-style: none;
}
:root[lwtheme="true"] splitter {
background: none;
}
:root[lwtheme="true"] statusbar {
text-shadow: inherit;
}
:root[lwtheme="true"] .findbar-container > label,
:root[lwtheme="true"] .findbar-find-status {
color: inherit;
text-shadow: inherit;
}
.inset {
border: 1px solid ThreeDShadow;
border-right-color: ThreeDHighlight;

Просмотреть файл

@ -6,8 +6,7 @@
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="unifiedWindow"
extends="chrome://global/content/bindings/general.xml#root-window">
<binding id="unifiedWindow">
<content activetitlebarcolor="#C9C9C9" inactivetitlebarcolor="#E4E4E4"/>
</binding>

Просмотреть файл

@ -2,7 +2,6 @@
notification {
padding: 3px 3px 4px;
text-shadow: none;
}
notification[type="info"] {

Просмотреть файл

@ -188,47 +188,6 @@ toolbar[mode="text"] .toolbarbutton-text {
/* ::::: miscellaneous formatting ::::: */
:root[lwtheme="true"],
[lwthemefooter="true"] {
-moz-appearance: none;
}
:root[lwthemetextcolor="dark"] {
text-shadow: 1px 1px 2px white;
}
:root[lwthemetextcolor="bright"] {
text-shadow: 1px 1px 2px black;
}
:root[lwtheme="true"] toolbox,
:root[lwtheme="true"] toolbar,
:root[lwtheme="true"] statusbar,
:root[lwtheme="true"] sidebarheader,
:root[lwtheme="true"] .tabbrowser-tabs {
-moz-appearance: none;
background: none;
border-style: none;
}
:root[lwtheme="true"] splitter {
background: none;
}
:root[lwtheme="true"] toolbarbutton {
text-shadow: none;
}
:root[lwtheme="true"] menubar > menu {
-moz-appearance: none;
color: inherit;
}
:root[lwtheme="true"] toolbarbutton:not(:hover):not([checked="true"]):not([open="true"]):not([disabled="true"]) {
color: inherit;
text-shadow: inherit;
}
.inset {
border: 1px solid ThreeDShadow;
border-right-color: ThreeDHighlight;

Просмотреть файл

@ -3,7 +3,6 @@
notification {
background-color: InfoBackground;
color: InfoText;
text-shadow: none;
}
notification[type="info"] {