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

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

Issue 237313003: CSS shapes support in Web Inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed runtime cast, instead using TypeBuilder array Created 6 years, 7 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
« no previous file with comments | « Source/core/rendering/shapes/ShapeOutsideInfo.h ('k') | Source/devtools/Inspector-1.1.json » ('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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 // Lines that do not overlap the shape should act as if the float 301 // Lines that do not overlap the shape should act as if the float
302 // wasn't there for layout purposes. So we set the deltas to remove the 302 // wasn't there for layout purposes. So we set the deltas to remove the
303 // entire width of the float. 303 // entire width of the float.
304 m_leftMarginBoxDelta = floatMarginBoxWidth; 304 m_leftMarginBoxDelta = floatMarginBoxWidth;
305 m_rightMarginBoxDelta = -floatMarginBoxWidth; 305 m_rightMarginBoxDelta = -floatMarginBoxWidth;
306 m_lineOverlapsShape = false; 306 m_lineOverlapsShape = false;
307 } 307 }
308 } 308 }
309 309
310 LayoutRect ShapeOutsideInfo::computedShapePhysicalBoundingBox() const
311 {
312 LayoutRect physicalBoundingBox = computedShape().shapeMarginLogicalBoundingB ox();
313 physicalBoundingBox.setX(physicalBoundingBox.x() + logicalLeftOffset());
314 physicalBoundingBox.setY(physicalBoundingBox.y() + logicalTopOffset());
315 if (m_renderer.style()->isFlippedBlocksWritingMode())
leviw_travelin_and_unemployed 2014/05/02 20:41:02 Why isn't this if/else?
Habib Virji 2014/05/06 08:50:25 Done.
316 physicalBoundingBox.setY(m_renderer.logicalHeight() - physicalBoundingBo x.maxY());
317 if (!m_renderer.style()->isHorizontalWritingMode())
leviw_travelin_and_unemployed 2014/05/02 20:41:02 Ditto.
Habib Virji 2014/05/06 08:50:25 Done.
318 physicalBoundingBox = physicalBoundingBox.transposedRect();
319 return physicalBoundingBox;
310 } 320 }
321
322 FloatPoint ShapeOutsideInfo::shapeToRendererPoint(FloatPoint point) const
323 {
324 FloatPoint result = FloatPoint(point.x() + logicalLeftOffset(), point.y() + logicalTopOffset());
325 if (m_renderer.style()->isFlippedBlocksWritingMode())
326 result.setY(m_renderer.logicalHeight() - result.y());
327 if (!m_renderer.style()->isHorizontalWritingMode())
328 result = result.transposedPoint();
329 return result;
330 }
331
332 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const
333 {
334 if (!m_renderer.style()->isHorizontalWritingMode())
335 return size.transposedSize();
336 return size;
337 }
338
339 }
OLDNEW
« no previous file with comments | « Source/core/rendering/shapes/ShapeOutsideInfo.h ('k') | Source/devtools/Inspector-1.1.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698