From cc4c33320db9fdeec33513fabb8b4f4338ae7dbd Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Wed, 22 Dec 1999 11:30:22 +0000 Subject: [PATCH] 16381 "Need to be able to specify -moz-border-radius for each corner". Made changes in the following files in order to store the radius as a nsCSSRect and support 4 new -moz-border-radius properties (topLeft, topRight, bottomRight, bottomLeft): nsCSSDeclaration.cpp nsCSSParser.cpp nsCSSPropList.h nsCSSStyleRule.cpp nsICSSDeclaration.h nsIStyleContext.h nsStyleContext.cpp nsCSSRendering.cpp The (small) changes in nsCSSRendering.cpp are temporary. It's just to reflect the changes made elsewhere in the style context. The code that actually draws the RoundRect with a different radius for each corner will be implemented later today. git-svn-id: svn://10.0.0.236/trunk@56388 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSRendering.cpp | 4 ++-- mozilla/layout/html/style/src/nsCSSRendering.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index 53e04efb9d1..9f85cf7e5bf 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -1389,7 +1389,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext* aPresContext, } // get the radius for our border - borderRadius = aBorderStyle.mBorderRadius; + aBorderStyle.mBorderRadius.GetTop(borderRadius); // XXX-border-radius theRadius = 0; switch (borderRadius.GetUnit() ) { case eStyleUnit_Inherit: @@ -2190,7 +2190,7 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext, // is rendered over the 'border' 'padding' and 'content' areas if (!transparentBG) { // check to see if we have a radius - borderRadius = aSpacing.mBorderRadius; + aSpacing.mBorderRadius.GetTop(borderRadius); // XXX-border-radius theRadius = 0; switch (borderRadius.GetUnit() ) { case eStyleUnit_Inherit: diff --git a/mozilla/layout/html/style/src/nsCSSRendering.cpp b/mozilla/layout/html/style/src/nsCSSRendering.cpp index 53e04efb9d1..9f85cf7e5bf 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.cpp +++ b/mozilla/layout/html/style/src/nsCSSRendering.cpp @@ -1389,7 +1389,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext* aPresContext, } // get the radius for our border - borderRadius = aBorderStyle.mBorderRadius; + aBorderStyle.mBorderRadius.GetTop(borderRadius); // XXX-border-radius theRadius = 0; switch (borderRadius.GetUnit() ) { case eStyleUnit_Inherit: @@ -2190,7 +2190,7 @@ nsCSSRendering::PaintBackground(nsIPresContext* aPresContext, // is rendered over the 'border' 'padding' and 'content' areas if (!transparentBG) { // check to see if we have a radius - borderRadius = aSpacing.mBorderRadius; + aSpacing.mBorderRadius.GetTop(borderRadius); // XXX-border-radius theRadius = 0; switch (borderRadius.GetUnit() ) { case eStyleUnit_Inherit: