зеркало из https://github.com/mozilla/pjs.git
Backed out changeset 9718a9421ee3
This commit is contained in:
Родитель
6303245251
Коммит
8ecf35b1c8
|
@ -154,7 +154,6 @@ CSS_KEY(-moz-menubarhovertext, _moz_menubarhovertext)
|
||||||
CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
|
CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
|
||||||
CSS_KEY(-moz-min-content, _moz_min_content)
|
CSS_KEY(-moz-min-content, _moz_min_content)
|
||||||
CSS_KEY(-moz-myanmar, _moz_myanmar)
|
CSS_KEY(-moz-myanmar, _moz_myanmar)
|
||||||
CSS_KEY(-moz-nativehyperlinktext, _moz_nativehyperlinktext)
|
|
||||||
CSS_KEY(-moz-none, _moz_none)
|
CSS_KEY(-moz-none, _moz_none)
|
||||||
CSS_KEY(-moz-oddtreerow, _moz_oddtreerow)
|
CSS_KEY(-moz-oddtreerow, _moz_oddtreerow)
|
||||||
CSS_KEY(-moz-oriya, _moz_oriya)
|
CSS_KEY(-moz-oriya, _moz_oriya)
|
||||||
|
|
|
@ -468,7 +468,6 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
|
||||||
eCSSKeyword_currentcolor, NS_COLOR_CURRENTCOLOR,
|
eCSSKeyword_currentcolor, NS_COLOR_CURRENTCOLOR,
|
||||||
eCSSKeyword__moz_win_mediatext, nsILookAndFeel::eColor__moz_win_mediatext,
|
eCSSKeyword__moz_win_mediatext, nsILookAndFeel::eColor__moz_win_mediatext,
|
||||||
eCSSKeyword__moz_win_communicationstext, nsILookAndFeel::eColor__moz_win_communicationstext,
|
eCSSKeyword__moz_win_communicationstext, nsILookAndFeel::eColor__moz_win_communicationstext,
|
||||||
eCSSKeyword__moz_nativehyperlinktext, nsILookAndFeel::eColor__moz_nativehyperlinktext,
|
|
||||||
eCSSKeyword_UNKNOWN,-1
|
eCSSKeyword_UNKNOWN,-1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -792,7 +792,7 @@ var gCSSProperties = {
|
||||||
type: CSS_TYPE_LONGHAND,
|
type: CSS_TYPE_LONGHAND,
|
||||||
/* XXX should test currentColor, but may or may not be initial */
|
/* XXX should test currentColor, but may or may not be initial */
|
||||||
initial_values: [ "black", "#000" ],
|
initial_values: [ "black", "#000" ],
|
||||||
other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ],
|
other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent" ],
|
||||||
invalid_values: [ "fff", "ffffff", "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ]
|
invalid_values: [ "fff", "ffffff", "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ]
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
|
|
|
@ -165,11 +165,6 @@ public:
|
||||||
eColor__moz_win_mediatext, // media rebar text
|
eColor__moz_win_mediatext, // media rebar text
|
||||||
eColor__moz_win_communicationstext, // communications rebar text
|
eColor__moz_win_communicationstext, // communications rebar text
|
||||||
|
|
||||||
//hyperlink color extracted from the system, not affected by the browser.anchor_color user pref.
|
|
||||||
//There is no OS-specified safe background color for this text,
|
|
||||||
//but it is used regularly within Windows and the Gnome DE on Dialog and Window colors.
|
|
||||||
eColor__moz_nativehyperlinktext,
|
|
||||||
|
|
||||||
// keep this one last, please
|
// keep this one last, please
|
||||||
eColor_LAST_COLOR
|
eColor_LAST_COLOR
|
||||||
} nsColorID;
|
} nsColorID;
|
||||||
|
|
|
@ -350,10 +350,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
||||||
// Background color of odd list rows.
|
// Background color of odd list rows.
|
||||||
res = GetMacBrushColor(kThemeBrushListViewEvenRowBackground, aColor, NS_RGB(0xF0,0xF0,0xF0));
|
res = GetMacBrushColor(kThemeBrushListViewEvenRowBackground, aColor, NS_RGB(0xF0,0xF0,0xF0));
|
||||||
break;
|
break;
|
||||||
case eColor__moz_nativehyperlinktext:
|
|
||||||
// There appears to be no available system defined color. HARDCODING to the appropriate color.
|
|
||||||
aColor = NS_RGB(0x14,0x4F,0xAE);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about");
|
NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about");
|
||||||
aColor = NS_RGB(0xff,0xff,0xff);
|
aColor = NS_RGB(0xff,0xff,0xff);
|
||||||
|
|
|
@ -57,7 +57,6 @@ nscolor nsLookAndFeel::sButtonText = 0;
|
||||||
nscolor nsLookAndFeel::sButtonOuterLightBorder = 0;
|
nscolor nsLookAndFeel::sButtonOuterLightBorder = 0;
|
||||||
nscolor nsLookAndFeel::sButtonInnerDarkBorder = 0;
|
nscolor nsLookAndFeel::sButtonInnerDarkBorder = 0;
|
||||||
nscolor nsLookAndFeel::sOddCellBackground = 0;
|
nscolor nsLookAndFeel::sOddCellBackground = 0;
|
||||||
nscolor nsLookAndFeel::sNativeHyperLinkText = 0;
|
|
||||||
PRUnichar nsLookAndFeel::sInvisibleCharacter = PRUnichar('*');
|
PRUnichar nsLookAndFeel::sInvisibleCharacter = PRUnichar('*');
|
||||||
float nsLookAndFeel::sCaretRatio = 0;
|
float nsLookAndFeel::sCaretRatio = 0;
|
||||||
|
|
||||||
|
@ -306,9 +305,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
|
||||||
case eColor__moz_oddtreerow:
|
case eColor__moz_oddtreerow:
|
||||||
aColor = sOddCellBackground;
|
aColor = sOddCellBackground;
|
||||||
break;
|
break;
|
||||||
case eColor__moz_nativehyperlinktext:
|
|
||||||
aColor = sNativeHyperLinkText;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
/* default color is BLACK */
|
/* default color is BLACK */
|
||||||
aColor = 0;
|
aColor = 0;
|
||||||
|
@ -678,23 +674,19 @@ nsLookAndFeel::InitLookAndFeel()
|
||||||
GtkWidget *label = gtk_label_new("M");
|
GtkWidget *label = gtk_label_new("M");
|
||||||
GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
|
GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP);
|
||||||
GtkWidget *treeView = gtk_tree_view_new();
|
GtkWidget *treeView = gtk_tree_view_new();
|
||||||
GtkWidget *linkButton = gtk_link_button_new("http://example.com/");
|
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(button), label);
|
gtk_container_add(GTK_CONTAINER(button), label);
|
||||||
gtk_container_add(GTK_CONTAINER(parent), button);
|
gtk_container_add(GTK_CONTAINER(parent), button);
|
||||||
gtk_container_add(GTK_CONTAINER(parent), treeView);
|
gtk_container_add(GTK_CONTAINER(parent), treeView);
|
||||||
gtk_container_add(GTK_CONTAINER(parent), linkButton);
|
|
||||||
gtk_container_add(GTK_CONTAINER(window), parent);
|
gtk_container_add(GTK_CONTAINER(window), parent);
|
||||||
|
|
||||||
gtk_widget_set_rc_style(button);
|
gtk_widget_set_rc_style(button);
|
||||||
gtk_widget_set_rc_style(label);
|
gtk_widget_set_rc_style(label);
|
||||||
gtk_widget_set_rc_style(treeView);
|
gtk_widget_set_rc_style(treeView);
|
||||||
gtk_widget_set_rc_style(linkButton);
|
|
||||||
|
|
||||||
gtk_widget_realize(button);
|
gtk_widget_realize(button);
|
||||||
gtk_widget_realize(label);
|
gtk_widget_realize(label);
|
||||||
gtk_widget_realize(treeView);
|
gtk_widget_realize(treeView);
|
||||||
gtk_widget_realize(linkButton);
|
|
||||||
|
|
||||||
style = gtk_widget_get_style(label);
|
style = gtk_widget_get_style(label);
|
||||||
if (style) {
|
if (style) {
|
||||||
|
@ -738,16 +730,6 @@ nsLookAndFeel::InitLookAndFeel()
|
||||||
GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
|
GDK_COLOR_TO_NS_RGB(style->dark[GTK_STATE_NORMAL]);
|
||||||
}
|
}
|
||||||
|
|
||||||
colorValuePtr = NULL;
|
|
||||||
gtk_widget_style_get(linkButton, "link-color", &colorValuePtr, NULL);
|
|
||||||
if (colorValuePtr) {
|
|
||||||
colorValue = *colorValuePtr; //we can't pass deref pointers to GDK_COLOR_TO_NS_RGB
|
|
||||||
sNativeHyperLinkText = GDK_COLOR_TO_NS_RGB(colorValue);
|
|
||||||
gdk_color_free(colorValuePtr);
|
|
||||||
} else {
|
|
||||||
sNativeHyperLinkText = NS_RGB(0x00,0x00,0xEE);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_widget_destroy(window);
|
gtk_widget_destroy(window);
|
||||||
|
|
||||||
// invisible character styles
|
// invisible character styles
|
||||||
|
|
|
@ -72,7 +72,6 @@ protected:
|
||||||
static nscolor sButtonOuterLightBorder;
|
static nscolor sButtonOuterLightBorder;
|
||||||
static nscolor sButtonInnerDarkBorder;
|
static nscolor sButtonInnerDarkBorder;
|
||||||
static nscolor sOddCellBackground;
|
static nscolor sOddCellBackground;
|
||||||
static nscolor sNativeHyperLinkText;
|
|
||||||
static PRUnichar sInvisibleCharacter;
|
static PRUnichar sInvisibleCharacter;
|
||||||
static float sCaretRatio;
|
static float sCaretRatio;
|
||||||
|
|
||||||
|
|
|
@ -398,9 +398,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
||||||
case eColor__moz_buttondefault:
|
case eColor__moz_buttondefault:
|
||||||
idx = COLOR_3DDKSHADOW;
|
idx = COLOR_3DDKSHADOW;
|
||||||
break;
|
break;
|
||||||
case eColor__moz_nativehyperlinktext:
|
|
||||||
idx = COLOR_HOTLIGHT;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
idx = COLOR_WINDOW;
|
idx = COLOR_WINDOW;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -242,8 +242,7 @@ const char nsXPLookAndFeel::sColorPrefs[][38] =
|
||||||
"ui.-moz-mac-alternateprimaryhighlight",
|
"ui.-moz-mac-alternateprimaryhighlight",
|
||||||
"ui.-moz-mac-secondaryhighlight",
|
"ui.-moz-mac-secondaryhighlight",
|
||||||
"ui.-moz-win-mediatext",
|
"ui.-moz-win-mediatext",
|
||||||
"ui.-moz-win-communicationstext",
|
"ui.-moz-win-communicationstext"
|
||||||
"ui.-moz-nativehyperlinktext"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PRInt32 nsXPLookAndFeel::sCachedColors[nsILookAndFeel::eColor_LAST_COLOR] = {0};
|
PRInt32 nsXPLookAndFeel::sCachedColors[nsILookAndFeel::eColor_LAST_COLOR] = {0};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче