зеркало из https://github.com/mozilla/pjs.git
Bug 123477 - implement HTML button in XBL. r=jkeiser, sr=hyatt. Not turned on yet.
This commit is contained in:
Родитель
4803310131
Коммит
8dad44cf8d
|
@ -1443,6 +1443,8 @@ nsCSSFrameConstructor::CreateInputFrame(nsIPresShell *aPresShell,
|
|||
if (val.EqualsIgnoreCase("submit") ||
|
||||
val.EqualsIgnoreCase("reset") ||
|
||||
val.EqualsIgnoreCase("button")) {
|
||||
if (UseXBLForms())
|
||||
return NS_OK;
|
||||
return ConstructButtonControlFrame(aPresShell, aPresContext, aFrame);
|
||||
}
|
||||
else if (val.EqualsIgnoreCase("checkbox")) {
|
||||
|
|
|
@ -92,6 +92,32 @@ input[type="checkbox"] {
|
|||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
button {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#button");
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
input[type="button"],input[type="submit"],input[type="reset"] {
|
||||
cursor: default;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
input[type="button"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#inputButton");
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#submitButton");
|
||||
}
|
||||
|
||||
input[type="reset"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#resetButton");
|
||||
}
|
||||
|
||||
input[type="file"] > input[type="button"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#fileButton");
|
||||
}
|
||||
|
||||
/*
|
||||
* The following rules are copied from forms.css, for widgets that aren't yet
|
||||
* defined in XBL.
|
||||
|
@ -267,68 +293,6 @@ input[type="radio"]:hover:active {
|
|||
-moz-border-radius: 3px;
|
||||
}
|
||||
|
||||
/* buttons */
|
||||
button,
|
||||
input[type="reset"],
|
||||
input[type="button"],
|
||||
input[type="submit"] {
|
||||
border: 2px outset ButtonFace;
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
padding: 2px 0 2px 0;
|
||||
font: button;
|
||||
cursor: default;
|
||||
white-space: pre;
|
||||
-moz-box-sizing: border-box;
|
||||
-moz-user-select: none;
|
||||
-moz-user-focus: normal;
|
||||
-moz-binding: none;
|
||||
}
|
||||
|
||||
*|*:button-content {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button:active:hover,
|
||||
input[type="reset"]:active:hover,
|
||||
input[type="button"]:active:hover,
|
||||
input[type="submit"]:active:hover {
|
||||
border-style: inset;
|
||||
padding: 3px 0 1px 0;
|
||||
}
|
||||
|
||||
button:-moz-focus-inner,
|
||||
input[type="reset"]:-moz-focus-inner,
|
||||
input[type="button"]:-moz-focus-inner,
|
||||
input[type="submit"]:-moz-focus-inner {
|
||||
padding: 1px 2px 1px 2px;
|
||||
border: 1px dotted transparent;
|
||||
}
|
||||
|
||||
button:focus:-moz-focus-inner,
|
||||
input[type="reset"]:focus:-moz-focus-inner,
|
||||
input[type="button"]:focus:-moz-focus-inner,
|
||||
input[type="submit"]:focus:-moz-focus-inner {
|
||||
border-color: ButtonText;
|
||||
}
|
||||
|
||||
button[disabled]:active, button[disabled],
|
||||
input[type="reset"][disabled]:active,
|
||||
input[type="reset"][disabled],
|
||||
input[type="button"][disabled]:active,
|
||||
input[type="button"][disabled],
|
||||
input[type="file"][disabled] > input[type="button"],
|
||||
input[type="file"][disabled] > input[type="button"]:active,
|
||||
select[disabled] > input[type="button"],
|
||||
select[disabled] > input[type="button"]:active,
|
||||
input[type="submit"][disabled]:active,
|
||||
input[type="submit"][disabled] {
|
||||
border: 1px outset ButtonShadow;
|
||||
padding: 3px 1px 3px 1px;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
@media print {
|
||||
input, textarea, select, button {
|
||||
-moz-user-focus: none !important;
|
||||
|
|
|
@ -3,3 +3,8 @@ forms.jar:
|
|||
content/forms/xbl-forms.css (content/xbl-forms.css)
|
||||
content/forms/select.xml (content/select.xml)
|
||||
content/forms/checkbox.xml (content/checkbox.xml)
|
||||
content/forms/button.xml (content/button.xml)
|
||||
|
||||
en-US.jar:
|
||||
locale/en-US/forms/contents.rdf (locale/en-US/contents.rdf)
|
||||
locale/en-US/forms/htmlforms.dtd (locale/en-US/htmlforms.dtd)
|
||||
|
|
|
@ -43,3 +43,5 @@
|
|||
@import url("chrome://forms/skin/select.css");
|
||||
@import url("chrome://forms/skin/select-dropdown.css");
|
||||
@import url("chrome://forms/skin/checkbox.css");
|
||||
@import url("chrome://forms/skin/button.css");
|
||||
|
||||
|
|
|
@ -46,3 +46,4 @@ include $(topsrcdir)/config/rules.mk
|
|||
|
||||
libs::
|
||||
@$(REGCHROME) content forms forms.jar
|
||||
@$(REGCHROME) locale en-US/forms en-US.jar
|
||||
|
|
|
@ -92,6 +92,32 @@ input[type="checkbox"] {
|
|||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
button {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#button");
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
input[type="button"],input[type="submit"],input[type="reset"] {
|
||||
cursor: default;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
input[type="button"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#inputButton");
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#submitButton");
|
||||
}
|
||||
|
||||
input[type="reset"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#resetButton");
|
||||
}
|
||||
|
||||
input[type="file"] > input[type="button"] {
|
||||
-moz-binding: url("chrome://forms/content/button.xml#fileButton");
|
||||
}
|
||||
|
||||
/*
|
||||
* The following rules are copied from forms.css, for widgets that aren't yet
|
||||
* defined in XBL.
|
||||
|
@ -267,68 +293,6 @@ input[type="radio"]:hover:active {
|
|||
-moz-border-radius: 3px;
|
||||
}
|
||||
|
||||
/* buttons */
|
||||
button,
|
||||
input[type="reset"],
|
||||
input[type="button"],
|
||||
input[type="submit"] {
|
||||
border: 2px outset ButtonFace;
|
||||
background-color: ButtonFace;
|
||||
color: ButtonText;
|
||||
padding: 2px 0 2px 0;
|
||||
font: button;
|
||||
cursor: default;
|
||||
white-space: pre;
|
||||
-moz-box-sizing: border-box;
|
||||
-moz-user-select: none;
|
||||
-moz-user-focus: normal;
|
||||
-moz-binding: none;
|
||||
}
|
||||
|
||||
*|*:button-content {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button:active:hover,
|
||||
input[type="reset"]:active:hover,
|
||||
input[type="button"]:active:hover,
|
||||
input[type="submit"]:active:hover {
|
||||
border-style: inset;
|
||||
padding: 3px 0 1px 0;
|
||||
}
|
||||
|
||||
button:-moz-focus-inner,
|
||||
input[type="reset"]:-moz-focus-inner,
|
||||
input[type="button"]:-moz-focus-inner,
|
||||
input[type="submit"]:-moz-focus-inner {
|
||||
padding: 1px 2px 1px 2px;
|
||||
border: 1px dotted transparent;
|
||||
}
|
||||
|
||||
button:focus:-moz-focus-inner,
|
||||
input[type="reset"]:focus:-moz-focus-inner,
|
||||
input[type="button"]:focus:-moz-focus-inner,
|
||||
input[type="submit"]:focus:-moz-focus-inner {
|
||||
border-color: ButtonText;
|
||||
}
|
||||
|
||||
button[disabled]:active, button[disabled],
|
||||
input[type="reset"][disabled]:active,
|
||||
input[type="reset"][disabled],
|
||||
input[type="button"][disabled]:active,
|
||||
input[type="button"][disabled],
|
||||
input[type="file"][disabled] > input[type="button"],
|
||||
input[type="file"][disabled] > input[type="button"]:active,
|
||||
select[disabled] > input[type="button"],
|
||||
select[disabled] > input[type="button"]:active,
|
||||
input[type="submit"][disabled]:active,
|
||||
input[type="submit"][disabled] {
|
||||
border: 1px outset ButtonShadow;
|
||||
padding: 3px 1px 3px 1px;
|
||||
color: GrayText;
|
||||
}
|
||||
|
||||
@media print {
|
||||
input, textarea, select, button {
|
||||
-moz-user-focus: none !important;
|
||||
|
|
|
@ -3,3 +3,8 @@ forms.jar:
|
|||
content/forms/xbl-forms.css (content/xbl-forms.css)
|
||||
content/forms/select.xml (content/select.xml)
|
||||
content/forms/checkbox.xml (content/checkbox.xml)
|
||||
content/forms/button.xml (content/button.xml)
|
||||
|
||||
en-US.jar:
|
||||
locale/en-US/forms/contents.rdf (locale/en-US/contents.rdf)
|
||||
locale/en-US/forms/htmlforms.dtd (locale/en-US/htmlforms.dtd)
|
||||
|
|
|
@ -41,3 +41,4 @@ include <$(DEPTH)\config\rules.mak>
|
|||
|
||||
chrome::
|
||||
$(REGCHROME) content forms forms.jar
|
||||
$(REGCHROME) locale en-US/forms en-US.jar
|
||||
|
|
|
@ -43,3 +43,5 @@
|
|||
@import url("chrome://forms/skin/select.css");
|
||||
@import url("chrome://forms/skin/select-dropdown.css");
|
||||
@import url("chrome://forms/skin/checkbox.css");
|
||||
@import url("chrome://forms/skin/button.css");
|
||||
|
||||
|
|
|
@ -1443,6 +1443,8 @@ nsCSSFrameConstructor::CreateInputFrame(nsIPresShell *aPresShell,
|
|||
if (val.EqualsIgnoreCase("submit") ||
|
||||
val.EqualsIgnoreCase("reset") ||
|
||||
val.EqualsIgnoreCase("button")) {
|
||||
if (UseXBLForms())
|
||||
return NS_OK;
|
||||
return ConstructButtonControlFrame(aPresShell, aPresContext, aFrame);
|
||||
}
|
||||
else if (val.EqualsIgnoreCase("checkbox")) {
|
||||
|
|
|
@ -1,45 +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
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@netscape.com>
|
||||
*
|
||||
* 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 ***** */
|
||||
|
||||
/* This file contains skin-specific rules for HTML form controls */
|
||||
|
||||
/* xbl-forms.css contains the XBL bindings common to all skins */
|
||||
@import url("chrome://forms/content/xbl-forms.css");
|
||||
|
||||
@import url("chrome://forms/skin/select.css");
|
||||
@import url("chrome://forms/skin/select-dropdown.css");
|
||||
@import url("chrome://forms/skin/checkbox.css");
|
|
@ -281,3 +281,4 @@ classic.jar:
|
|||
skin/classic/forms/select.css (forms/select.css)
|
||||
skin/classic/forms/select-dropdown.css (forms/select-dropdown.css)
|
||||
skin/classic/forms/checkbox.css (forms/checkbox.css)
|
||||
skin/classic/forms/button.css (forms/button.css)
|
||||
|
|
|
@ -1,49 +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
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Brian Ryner <bryner@netscape.com>
|
||||
*
|
||||
* 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 ***** */
|
||||
|
||||
/* This file contains skin-specific rules for HTML form controls */
|
||||
|
||||
/* xbl-forms.css contains the XBL bindings common to all skins */
|
||||
@import url("chrome://forms/content/xbl-forms.css");
|
||||
|
||||
@import url("chrome://forms/skin/select.css");
|
||||
@import url("chrome://forms/skin/select-dropdown.css");
|
||||
@import url("chrome://forms/skin/checkbox.css");
|
||||
/*
|
||||
@import url("chrome://forms/skin/button.css");
|
||||
@import url("chrome://forms/skin/radio.css");
|
||||
*/
|
|
@ -393,3 +393,4 @@ modern.jar:
|
|||
skin/modern/forms/select.css (forms/select.css)
|
||||
skin/modern/forms/select-dropdown.css (forms/select-dropdown.css)
|
||||
skin/modern/forms/checkbox.css (forms/checkbox.css)
|
||||
skin/modern/forms/button.css (forms/button.css)
|
||||
|
|
|
@ -68,6 +68,7 @@ if (verifyDiskSpace(fProgram, srDest))
|
|||
registerChrome(chromeType, cf, localeName + "help/");
|
||||
registerChrome(chromeType, cf, localeName + "pippki/");
|
||||
registerChrome(chromeType, cf, localeName + "pipnss/");
|
||||
registerChrome(chromeType, cf, localeName + "forms/");
|
||||
|
||||
registerChrome(chromeType, pf, localeName + "global-platform/");
|
||||
registerChrome(chromeType, pf, localeName + "communicator-platform/");
|
||||
|
|
|
@ -71,6 +71,7 @@ if (verifyDiskSpace(fProgram, srDest))
|
|||
registerChrome(chromeType, cf, localeName + "net2phone/");
|
||||
registerChrome(chromeType, cf, localeName + "pipnss/");
|
||||
registerChrome(chromeType, cf, localeName + "pippki/");
|
||||
registerChrome(chromeType, cf, localeName + "forms/");
|
||||
|
||||
registerChrome(chromeType, pf, localeName + "global-platform/");
|
||||
registerChrome(chromeType, pf, localeName + "communicator-platform/");
|
||||
|
|
|
@ -69,6 +69,7 @@ if(verifyDiskSpace(fProgram, srDest))
|
|||
registerChrome(chromeType, cf, localeName + "help/");
|
||||
registerChrome(chromeType, cf, localeName + "pippki/");
|
||||
registerChrome(chromeType, cf, localeName + "pipnss/");
|
||||
registerChrome(chromeType, cf, localeName + "forms/");
|
||||
|
||||
registerChrome(chromeType, pf, localeName + "global-platform/");
|
||||
registerChrome(chromeType, pf, localeName + "communicator-platform/");
|
||||
|
|
Загрузка…
Ссылка в новой задаче