Bug 1320014 Part 5 - Remove NS_FOR_CSS_CORNERS. r=mats

Remove NS_FOR_CSS_FULL_CORNERS implementation, and rename NS_FOR_CSS_CORNERS
to NS_FOR_CSS_FULL_CORNERS.

MozReview-Commit-ID: 2kmPUZDz3bj

--HG--
extra : rebase_source : a8374d10c9f398b0593d7338be210a1fde25bdc4
This commit is contained in:
Ting-Yu Lin 2017-01-04 17:52:43 +08:00
Родитель f3987ac8db
Коммит 5c9728b639
3 изменённых файлов: 3 добавлений и 5 удалений

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

@ -431,7 +431,7 @@ enum Corner {
// Creates a for loop that walks over the four mozilla::Corner values. This
// implementation uses the same technique as NS_FOR_CSS_SIDES.
#define NS_FOR_CSS_CORNERS(var_) \
#define NS_FOR_CSS_FULL_CORNERS(var_) \
int32_t MOZ_CONCAT(var_,__LINE__) = mozilla::eCornerTopLeft; \
for (mozilla::Corner var_; \
MOZ_CONCAT(var_,__LINE__) <= mozilla::eCornerBottomLeft && \

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

@ -3357,7 +3357,7 @@ nsCSSBorderRenderer::DrawBorders()
* a 1.0 unit border all around and no border radius.
*/
NS_FOR_CSS_CORNERS(corner) {
NS_FOR_CSS_FULL_CORNERS(corner) {
const mozilla::Side sides[2] = { mozilla::Side(corner), PREV_SIDE(corner) };
if (!IsZeroSize(mBorderRadii[corner]))
@ -3372,7 +3372,7 @@ nsCSSBorderRenderer::DrawBorders()
}
// First, the corners
NS_FOR_CSS_CORNERS(corner) {
NS_FOR_CSS_FULL_CORNERS(corner) {
// if there's no corner, don't do all this work for it
if (IsZeroSize(mBorderCornerDimensions[corner]))
continue;

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

@ -16,8 +16,6 @@
namespace mozilla {
#define NS_FOR_CSS_FULL_CORNERS(var_) for (int32_t var_ = 0; var_ < 4; ++var_)
// Indices into "half corner" arrays (nsStyleCorners e.g.)
#define NS_CORNER_TOP_LEFT_X 0
#define NS_CORNER_TOP_LEFT_Y 1