зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366371 - Use signed integer for intersection threshold. r=mstange
--HG-- extra : rebase_source : 9ac9144cd74e74b084c284b0e848b3a7dbbe575a
This commit is contained in:
Родитель
c7bc22bcfd
Коммит
44b1781d8a
|
@ -433,15 +433,15 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
|
||||||
intersectionRatio = intersectionRect.isSome() ? 1.0 : 0.0;
|
intersectionRatio = intersectionRect.isSome() ? 1.0 : 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t threshold = -1;
|
int32_t threshold = -1;
|
||||||
if (intersectionRatio > 0.0) {
|
if (intersectionRatio > 0.0) {
|
||||||
if (intersectionRatio >= 1.0) {
|
if (intersectionRatio >= 1.0) {
|
||||||
intersectionRatio = 1.0;
|
intersectionRatio = 1.0;
|
||||||
threshold = mThresholds.Length();
|
threshold = (int32_t)mThresholds.Length();
|
||||||
} else {
|
} else {
|
||||||
for (size_t k = 0; k < mThresholds.Length(); ++k) {
|
for (size_t k = 0; k < mThresholds.Length(); ++k) {
|
||||||
if (mThresholds[k] <= intersectionRatio) {
|
if (mThresholds[k] <= intersectionRatio) {
|
||||||
threshold = k + 1;
|
threshold = (int32_t)k + 1;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче