Commit e9cd023a authored by eae's avatar eae Committed by Commit bot

Reformat comments in core/layout/shapes

BUG=563793
TBR=mstensho@opera.com

Review-Url: https://codereview.chromium.org/2390413002
Cr-Commit-Position: refs/heads/master@{#422980}
parent dfcc90f1
...@@ -65,8 +65,8 @@ namespace { ...@@ -65,8 +65,8 @@ namespace {
EXPECT_FALSE(segment.isValid); \ EXPECT_FALSE(segment.isValid); \
} }
/* The BoxShape is based on a 100x50 rectangle at 0,0. The shape-margin value is 10, /* The BoxShape is based on a 100x50 rectangle at 0,0. The shape-margin value is
* so the shapeMarginBoundingBox rectangle is 120x70 at -10,-10: * 10, so the shapeMarginBoundingBox rectangle is 120x70 at -10,-10:
* *
* -10,-10 110,-10 * -10,-10 110,-10
* +--------+ * +--------+
...@@ -115,8 +115,9 @@ TEST_F(BoxShapeTest, zeroRadii) { ...@@ -115,8 +115,9 @@ TEST_F(BoxShapeTest, zeroRadii) {
TEST_NO_EXCLUDED_INTERVAL(shape, LayoutUnit(100), LayoutUnit(200)); TEST_NO_EXCLUDED_INTERVAL(shape, LayoutUnit(100), LayoutUnit(200));
} }
/* BoxShape geometry for this test. Corner radii are in parens, x and y intercepts /* BoxShape geometry for this test. Corner radii are in parens, x and y
* for the elliptical corners are noted. The rectangle itself is at 0,0 with width and height 100. * intercepts for the elliptical corners are noted. The rectangle itself is at
* 0,0 with width and height 100.
* *
* (10, 15) x=10 x=90 (10, 20) * (10, 15) x=10 x=90 (10, 20)
* (--+---------+--) * (--+---------+--)
......
...@@ -109,8 +109,8 @@ static FloatShapeInterval clippedCircleXRange(const FloatPoint& center, ...@@ -109,8 +109,8 @@ static FloatShapeInterval clippedCircleXRange(const FloatPoint& center,
if (center.y() >= y1 && center.y() <= y2) if (center.y() >= y1 && center.y() <= y2)
return FloatShapeInterval(center.x() - radius, center.x() + radius); return FloatShapeInterval(center.x() - radius, center.x() + radius);
// Clip the circle to the vertical range y1,y2 and return the extent of the clipped circle's // Clip the circle to the vertical range y1,y2 and return the extent of the
// projection on the X axis // clipped circle's projection on the X axis
float xi = circleXIntercept((y2 < center.y() ? y2 : y1) - center.y(), radius); float xi = circleXIntercept((y2 < center.y() ? y2 : y1) - center.y(), radius);
return FloatShapeInterval(center.x() - xi, center.x() + xi); return FloatShapeInterval(center.x() - xi, center.x() + xi);
......
...@@ -237,8 +237,8 @@ std::unique_ptr<Shape> Shape::createRasterShape(Image* image, ...@@ -237,8 +237,8 @@ std::unique_ptr<Shape> Shape::createRasterShape(Image* image,
if (image && imageBuffer) { if (image && imageBuffer) {
// FIXME: This is not totally correct but it is needed to prevent shapes // FIXME: This is not totally correct but it is needed to prevent shapes
// that loads SVG Images during paint invalidations to mark layoutObjects for // that loads SVG Images during paint invalidations to mark layoutObjects
// layout, which is not allowed. See https://crbug.com/429346 // for layout, which is not allowed. See https://crbug.com/429346
ImageObserverDisabler disabler(image); ImageObserverDisabler disabler(image);
SkPaint paint; SkPaint paint;
IntRect imageSourceRect(IntPoint(), image->size()); IntRect imageSourceRect(IntPoint(), image->size());
......
...@@ -54,10 +54,11 @@ struct LineSegment { ...@@ -54,10 +54,11 @@ struct LineSegment {
bool isValid; bool isValid;
}; };
// A representation of a BasicShape that enables layout code to determine how to break a line up into segments // A representation of a BasicShape that enables layout code to determine how to
// that will fit within or around a shape. The line is defined by a pair of logical Y coordinates and the // break a line up into segments that will fit within or around a shape. The
// computed segments are returned as pairs of logical X coordinates. The BasicShape itself is defined in // line is defined by a pair of logical Y coordinates and the computed segments
// physical coordinates. // are returned as pairs of logical X coordinates. The BasicShape itself is
// defined in physical coordinates.
class CORE_EXPORT Shape { class CORE_EXPORT Shape {
USING_FAST_MALLOC(Shape); USING_FAST_MALLOC(Shape);
......
...@@ -184,8 +184,9 @@ const Shape& ShapeOutsideInfo::computedShape() const { ...@@ -184,8 +184,9 @@ const Shape& ShapeOutsideInfo::computedShape() const {
*m_layoutBox.containingBlock()->style(); *m_layoutBox.containingBlock()->style();
WritingMode writingMode = containingBlockStyle.getWritingMode(); WritingMode writingMode = containingBlockStyle.getWritingMode();
// Make sure contentWidth is not negative. This can happen when containing block has a vertical scrollbar and // Make sure contentWidth is not negative. This can happen when containing
// its content is smaller than the scrollbar width. // block has a vertical scrollbar and its content is smaller than the
// scrollbar width.
LayoutUnit maximumValue = LayoutUnit maximumValue =
m_layoutBox.containingBlock() m_layoutBox.containingBlock()
? std::max(LayoutUnit(), ? std::max(LayoutUnit(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment