mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 768067 - Fix style nits from original review. r=roc
This commit is contained in:
parent
897c12c1f2
commit
4376a1259a
@ -2859,27 +2859,27 @@ CanvasRenderingContext2D::SetMozDashOffset(double mozDashOffset)
|
||||
}
|
||||
|
||||
void
|
||||
CanvasRenderingContext2D::SetLineDash(const mozilla::dom::AutoSequence<double>& mSegments) {
|
||||
CanvasRenderingContext2D::SetLineDash(const mozilla::dom::AutoSequence<double>& aSegments) {
|
||||
FallibleTArray<mozilla::gfx::Float>& dash = CurrentState().dash;
|
||||
dash.Clear();
|
||||
|
||||
for(mozilla::dom::AutoSequence<double>::index_type x = 0; x < mSegments.Length(); x++) {
|
||||
dash.AppendElement(mSegments[x]);
|
||||
for (uint32_t x = 0; x < aSegments.Length(); x++) {
|
||||
dash.AppendElement(aSegments[x]);
|
||||
}
|
||||
if(mSegments.Length()%2) { // If the number of elements is odd, concatenate again
|
||||
for(mozilla::dom::AutoSequence<double>::index_type x = 0; x < mSegments.Length(); x++) {
|
||||
dash.AppendElement(mSegments[x]);
|
||||
if (aSegments.Length() % 2) { // If the number of elements is odd, concatenate again
|
||||
for (uint32_t x = 0; x < aSegments.Length(); x++) {
|
||||
dash.AppendElement(aSegments[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CanvasRenderingContext2D::GetLineDash(nsTArray<double>& mSegments) const {
|
||||
CanvasRenderingContext2D::GetLineDash(nsTArray<double>& aSegments) const {
|
||||
const FallibleTArray<mozilla::gfx::Float>& dash = CurrentState().dash;
|
||||
mSegments.Clear();
|
||||
aSegments.Clear();
|
||||
|
||||
for(FallibleTArray<mozilla::gfx::Float>::index_type x = 0; x < dash.Length(); x++) {
|
||||
mSegments.AppendElement(dash[x]);
|
||||
for (uint32_t x = 0; x < dash.Length(); x++) {
|
||||
aSegments.AppendElement(dash[x]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user