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

Side by Side Diff: third_party/WebKit/Source/core/layout/shapes/Shape.cpp

Issue 2390413002: Reformat comments in core/layout/shapes (Closed)
Patch Set: Created 4 years, 2 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) 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 IntRect imageRect = pixelSnappedIntRect(imageR); 230 IntRect imageRect = pixelSnappedIntRect(imageR);
231 IntRect marginRect = pixelSnappedIntRect(marginR); 231 IntRect marginRect = pixelSnappedIntRect(marginR);
232 232
233 std::unique_ptr<RasterShapeIntervals> intervals = wrapUnique( 233 std::unique_ptr<RasterShapeIntervals> intervals = wrapUnique(
234 new RasterShapeIntervals(marginRect.height(), -marginRect.y())); 234 new RasterShapeIntervals(marginRect.height(), -marginRect.y()));
235 std::unique_ptr<ImageBuffer> imageBuffer = 235 std::unique_ptr<ImageBuffer> imageBuffer =
236 ImageBuffer::create(imageRect.size()); 236 ImageBuffer::create(imageRect.size());
237 237
238 if (image && imageBuffer) { 238 if (image && imageBuffer) {
239 // FIXME: This is not totally correct but it is needed to prevent shapes 239 // FIXME: This is not totally correct but it is needed to prevent shapes
240 // that loads SVG Images during paint invalidations to mark layoutObjects fo r 240 // that loads SVG Images during paint invalidations to mark layoutObjects
241 // layout, which is not allowed. See https://crbug.com/429346 241 // for layout, which is not allowed. See https://crbug.com/429346
242 ImageObserverDisabler disabler(image); 242 ImageObserverDisabler disabler(image);
243 SkPaint paint; 243 SkPaint paint;
244 IntRect imageSourceRect(IntPoint(), image->size()); 244 IntRect imageSourceRect(IntPoint(), image->size());
245 IntRect imageDestRect(IntPoint(), imageRect.size()); 245 IntRect imageDestRect(IntPoint(), imageRect.size());
246 image->draw(imageBuffer->canvas(), paint, imageDestRect, imageSourceRect, 246 image->draw(imageBuffer->canvas(), paint, imageDestRect, imageSourceRect,
247 DoNotRespectImageOrientation, 247 DoNotRespectImageOrientation,
248 Image::DoNotClampImageToSourceRect); 248 Image::DoNotClampImageToSourceRect);
249 249
250 WTF::ArrayBufferContents contents; 250 WTF::ArrayBufferContents contents;
251 imageBuffer->getImageData(Unmultiplied, 251 imageBuffer->getImageData(Unmultiplied,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height()); 296 FloatRect rect(0, 0, roundedRect.rect().width(), roundedRect.rect().height());
297 FloatRoundedRect bounds(rect, roundedRect.getRadii()); 297 FloatRoundedRect bounds(rect, roundedRect.getRadii());
298 std::unique_ptr<Shape> shape = createInsetShape(bounds); 298 std::unique_ptr<Shape> shape = createInsetShape(bounds);
299 shape->m_writingMode = writingMode; 299 shape->m_writingMode = writingMode;
300 shape->m_margin = margin; 300 shape->m_margin = margin;
301 301
302 return shape; 302 return shape;
303 } 303 }
304 304
305 } // namespace blink 305 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698