зеркало из https://github.com/mozilla/pjs.git
make clip:inherit work. Bug 141734, r=dbaron, sr=attinasi
This commit is contained in:
Родитель
effd5d308f
Коммит
5235519ece
|
@ -2823,7 +2823,8 @@ nsRuleNode::ComputeDisplayData(nsStyleStruct* aStartStruct, const nsCSSStruct& a
|
||||||
if (nsnull != displayData.mClip) {
|
if (nsnull != displayData.mClip) {
|
||||||
if (eCSSUnit_Inherit == displayData.mClip->mTop.GetUnit()) { // if one is inherit, they all are
|
if (eCSSUnit_Inherit == displayData.mClip->mTop.GetUnit()) { // if one is inherit, they all are
|
||||||
inherited = PR_TRUE;
|
inherited = PR_TRUE;
|
||||||
display->mClipFlags = NS_STYLE_CLIP_INHERIT;
|
display->mClipFlags = parentDisplay->mClipFlags;
|
||||||
|
display->mClip = parentDisplay->mClip;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PRBool fullAuto = PR_TRUE;
|
PRBool fullAuto = PR_TRUE;
|
||||||
|
|
|
@ -2661,9 +2661,7 @@ nsComputedDOMStyle::GetClip(nsIFrame *aFrame,
|
||||||
NS_STYLE_CLIP_LEFT_AUTO)) {
|
NS_STYLE_CLIP_LEFT_AUTO)) {
|
||||||
val->SetIdent(NS_LITERAL_STRING("auto"));
|
val->SetIdent(NS_LITERAL_STRING("auto"));
|
||||||
}
|
}
|
||||||
else if (display->mClipFlags == NS_STYLE_CLIP_INHERIT) {
|
else {
|
||||||
val->SetIdent(NS_LITERAL_STRING("inherit"));
|
|
||||||
} else {
|
|
||||||
// create the cssvalues for the sides, stick them in the rect object
|
// create the cssvalues for the sides, stick them in the rect object
|
||||||
topVal = GetROCSSPrimitiveValue();
|
topVal = GetROCSSPrimitiveValue();
|
||||||
rightVal = GetROCSSPrimitiveValue();
|
rightVal = GetROCSSPrimitiveValue();
|
||||||
|
|
|
@ -412,8 +412,7 @@
|
||||||
|
|
||||||
// See nsStylePosition.mClip
|
// See nsStylePosition.mClip
|
||||||
#define NS_STYLE_CLIP_AUTO 0x00
|
#define NS_STYLE_CLIP_AUTO 0x00
|
||||||
#define NS_STYLE_CLIP_INHERIT 0x01
|
#define NS_STYLE_CLIP_RECT 0x01
|
||||||
#define NS_STYLE_CLIP_RECT 0x02
|
|
||||||
#define NS_STYLE_CLIP_TYPE_MASK 0x0F
|
#define NS_STYLE_CLIP_TYPE_MASK 0x0F
|
||||||
#define NS_STYLE_CLIP_LEFT_AUTO 0x10
|
#define NS_STYLE_CLIP_LEFT_AUTO 0x10
|
||||||
#define NS_STYLE_CLIP_TOP_AUTO 0x20
|
#define NS_STYLE_CLIP_TOP_AUTO 0x20
|
||||||
|
|
|
@ -412,8 +412,7 @@
|
||||||
|
|
||||||
// See nsStylePosition.mClip
|
// See nsStylePosition.mClip
|
||||||
#define NS_STYLE_CLIP_AUTO 0x00
|
#define NS_STYLE_CLIP_AUTO 0x00
|
||||||
#define NS_STYLE_CLIP_INHERIT 0x01
|
#define NS_STYLE_CLIP_RECT 0x01
|
||||||
#define NS_STYLE_CLIP_RECT 0x02
|
|
||||||
#define NS_STYLE_CLIP_TYPE_MASK 0x0F
|
#define NS_STYLE_CLIP_TYPE_MASK 0x0F
|
||||||
#define NS_STYLE_CLIP_LEFT_AUTO 0x10
|
#define NS_STYLE_CLIP_LEFT_AUTO 0x10
|
||||||
#define NS_STYLE_CLIP_TOP_AUTO 0x20
|
#define NS_STYLE_CLIP_TOP_AUTO 0x20
|
||||||
|
|
|
@ -2661,9 +2661,7 @@ nsComputedDOMStyle::GetClip(nsIFrame *aFrame,
|
||||||
NS_STYLE_CLIP_LEFT_AUTO)) {
|
NS_STYLE_CLIP_LEFT_AUTO)) {
|
||||||
val->SetIdent(NS_LITERAL_STRING("auto"));
|
val->SetIdent(NS_LITERAL_STRING("auto"));
|
||||||
}
|
}
|
||||||
else if (display->mClipFlags == NS_STYLE_CLIP_INHERIT) {
|
else {
|
||||||
val->SetIdent(NS_LITERAL_STRING("inherit"));
|
|
||||||
} else {
|
|
||||||
// create the cssvalues for the sides, stick them in the rect object
|
// create the cssvalues for the sides, stick them in the rect object
|
||||||
topVal = GetROCSSPrimitiveValue();
|
topVal = GetROCSSPrimitiveValue();
|
||||||
rightVal = GetROCSSPrimitiveValue();
|
rightVal = GetROCSSPrimitiveValue();
|
||||||
|
|
|
@ -2823,7 +2823,8 @@ nsRuleNode::ComputeDisplayData(nsStyleStruct* aStartStruct, const nsCSSStruct& a
|
||||||
if (nsnull != displayData.mClip) {
|
if (nsnull != displayData.mClip) {
|
||||||
if (eCSSUnit_Inherit == displayData.mClip->mTop.GetUnit()) { // if one is inherit, they all are
|
if (eCSSUnit_Inherit == displayData.mClip->mTop.GetUnit()) { // if one is inherit, they all are
|
||||||
inherited = PR_TRUE;
|
inherited = PR_TRUE;
|
||||||
display->mClipFlags = NS_STYLE_CLIP_INHERIT;
|
display->mClipFlags = parentDisplay->mClipFlags;
|
||||||
|
display->mClip = parentDisplay->mClip;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PRBool fullAuto = PR_TRUE;
|
PRBool fullAuto = PR_TRUE;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче