Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 469864 Details for
Bug 591341
[patch]
Patch v1
add-moz-background-color-css-keyword.patch (text/plain), 6.92 KB, created by
Florian Quèze [:florian]
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
Florian Quèze [:florian]
Size:
6.92 KB
patch
obsolete
>diff --git a/layout/base/nsStyleConsts.h b/layout/base/nsStyleConsts.h >--- a/layout/base/nsStyleConsts.h >+++ b/layout/base/nsStyleConsts.h >@@ -234,16 +234,18 @@ static inline mozilla::css::Side operato > #define NS_STYLE_COLOR_INVERT 2 > #endif > > // See nsStyleColor > #define NS_COLOR_MOZ_HYPERLINKTEXT -1 > #define NS_COLOR_MOZ_VISITEDHYPERLINKTEXT -2 > #define NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT -3 > #define NS_COLOR_CURRENTCOLOR -4 >+#define NS_COLOR_MOZ_COLOR -5 >+#define NS_COLOR_MOZ_BACKGROUND_COLOR -6 > > // See nsStyleBackground > #define NS_STYLE_BG_ATTACHMENT_SCROLL 0 > #define NS_STYLE_BG_ATTACHMENT_FIXED 1 > > // See nsStyleBackground > // Code depends on these constants having the same values as BG_ORIGIN_* > #define NS_STYLE_BG_CLIP_BORDER 0 >diff --git a/layout/reftests/backgrounds/background-moz-background-color-ref.html b/layout/reftests/backgrounds/background-moz-background-color-ref.html >new file mode 100644 >--- /dev/null >+++ b/layout/reftests/backgrounds/background-moz-background-color-ref.html >@@ -0,0 +1,9 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>-moz-background-color and -moz-color; reference</title> >+</head> >+<body> >+Test -moz-background-color and -moz-color. >+</body> >+</html> >diff --git a/layout/reftests/backgrounds/background-moz-background-color.html b/layout/reftests/backgrounds/background-moz-background-color.html >new file mode 100644 >--- /dev/null >+++ b/layout/reftests/backgrounds/background-moz-background-color.html >@@ -0,0 +1,17 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>-moz-background-color and -moz-color</title> >+ <style type="text/css"> >+body { >+ color: green; >+ color: -moz-color; >+ background-color: red; >+ background-color: -moz-background-color; >+} >+ </style> >+</head> >+<body> >+Test -moz-background-color and -moz-color. >+</body> >+</html> >diff --git a/layout/reftests/backgrounds/reftest.list b/layout/reftests/backgrounds/reftest.list >--- a/layout/reftests/backgrounds/reftest.list >+++ b/layout/reftests/backgrounds/reftest.list >@@ -101,8 +101,11 @@ > fails-if(!gtk2Widget) == background-size-zoom-repeat.html background-size-zoom-repeat-ref.html > > # background-size affects images without intrinsic dimensions specially; we may > # not support such image formats right now, but when we do, we want > # background-size to be changed accordingly, and hopefully these tests should > # start failing when we do. > fails == background-size-no-intrinsic-width-image.html background-size-no-intrinsic-width-image-ref.html > fails == background-size-no-intrinsic-height-image.html background-size-no-intrinsic-height-image-ref.html >+ >+# -moz-background-color and -moz-color >+== background-moz-background-color.html background-moz-background-color-ref.html >diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h >--- a/layout/style/nsCSSKeywordList.h >+++ b/layout/style/nsCSSKeywordList.h >@@ -68,27 +68,29 @@ > // MACRO_NAME=CSS_KEY > > CSS_KEY(-moz-activehyperlinktext, _moz_activehyperlinktext) > CSS_KEY(-moz-all, _moz_all) > CSS_KEY(-moz-alt-content, _moz_alt_content) > CSS_KEY(-moz-anchor-decoration, _moz_anchor_decoration) > CSS_KEY(-moz-arabic-indic, _moz_arabic_indic) > CSS_KEY(-moz-available, _moz_available) >+CSS_KEY(-moz-background-color, _moz_background_color) > CSS_KEY(-moz-bengali, _moz_bengali) > CSS_KEY(-moz-box, _moz_box) > CSS_KEY(-moz-button, _moz_button) > CSS_KEY(-moz-buttondefault, _moz_buttondefault) > CSS_KEY(-moz-buttonhoverface, _moz_buttonhoverface) > CSS_KEY(-moz-buttonhovertext, _moz_buttonhovertext) > CSS_KEY(-moz-cellhighlight, _moz_cellhighlight) > CSS_KEY(-moz-cellhighlighttext, _moz_cellhighlighttext) > CSS_KEY(-moz-center, _moz_center) > CSS_KEY(-moz-cjk-earthly-branch, _moz_cjk_earthly_branch) > CSS_KEY(-moz-cjk-heavenly-stem, _moz_cjk_heavenly_stem) >+CSS_KEY(-moz-color, _moz_color) > CSS_KEY(-moz-combobox, _moz_combobox) > CSS_KEY(-moz-comboboxtext, _moz_comboboxtext) > CSS_KEY(-moz-compact, _moz_compact) // Disabled because not supported. > CSS_KEY(-moz-block-height, _moz_block_height) > CSS_KEY(-moz-deck, _moz_deck) > CSS_KEY(-moz-desktop, _moz_desktop) > CSS_KEY(-moz-devanagari, _moz_devanagari) > CSS_KEY(-moz-dialog, _moz_dialog) >diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp >--- a/layout/style/nsCSSProps.cpp >+++ b/layout/style/nsCSSProps.cpp >@@ -685,21 +685,23 @@ const PRInt32 nsCSSProps::kColorKTable[] > eCSSKeyword_threedface, nsILookAndFeel::eColor_threedface, > eCSSKeyword_threedhighlight, nsILookAndFeel::eColor_threedhighlight, > eCSSKeyword_threedlightshadow, nsILookAndFeel::eColor_threedlightshadow, > eCSSKeyword_threedshadow, nsILookAndFeel::eColor_threedshadow, > eCSSKeyword_window, nsILookAndFeel::eColor_window, > eCSSKeyword_windowframe, nsILookAndFeel::eColor_windowframe, > eCSSKeyword_windowtext, nsILookAndFeel::eColor_windowtext, > eCSSKeyword__moz_activehyperlinktext, NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT, >+ eCSSKeyword__moz_background_color, NS_COLOR_MOZ_BACKGROUND_COLOR, > eCSSKeyword__moz_buttondefault, nsILookAndFeel::eColor__moz_buttondefault, > eCSSKeyword__moz_buttonhoverface, nsILookAndFeel::eColor__moz_buttonhoverface, > eCSSKeyword__moz_buttonhovertext, nsILookAndFeel::eColor__moz_buttonhovertext, > eCSSKeyword__moz_cellhighlight, nsILookAndFeel::eColor__moz_cellhighlight, > eCSSKeyword__moz_cellhighlighttext, nsILookAndFeel::eColor__moz_cellhighlighttext, >+ eCSSKeyword__moz_color, NS_COLOR_MOZ_COLOR, > eCSSKeyword__moz_eventreerow, nsILookAndFeel::eColor__moz_eventreerow, > eCSSKeyword__moz_field, nsILookAndFeel::eColor__moz_field, > eCSSKeyword__moz_fieldtext, nsILookAndFeel::eColor__moz_fieldtext, > eCSSKeyword__moz_dialog, nsILookAndFeel::eColor__moz_dialog, > eCSSKeyword__moz_dialogtext, nsILookAndFeel::eColor__moz_dialogtext, > eCSSKeyword__moz_dragtargetzone, nsILookAndFeel::eColor__moz_dragtargetzone, > eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT, > eCSSKeyword__moz_html_cellhighlight, nsILookAndFeel::eColor__moz_html_cellhighlight, >diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp >--- a/layout/style/nsRuleNode.cpp >+++ b/layout/style/nsRuleNode.cpp >@@ -803,16 +803,22 @@ static PRBool SetColor(const nsCSSValue& > aResult = aPresContext->DefaultActiveLinkColor(); > break; > case NS_COLOR_CURRENTCOLOR: > // The data computed from this can't be shared in the rule tree > // because they could be used on a node with a different color > aCanStoreInRuleTree = PR_FALSE; > aResult = aContext->GetStyleColor()->mColor; > break; >+ case NS_COLOR_MOZ_COLOR: >+ aResult = aPresContext->DefaultColor(); >+ break; >+ case NS_COLOR_MOZ_BACKGROUND_COLOR: >+ aResult = aPresContext->DefaultBackgroundColor(); >+ break; > default: > NS_NOTREACHED("Should never have an unknown negative colorID."); > break; > } > result = PR_TRUE; > } > } > else if (eCSSUnit_Inherit == unit) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
dbaron
: review+
Actions:
View
|
Diff
|
Review
Attachments on
bug 591341
:
469864
|
470597