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

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

Issue 63623002: [CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed "-webkit" prefix from the test case Created 7 years, 1 month 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
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698