зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 307256, bug 307304, bug 307924 by disabling selection for XUL elements
by default. r+sr=dbaron, with OKs from Neil and mconnor for the general idea and the xul.css changes.
This commit is contained in:
Родитель
81a57e27f2
Коммит
c00cd696d1
|
@ -87,7 +87,8 @@
|
|||
#define NS_STYLE_USER_SELECT_TOGGLE 5
|
||||
#define NS_STYLE_USER_SELECT_TRI_STATE 6
|
||||
#define NS_STYLE_USER_SELECT_AUTO 7 // internal value - please use nsFrame::IsSelectable()
|
||||
#define NS_STYLE_USER_SELECT_MOZ_ALL 8 // force selection of all children - bug 48096
|
||||
#define NS_STYLE_USER_SELECT_MOZ_ALL 8 // force selection of all children, unless an ancestor has NONE set - bug 48096
|
||||
#define NS_STYLE_USER_SELECT_MOZ_NONE 9 // Like NONE, but doesn't change selection behavior for descendants whose user-select is not AUTO.
|
||||
|
||||
// user-input
|
||||
#define NS_STYLE_USER_INPUT_NONE 0
|
||||
|
|
|
@ -1187,6 +1187,9 @@ nsFrame::IsSelectable(PRBool* aSelectable, PRUint8* aSelectStyle) const
|
|||
else
|
||||
if (selectStyle == NS_STYLE_USER_SELECT_MOZ_ALL)
|
||||
selectStyle = NS_STYLE_USER_SELECT_ALL;
|
||||
else
|
||||
if (selectStyle == NS_STYLE_USER_SELECT_MOZ_NONE)
|
||||
selectStyle = NS_STYLE_USER_SELECT_NONE;
|
||||
|
||||
// return stuff
|
||||
if (aSelectable)
|
||||
|
|
|
@ -92,6 +92,7 @@ input {
|
|||
cursor: text;
|
||||
-moz-binding: url("chrome://global/content/platformHTMLBindings.xml#inputFields");
|
||||
text-indent: 0;
|
||||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
input > .anonymous-div {
|
||||
|
@ -113,6 +114,7 @@ textarea {
|
|||
-moz-binding: url("chrome://global/content/platformHTMLBindings.xml#textAreas");
|
||||
-moz-appearance: textfield;
|
||||
text-indent: 0;
|
||||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
textarea > scrollbar {
|
||||
|
|
|
@ -145,6 +145,7 @@ CSS_KEY(-moz-menuhover, _moz_menuhover)
|
|||
CSS_KEY(-moz-menuhovertext, _moz_menuhovertext)
|
||||
CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
|
||||
CSS_KEY(-moz-myanmar, _moz_myanmar)
|
||||
CSS_KEY(-moz-none, _moz_none)
|
||||
CSS_KEY(-moz-oriya, _moz_oriya)
|
||||
CSS_KEY(-moz-persian, _moz_persian)
|
||||
CSS_KEY(-moz-popup, _moz_popup)
|
||||
|
|
|
@ -887,6 +887,7 @@ const PRInt32 nsCSSProps::kUserSelectKTable[] = {
|
|||
eCSSKeyword_toggle, NS_STYLE_USER_SELECT_TOGGLE,
|
||||
eCSSKeyword_tri_state, NS_STYLE_USER_SELECT_TRI_STATE,
|
||||
eCSSKeyword__moz_all, NS_STYLE_USER_SELECT_MOZ_ALL,
|
||||
eCSSKeyword__moz_none, NS_STYLE_USER_SELECT_MOZ_NONE,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
* {
|
||||
-moz-user-focus: ignore;
|
||||
-moz-user-select: -moz-none;
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
|
@ -652,12 +653,10 @@ spacer {
|
|||
|
||||
description {
|
||||
-moz-binding: url("chrome://global/content/bindings/text.xml#text-base");
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
label {
|
||||
-moz-binding: url("chrome://global/content/bindings/text.xml#text-label");
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
label.text-link, label[onclick] {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
* {
|
||||
-moz-user-focus: ignore;
|
||||
-moz-user-select: -moz-none;
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
|
@ -611,12 +612,10 @@ spacer {
|
|||
|
||||
description {
|
||||
-moz-binding: url("chrome://global/content/bindings/text.xml#text-base");
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
label {
|
||||
-moz-binding: url("chrome://global/content/bindings/text.xml#text-label");
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
label.text-link {
|
||||
|
|
Загрузка…
Ссылка в новой задаче