summaryrefslogtreecommitdiffstats
path: root/dom/base/DOMIntersectionObserver.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-12-22 14:35:26 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-12-22 14:35:26 +0100
commit85d43d68bb32e484167bdeb0b6d78c60d44444d2 (patch)
tree5f044aaa90f7bafe7580ef7951902fe9e8bba0d1 /dom/base/DOMIntersectionObserver.cpp
parentfa97cddb3910ce8c35992d3ad2ec0fda060e3041 (diff)
downloadUXP-85d43d68bb32e484167bdeb0b6d78c60d44444d2.tar
UXP-85d43d68bb32e484167bdeb0b6d78c60d44444d2.tar.gz
UXP-85d43d68bb32e484167bdeb0b6d78c60d44444d2.tar.lz
UXP-85d43d68bb32e484167bdeb0b6d78c60d44444d2.tar.xz
UXP-85d43d68bb32e484167bdeb0b6d78c60d44444d2.zip
Fix singed/unsigned type confusion for intersection threshold.
Tag #249
Diffstat (limited to 'dom/base/DOMIntersectionObserver.cpp')
-rw-r--r--dom/base/DOMIntersectionObserver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/dom/base/DOMIntersectionObserver.cpp b/dom/base/DOMIntersectionObserver.cpp
index f5e59c2b9..650ec83cd 100644
--- a/dom/base/DOMIntersectionObserver.cpp
+++ b/dom/base/DOMIntersectionObserver.cpp
@@ -424,15 +424,15 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
intersectionRatio = intersectionRect.isSome() ? 1.0 : 0.0;
}
- size_t threshold = -1;
+ int32_t threshold = -1;
if (intersectionRatio > 0.0) {
if (intersectionRatio >= 1.0) {
intersectionRatio = 1.0;
- threshold = mThresholds.Length();
+ threshold = (int32_t)mThresholds.Length();
} else {
for (size_t k = 0; k < mThresholds.Length(); ++k) {
if (mThresholds[k] <= intersectionRatio) {
- threshold = k + 1;
+ threshold = (int32_t)k + 1;
} else {
break;
}