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

Side by Side Diff: sky/engine/core/rendering/shapes/ShapeOutsideInfo.cpp

Issue 700703002: Remove more float machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 ASSERT_NOT_REACHED(); 185 ASSERT_NOT_REACHED();
186 return LayoutUnit(); 186 return LayoutUnit();
187 } 187 }
188 188
189 189
190 bool ShapeOutsideInfo::isEnabledFor(const RenderBox& box) 190 bool ShapeOutsideInfo::isEnabledFor(const RenderBox& box)
191 { 191 {
192 ShapeValue* shapeValue = box.style()->shapeOutside(); 192 ShapeValue* shapeValue = box.style()->shapeOutside();
193 if (!box.isFloating() || !shapeValue) 193 if (!shapeValue)
194 return false; 194 return false;
195 195
196 switch (shapeValue->type()) { 196 switch (shapeValue->type()) {
197 case ShapeValue::Shape: 197 case ShapeValue::Shape:
198 return shapeValue->shape(); 198 return shapeValue->shape();
199 case ShapeValue::Image: 199 case ShapeValue::Image:
200 return shapeValue->isImageValid(); 200 return shapeValue->isImageValid();
201 case ShapeValue::Box: 201 case ShapeValue::Box:
202 return true; 202 return true;
203 } 203 }
(...skipping 23 matching lines...) Expand all
227 { 227 {
228 return FloatPoint(point.x() + logicalLeftOffset(), point.y() + logicalTopOff set()); 228 return FloatPoint(point.x() + logicalLeftOffset(), point.y() + logicalTopOff set());
229 } 229 }
230 230
231 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const 231 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const
232 { 232 {
233 return size; 233 return size;
234 } 234 }
235 235
236 } // namespace blink 236 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/line/LineBreaker.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698