| OLD | NEW |
| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 void RasterShapeIntervals::getExcludedIntervals(int y1, int y2, IntShapeInterval
s& result) const | 202 void RasterShapeIntervals::getExcludedIntervals(int y1, int y2, IntShapeInterval
s& result) const |
| 203 { | 203 { |
| 204 ASSERT(y2 >= y1); | 204 ASSERT(y2 >= y1); |
| 205 | 205 |
| 206 if (y2 < bounds().y() || y1 >= bounds().maxY()) | 206 if (y2 < bounds().y() || y1 >= bounds().maxY()) |
| 207 return; | 207 return; |
| 208 | 208 |
| 209 y1 = std::max(y1, bounds().y()); | 209 y1 = std::max(y1, bounds().y()); |
| 210 y2 = std::min(y2, bounds().maxY()); | 210 y2 = std::min(y2, bounds().maxY()); |
| 211 | 211 |
| 212 for (int y = y1; y < y2; y++) { | |
| 213 if (intervalsAt(y).isEmpty()) | |
| 214 return; | |
| 215 } | |
| 216 | |
| 217 result = intervalsAt(y1); | 212 result = intervalsAt(y1); |
| 218 for (int y = y1 + 1; y < y2; y++) { | 213 for (int y = y1 + 1; y < y2; y++) { |
| 219 IntShapeIntervals intervals; | 214 IntShapeIntervals intervals; |
| 220 IntShapeInterval::uniteShapeIntervals(result, intervalsAt(y), intervals)
; | 215 IntShapeInterval::uniteShapeIntervals(result, intervalsAt(y), intervals)
; |
| 221 result.swap(intervals); | 216 result.swap(intervals); |
| 222 } | 217 } |
| 223 } | 218 } |
| 224 | 219 |
| 225 PassOwnPtr<RasterShapeIntervals> RasterShapeIntervals::computeShapeMarginInterva
ls(unsigned margin) const | 220 PassOwnPtr<RasterShapeIntervals> RasterShapeIntervals::computeShapeMarginInterva
ls(unsigned margin) const |
| 226 { | 221 { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 bool RasterShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalT
op, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const | 303 bool RasterShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalT
op, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const |
| 309 { | 304 { |
| 310 const RasterShapeIntervals& intervals = paddingIntervals(); | 305 const RasterShapeIntervals& intervals = paddingIntervals(); |
| 311 if (intervals.isEmpty()) | 306 if (intervals.isEmpty()) |
| 312 return false; | 307 return false; |
| 313 | 308 |
| 314 return intervals.firstIncludedIntervalY(minLogicalIntervalTop.floor(), floor
edIntSize(minLogicalIntervalSize), result); | 309 return intervals.firstIncludedIntervalY(minLogicalIntervalTop.floor(), floor
edIntSize(minLogicalIntervalSize), result); |
| 315 } | 310 } |
| 316 | 311 |
| 317 } // namespace WebCore | 312 } // namespace WebCore |
| OLD | NEW |