From d28cd96e682c48cb6f917f5d5ed389f1a58f80ff Mon Sep 17 00:00:00 2001 From: "Ryan A. C." Date: Fri, 11 Jul 2008 16:30:30 +0200 Subject: [PATCH] Backed out changeset 9718a9421ee3 --- layout/style/nsCSSKeywordList.h | 1 - layout/style/nsCSSProps.cpp | 1 - layout/style/test/property_database.js | 2 +- widget/public/nsILookAndFeel.h | 5 ----- widget/src/cocoa/nsLookAndFeel.mm | 4 ---- widget/src/gtk2/nsLookAndFeel.cpp | 18 ------------------ widget/src/gtk2/nsLookAndFeel.h | 1 - widget/src/windows/nsLookAndFeel.cpp | 3 --- widget/src/xpwidgets/nsXPLookAndFeel.cpp | 3 +-- 9 files changed, 2 insertions(+), 36 deletions(-) diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index 168d50f30bb..7870cdffd24 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -154,7 +154,6 @@ CSS_KEY(-moz-menubarhovertext, _moz_menubarhovertext) CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline) CSS_KEY(-moz-min-content, _moz_min_content) CSS_KEY(-moz-myanmar, _moz_myanmar) -CSS_KEY(-moz-nativehyperlinktext, _moz_nativehyperlinktext) CSS_KEY(-moz-none, _moz_none) CSS_KEY(-moz-oddtreerow, _moz_oddtreerow) CSS_KEY(-moz-oriya, _moz_oriya) diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 28573a12ad9..009eae45ecd 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -468,7 +468,6 @@ const PRInt32 nsCSSProps::kColorKTable[] = { eCSSKeyword_currentcolor, NS_COLOR_CURRENTCOLOR, eCSSKeyword__moz_win_mediatext, nsILookAndFeel::eColor__moz_win_mediatext, eCSSKeyword__moz_win_communicationstext, nsILookAndFeel::eColor__moz_win_communicationstext, - eCSSKeyword__moz_nativehyperlinktext, nsILookAndFeel::eColor__moz_nativehyperlinktext, eCSSKeyword_UNKNOWN,-1 }; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 124e047508a..4b406192a43 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -792,7 +792,7 @@ var gCSSProperties = { type: CSS_TYPE_LONGHAND, /* XXX should test currentColor, but may or may not be initial */ 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" ] }, "content": { diff --git a/widget/public/nsILookAndFeel.h b/widget/public/nsILookAndFeel.h index 61876848aff..10523fc61ee 100644 --- a/widget/public/nsILookAndFeel.h +++ b/widget/public/nsILookAndFeel.h @@ -165,11 +165,6 @@ public: eColor__moz_win_mediatext, // media 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 eColor_LAST_COLOR } nsColorID; diff --git a/widget/src/cocoa/nsLookAndFeel.mm b/widget/src/cocoa/nsLookAndFeel.mm index ac00de61159..b216da4ab2b 100644 --- a/widget/src/cocoa/nsLookAndFeel.mm +++ b/widget/src/cocoa/nsLookAndFeel.mm @@ -350,10 +350,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) // Background color of odd list rows. res = GetMacBrushColor(kThemeBrushListViewEvenRowBackground, aColor, NS_RGB(0xF0,0xF0,0xF0)); 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: NS_WARNING("Someone asked nsILookAndFeel for a color I don't know about"); aColor = NS_RGB(0xff,0xff,0xff); diff --git a/widget/src/gtk2/nsLookAndFeel.cpp b/widget/src/gtk2/nsLookAndFeel.cpp index 6ed6ad3fdac..bb23e01834d 100644 --- a/widget/src/gtk2/nsLookAndFeel.cpp +++ b/widget/src/gtk2/nsLookAndFeel.cpp @@ -57,7 +57,6 @@ nscolor nsLookAndFeel::sButtonText = 0; nscolor nsLookAndFeel::sButtonOuterLightBorder = 0; nscolor nsLookAndFeel::sButtonInnerDarkBorder = 0; nscolor nsLookAndFeel::sOddCellBackground = 0; -nscolor nsLookAndFeel::sNativeHyperLinkText = 0; PRUnichar nsLookAndFeel::sInvisibleCharacter = PRUnichar('*'); float nsLookAndFeel::sCaretRatio = 0; @@ -306,9 +305,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor) case eColor__moz_oddtreerow: aColor = sOddCellBackground; break; - case eColor__moz_nativehyperlinktext: - aColor = sNativeHyperLinkText; - break; default: /* default color is BLACK */ aColor = 0; @@ -678,23 +674,19 @@ nsLookAndFeel::InitLookAndFeel() GtkWidget *label = gtk_label_new("M"); GtkWidget *window = gtk_window_new(GTK_WINDOW_POPUP); 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(parent), button); gtk_container_add(GTK_CONTAINER(parent), treeView); - gtk_container_add(GTK_CONTAINER(parent), linkButton); gtk_container_add(GTK_CONTAINER(window), parent); gtk_widget_set_rc_style(button); gtk_widget_set_rc_style(label); gtk_widget_set_rc_style(treeView); - gtk_widget_set_rc_style(linkButton); gtk_widget_realize(button); gtk_widget_realize(label); gtk_widget_realize(treeView); - gtk_widget_realize(linkButton); style = gtk_widget_get_style(label); if (style) { @@ -738,16 +730,6 @@ nsLookAndFeel::InitLookAndFeel() 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); // invisible character styles diff --git a/widget/src/gtk2/nsLookAndFeel.h b/widget/src/gtk2/nsLookAndFeel.h index db64f8dc415..c2f4baca30a 100644 --- a/widget/src/gtk2/nsLookAndFeel.h +++ b/widget/src/gtk2/nsLookAndFeel.h @@ -72,7 +72,6 @@ protected: static nscolor sButtonOuterLightBorder; static nscolor sButtonInnerDarkBorder; static nscolor sOddCellBackground; - static nscolor sNativeHyperLinkText; static PRUnichar sInvisibleCharacter; static float sCaretRatio; diff --git a/widget/src/windows/nsLookAndFeel.cpp b/widget/src/windows/nsLookAndFeel.cpp index 4bdf9a45255..c35e9df76ed 100644 --- a/widget/src/windows/nsLookAndFeel.cpp +++ b/widget/src/windows/nsLookAndFeel.cpp @@ -398,9 +398,6 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor) case eColor__moz_buttondefault: idx = COLOR_3DDKSHADOW; break; - case eColor__moz_nativehyperlinktext: - idx = COLOR_HOTLIGHT; - break; default: idx = COLOR_WINDOW; break; diff --git a/widget/src/xpwidgets/nsXPLookAndFeel.cpp b/widget/src/xpwidgets/nsXPLookAndFeel.cpp index 28cfec9a983..3e010b76cc9 100644 --- a/widget/src/xpwidgets/nsXPLookAndFeel.cpp +++ b/widget/src/xpwidgets/nsXPLookAndFeel.cpp @@ -242,8 +242,7 @@ const char nsXPLookAndFeel::sColorPrefs[][38] = "ui.-moz-mac-alternateprimaryhighlight", "ui.-moz-mac-secondaryhighlight", "ui.-moz-win-mediatext", - "ui.-moz-win-communicationstext", - "ui.-moz-nativehyperlinktext" + "ui.-moz-win-communicationstext" }; PRInt32 nsXPLookAndFeel::sCachedColors[nsILookAndFeel::eColor_LAST_COLOR] = {0};