mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 22:08:40 +09:00
Fix singed/unsigned type confusion for intersection threshold.
Tag #249
This commit is contained in:
parent
d3a8693d52
commit
f82da789c8
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue