blob: 87630d5510d283513575ccd3f08f3ddb6bcfd3d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
commit 96ac0874dc2e
Author: Ethan Lin <ethlin@mozilla.com>
Date: Sat Sep 23 15:06:07 2017 +0800
Bug 1352453 - Check image dimension when computing border space size. r=heycam, a=sledru
MozReview-Commit-ID: LQcf9UGyUUq
--HG--
extra : source : 6974ff079df11b3e7dc46e2df754149321e3f3aa
---
layout/painting/nsCSSRendering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git layout/painting/nsCSSRendering.cpp layout/painting/nsCSSRendering.cpp
index 89760f33229b..55051c9ac376 100644
--- layout/painting/nsCSSRendering.cpp
+++ layout/painting/nsCSSRendering.cpp
@@ -3068,7 +3068,7 @@ nsCSSRendering::ComputeBorderSpacedRepeatSize(nscoord aImageDimension,
nscoord aAvailableSpace,
nscoord& aSpace)
{
- int32_t count = aAvailableSpace / aImageDimension;
+ int32_t count = aImageDimension ? (aAvailableSpace / aImageDimension) : 0;
aSpace = (aAvailableSpace - aImageDimension * count) / (count + 1);
return aSpace + aImageDimension;
}
|