Backed out changeset 880125b33bca

--HG--
extra : rebase_source : 3d0a098f7fa3ce93e9a2840db8fd9a790cb63792
This commit is contained in:
Robert O'Callahan 2010-01-07 12:46:52 +13:00
Родитель d4106cb768
Коммит 9f3cea9005
7 изменённых файлов: 9 добавлений и 45 удалений

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

@ -95,8 +95,6 @@ CSS_KEY(-moz-dialog, _moz_dialog)
CSS_KEY(-moz-dialogtext, _moz_dialogtext)
CSS_KEY(-moz-document, _moz_document)
CSS_KEY(-moz-dragtargetzone, _moz_dragtargetzone)
CSS_KEY(-moz-entry, _moz_entry)
CSS_KEY(-moz-entrytext, _moz_entrytext)
CSS_KEY(-moz-eventreerow, _moz_eventreerow)
CSS_KEY(-moz-ethiopic-halehame, _moz_ethiopic_halehame)
CSS_KEY(-moz-ethiopic-numeric, _moz_ethiopic_numeric)

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

@ -706,8 +706,6 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
eCSSKeyword__moz_nativehyperlinktext, nsILookAndFeel::eColor__moz_nativehyperlinktext,
eCSSKeyword__moz_comboboxtext, nsILookAndFeel::eColor__moz_comboboxtext,
eCSSKeyword__moz_combobox, nsILookAndFeel::eColor__moz_combobox,
eCSSKeyword__moz_entrytext, nsILookAndFeel::eColor__moz_entrytext,
eCSSKeyword__moz_entry, nsILookAndFeel::eColor__moz_entry,
eCSSKeyword_UNKNOWN,-1
};

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

@ -56,8 +56,8 @@ textbox {
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
padding: 2px 2px 3px;
-moz-padding-start: 4px;
background-color: -moz-entry;
color: -moz-entryText;
background-color: -moz-Field;
color: -moz-FieldText;
}
textbox[isempty="true"] {

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

@ -172,10 +172,6 @@ public:
eColor__moz_comboboxtext,
eColor__moz_combobox,
// Entry text widgets
eColor__moz_entrytext,
eColor__moz_entry,
// keep this one last, please
eColor_LAST_COLOR
} nsColorID;

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

@ -70,8 +70,6 @@ nscolor nsLookAndFeel::sComboBoxText = 0;
nscolor nsLookAndFeel::sComboBoxBackground = 0;
PRUnichar nsLookAndFeel::sInvisibleCharacter = PRUnichar('*');
float nsLookAndFeel::sCaretRatio = 0;
nscolor nsLookAndFeel::sEntryText = 0;
nscolor nsLookAndFeel::sEntryBackground = 0;
//-------------------------------------------------------------------------
//
@ -336,12 +334,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
case eColor__moz_menubarhovertext:
aColor = sMenuBarHoverText;
break;
case eColor__moz_entrytext:
aColor = sEntryText;
break;
case eColor__moz_entry:
aColor = sEntryBackground;
break;
default:
/* default color is BLACK */
aColor = 0;
@ -755,7 +747,6 @@ nsLookAndFeel::InitLookAndFeel()
GtkWidget *treeView = gtk_tree_view_new();
GtkWidget *linkButton = gtk_link_button_new("http://example.com/");
GtkWidget *menuBar = gtk_menu_bar_new();
GtkWidget *entry = gtk_entry_new();
gtk_container_add(GTK_CONTAINER(button), label);
gtk_container_add(GTK_CONTAINER(combobox), comboboxLabel);
@ -764,7 +755,6 @@ nsLookAndFeel::InitLookAndFeel()
gtk_container_add(GTK_CONTAINER(parent), linkButton);
gtk_container_add(GTK_CONTAINER(parent), combobox);
gtk_container_add(GTK_CONTAINER(parent), menuBar);
gtk_container_add(GTK_CONTAINER(parent), entry);
gtk_container_add(GTK_CONTAINER(window), parent);
gtk_widget_set_style(button, NULL);
@ -774,7 +764,6 @@ nsLookAndFeel::InitLookAndFeel()
gtk_widget_set_style(combobox, NULL);
gtk_widget_set_style(comboboxLabel, NULL);
gtk_widget_set_style(menuBar, NULL);
gtk_widget_set_style(entry, NULL);
gtk_widget_realize(button);
gtk_widget_realize(label);
@ -783,7 +772,6 @@ nsLookAndFeel::InitLookAndFeel()
gtk_widget_realize(combobox);
gtk_widget_realize(comboboxLabel);
gtk_widget_realize(menuBar);
gtk_widget_realize(entry);
style = gtk_widget_get_style(label);
if (style) {
@ -805,23 +793,6 @@ nsLookAndFeel::InitLookAndFeel()
sMenuBarHoverText = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_SELECTED]);
}
style = gtk_widget_get_style(entry);
if (style) {
sEntryText = GDK_COLOR_TO_NS_RGB(style->text[GTK_STATE_NORMAL]);
GdkColor c;
if (gtk_style_lookup_color(style, "ReversedTextColor", &c)) {
if (sEntryText == GDK_COLOR_TO_NS_RGB(c)) {
if (gtk_style_lookup_color(style, "ReversedBackgroundColor", &c))
sEntryBackground = GDK_COLOR_TO_NS_RGB(c);
else
sEntryBackground = GDK_COLOR_TO_NS_RGB(style->fg[GTK_STATE_NORMAL]);
} else {
sEntryBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
}
} else
sEntryBackground = GDK_COLOR_TO_NS_RGB(style->bg[GTK_STATE_NORMAL]);
}
// GTK's guide to fancy odd row background colors:
// 1) Check if a theme explicitly defines an odd row color
// 2) If not, check if it defines an even row color, and darken it
@ -869,7 +840,11 @@ nsLookAndFeel::InitLookAndFeel()
sNativeHyperLinkText = NS_RGB(0x00,0x00,0xEE);
}
gtk_widget_destroy(window);
// invisible character styles
GtkWidget *entry = gtk_entry_new();
g_object_ref_sink(entry);
guint value;
g_object_get (entry, "invisible-char", &value, NULL);
sInvisibleCharacter = PRUnichar(value);
@ -879,7 +854,8 @@ nsLookAndFeel::InitLookAndFeel()
"cursor-aspect-ratio", &sCaretRatio,
NULL);
gtk_widget_destroy(window);
gtk_widget_destroy(entry);
g_object_unref(entry);
}
// virtual

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

@ -78,8 +78,6 @@ protected:
static nscolor sComboBoxBackground;
static PRUnichar sInvisibleCharacter;
static float sCaretRatio;
static nscolor sEntryText;
static nscolor sEntryBackground;
static void InitLookAndFeel();
void InitWidget() {

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

@ -249,9 +249,7 @@ const char nsXPLookAndFeel::sColorPrefs[][38] =
"ui.-moz-win-communicationstext",
"ui.-moz-nativehyperlinktext",
"ui.-moz-comboboxtext",
"ui.-moz-combobox",
"ui.-moz-entrytext",
"ui.-moz-entry"
"ui.-moz-combobox"
};
PRInt32 nsXPLookAndFeel::sCachedColors[nsILookAndFeel::eColor_LAST_COLOR] = {0};