Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(895)

Side by Side Diff: Source/core/rendering/shapes/RasterShape.cpp

Issue 237123002: Fix off-by-one error in RasterShape of CSS shapes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing space Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (y2 < intervals.bounds().y() || y1 >= intervals.bounds().maxY()) 144 if (y2 < intervals.bounds().y() || y1 >= intervals.bounds().maxY())
145 return; 145 return;
146 146
147 y1 = std::max(y1, intervals.bounds().y()); 147 y1 = std::max(y1, intervals.bounds().y());
148 y2 = std::min(y2, intervals.bounds().maxY()); 148 y2 = std::min(y2, intervals.bounds().maxY());
149 IntShapeInterval excludedInterval; 149 IntShapeInterval excludedInterval;
150 150
151 for (int y = y1; y < y2; y++) 151 for (int y = y1; y < y2; y++)
152 excludedInterval.unite(intervals.intervalAt(y)); 152 excludedInterval.unite(intervals.intervalAt(y));
153 153
154 result.append(LineSegment(excludedInterval.x1(), excludedInterval.x2() + 1)) ; 154 // Note: |marginIntervals()| returns end-point exclusive
155 // intervals. |excludedInterval.x2()| contains the left-most pixel
156 // offset to the right of the calculated union.
157 result.append(LineSegment(excludedInterval.x1(), excludedInterval.x2()));
155 } 158 }
156 159
157 } // namespace WebCore 160 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698