Prerequisite comments for using the appropriate color for border colors. (Bug 147777) r=zweinberg

This commit is contained in:
L. David Baron 2010-04-02 18:58:26 -07:00
Родитель 15a5fe036b
Коммит f27c596c76
2 изменённых файлов: 9 добавлений и 0 удалений

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

@ -53,6 +53,7 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsStaticNameTable.h"
#include "prlog.h" // for PR_STATIC_ASSERT
// required to make the symbol external, so that TestCSSPropertyLookup.cpp can link with it
extern const char* const kCSSRawProperties[];
@ -1629,8 +1630,13 @@ static const nsCSSProperty gBorderBottomSubpropTable[] = {
eCSSProperty_UNKNOWN
};
PR_STATIC_ASSERT(NS_SIDE_TOP == 0);
PR_STATIC_ASSERT(NS_SIDE_RIGHT == 1);
PR_STATIC_ASSERT(NS_SIDE_BOTTOM == 2);
PR_STATIC_ASSERT(NS_SIDE_LEFT == 3);
static const nsCSSProperty gBorderColorSubpropTable[] = {
// Code relies on these being in top-right-bottom-left order.
// Code relies on these matching the NS_SIDE_* constants.
eCSSProperty_border_top_color,
eCSSProperty_border_right_color_value,
eCSSProperty_border_bottom_color,

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

@ -255,6 +255,9 @@ public:
* aProperty must be a color-valued property that nsStyleAnimation
* knows how to extract. It must also be a property that we know to
* do change handling for in nsStyleContext::CalcDifference.
*
* Note that if aProperty is eCSSProperty_border_*_color, this
* function handles -moz-use-text-color.
*/
NS_HIDDEN_(nscolor) GetVisitedDependentColor(nsCSSProperty aProperty);