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

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

Issue 226323002: [CSS Shapes] Remove outside-shape CSS value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/css/CSSValueKeywords.in ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.cpp » ('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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 getShapeImageAndRect(shapeValue, &m_renderer, m_referenceBoxLogicalSize, image, imageRect); 128 getShapeImageAndRect(shapeValue, &m_renderer, m_referenceBoxLogicalSize, image, imageRect);
129 const LayoutRect& marginRect = getShapeImageMarginRect(m_renderer, m_ref erenceBoxLogicalSize); 129 const LayoutRect& marginRect = getShapeImageMarginRect(m_renderer, m_ref erenceBoxLogicalSize);
130 m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect , marginRect, writingMode, margin); 130 m_shape = Shape::createRasterShape(image, shapeImageThreshold, imageRect , marginRect, writingMode, margin);
131 break; 131 break;
132 } 132 }
133 case ShapeValue::Box: { 133 case ShapeValue::Box: {
134 const RoundedRect& shapeRect = m_renderer.style()->getRoundedBorderFor(L ayoutRect(LayoutPoint(), m_referenceBoxLogicalSize), m_renderer.view()); 134 const RoundedRect& shapeRect = m_renderer.style()->getRoundedBorderFor(L ayoutRect(LayoutPoint(), m_referenceBoxLogicalSize), m_renderer.view());
135 m_shape = Shape::createLayoutBoxShape(shapeRect, writingMode, margin); 135 m_shape = Shape::createLayoutBoxShape(shapeRect, writingMode, margin);
136 break; 136 break;
137 } 137 }
138 case ShapeValue::Outside:
139 // Outside should have already resolved to a different shape value.
140 ASSERT_NOT_REACHED();
141 } 138 }
142 139
143 ASSERT(m_shape); 140 ASSERT(m_shape);
144 return *m_shape; 141 return *m_shape;
145 } 142 }
146 143
147 template<class RenderType> 144 template<class RenderType>
148 SegmentList ShapeInfo<RenderType>::computeSegmentsForLine(LayoutUnit lineTop, La youtUnit lineHeight) const 145 SegmentList ShapeInfo<RenderType>::computeSegmentsForLine(LayoutUnit lineTop, La youtUnit lineHeight) const
149 { 146 {
150 ASSERT(lineHeight >= 0); 147 ASSERT(lineHeight >= 0);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 case BoxMissing: break; 241 case BoxMissing: break;
245 } 242 }
246 243
247 ASSERT_NOT_REACHED(); 244 ASSERT_NOT_REACHED();
248 return LayoutUnit(); 245 return LayoutUnit();
249 } 246 }
250 247
251 template class ShapeInfo<RenderBlock>; 248 template class ShapeInfo<RenderBlock>;
252 template class ShapeInfo<RenderBox>; 249 template class ShapeInfo<RenderBox>;
253 } 250 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698