diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:12:12 +0000 |
commit | a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431 (patch) | |
tree | 54617b4f5f04ee87a2c9e3b97cc88b8626859124 /layout/generic/nsImageMap.cpp | |
parent | Releasing progress-linux version 115.7.0esr-1~deb12u1progress7u1. (diff) | |
download | firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.tar.xz firefox-esr-a7c14e2f29831f4bc5eb18e23e55eb6f7a4e3431.zip |
Merging upstream version 115.8.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/generic/nsImageMap.cpp')
-rw-r--r-- | layout/generic/nsImageMap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layout/generic/nsImageMap.cpp b/layout/generic/nsImageMap.cpp index 8ddd9338f2..ce621fb6be 100644 --- a/layout/generic/nsImageMap.cpp +++ b/layout/generic/nsImageMap.cpp @@ -467,7 +467,7 @@ void PolyArea::Draw(nsIFrame* aFrame, DrawTarget& aDrawTarget, Point p1(pc->CSSPixelsToDevPixels(mCoords[0]), pc->CSSPixelsToDevPixels(mCoords[1])); Point p2, p1snapped, p2snapped; - for (int32_t i = 2; i < mNumCoords; i += 2) { + for (int32_t i = 2; i < mNumCoords - 1; i += 2) { p2.x = pc->CSSPixelsToDevPixels(mCoords[i]); p2.y = pc->CSSPixelsToDevPixels(mCoords[i + 1]); p1snapped = p1; @@ -493,7 +493,7 @@ void PolyArea::GetRect(nsIFrame* aFrame, nsRect& aRect) { nscoord x1, x2, y1, y2, xtmp, ytmp; x1 = x2 = nsPresContext::CSSPixelsToAppUnits(mCoords[0]); y1 = y2 = nsPresContext::CSSPixelsToAppUnits(mCoords[1]); - for (int32_t i = 2; i < mNumCoords; i += 2) { + for (int32_t i = 2; i < mNumCoords - 1; i += 2) { xtmp = nsPresContext::CSSPixelsToAppUnits(mCoords[i]); ytmp = nsPresContext::CSSPixelsToAppUnits(mCoords[i + 1]); x1 = x1 < xtmp ? x1 : xtmp; |