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

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

Issue 133123003: [CSS Shapes] First line gets incorrectly adjusted in shape-inside due to rounding (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/shapes/PolygonShape.h ('k') | Source/core/rendering/shapes/RasterShape.h » ('j') | 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) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 436
437 static inline bool aboveOrToTheLeft(const FloatRect& r1, const FloatRect& r2) 437 static inline bool aboveOrToTheLeft(const FloatRect& r1, const FloatRect& r2)
438 { 438 {
439 if (r1.y() < r2.y()) 439 if (r1.y() < r2.y())
440 return true; 440 return true;
441 if (r1.y() == r2.y()) 441 if (r1.y() == r2.y())
442 return r1.x() < r2.x(); 442 return r1.x() < r2.x();
443 return false; 443 return false;
444 } 444 }
445 445
446 bool PolygonShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalInterval Top, const LayoutSize& minLogicalIntervalSize, LayoutUnit& result) const 446 bool PolygonShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalInterval Top, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const
447 { 447 {
448 float minIntervalTop = minLogicalIntervalTop; 448 float minIntervalTop = minLogicalIntervalTop;
449 float minIntervalHeight = minLogicalIntervalSize.height(); 449 float minIntervalHeight = minLogicalIntervalSize.height();
450 float minIntervalWidth = minLogicalIntervalSize.width(); 450 float minIntervalWidth = minLogicalIntervalSize.width();
451 451
452 const FloatPolygon& polygon = shapePaddingBounds(); 452 const FloatPolygon& polygon = shapePaddingBounds();
453 const FloatRect boundingBox = polygon.boundingBox(); 453 const FloatRect boundingBox = polygon.boundingBox();
454 if (minIntervalWidth > boundingBox.width()) 454 if (minIntervalWidth > boundingBox.width())
455 return false; 455 return false;
456 456
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 } 522 }
523 } 523 }
524 } 524 }
525 525
526 if (firstFitFound) 526 if (firstFitFound)
527 result = LayoutUnit::fromFloatCeil(firstFitRect.y()); 527 result = LayoutUnit::fromFloatCeil(firstFitRect.y());
528 return firstFitFound; 528 return firstFitFound;
529 } 529 }
530 530
531 } // namespace WebCore 531 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/PolygonShape.h ('k') | Source/core/rendering/shapes/RasterShape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698