mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1337681 - Part1. Support border radius for BorderLayer. r=mattwoodrow
This commit is contained in:
parent
ab55eb3915
commit
a1f4b8b3cd
@ -4439,6 +4439,9 @@ nsDisplayBorder::GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
mWidths[i] = 0;
|
||||
}
|
||||
}
|
||||
NS_FOR_CSS_FULL_CORNERS(corner) {
|
||||
mCorners[corner] = LayerSize(br->mBorderRadii[corner].width, br->mBorderRadii[corner].height);
|
||||
}
|
||||
|
||||
mRect = ViewAs<LayerPixel>(br->mOuterRect);
|
||||
return LAYER_ACTIVE;
|
||||
@ -4457,7 +4460,7 @@ nsDisplayBorder::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
return nullptr;
|
||||
}
|
||||
layer->SetRect(mRect);
|
||||
layer->SetCornerRadii({ LayerSize(), LayerSize(), LayerSize(), LayerSize() });
|
||||
layer->SetCornerRadii(mCorners);
|
||||
layer->SetColors(mColors);
|
||||
layer->SetWidths(mWidths);
|
||||
layer->SetStyles(mBorderStyles);
|
||||
|
@ -2846,6 +2846,7 @@ protected:
|
||||
|
||||
mozilla::Array<mozilla::gfx::Color, 4> mColors;
|
||||
mozilla::Array<mozilla::LayerCoord, 4> mWidths;
|
||||
mozilla::Array<mozilla::LayerSize, 4> mCorners;
|
||||
mozilla::Array<uint8_t, 4> mBorderStyles;
|
||||
mozilla::LayerRect mRect;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user