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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 } 220 }
221 221
222 ASSERT(m_shape); 222 ASSERT(m_shape);
223 return *m_shape; 223 return *m_shape;
224 } 224 }
225 225
226 inline LayoutUnit borderBeforeInWritingMode(const LayoutBox& layoutBox, 226 inline LayoutUnit borderBeforeInWritingMode(const LayoutBox& layoutBox,
227 WritingMode writingMode) { 227 WritingMode writingMode) {
228 switch (writingMode) { 228 switch (writingMode) {
229 case WritingMode::HorizontalTb: 229 case WritingMode::kHorizontalTb:
230 return LayoutUnit(layoutBox.borderTop()); 230 return LayoutUnit(layoutBox.borderTop());
231 case WritingMode::VerticalLr: 231 case WritingMode::kVerticalLr:
232 return LayoutUnit(layoutBox.borderLeft()); 232 return LayoutUnit(layoutBox.borderLeft());
233 case WritingMode::VerticalRl: 233 case WritingMode::kVerticalRl:
234 return LayoutUnit(layoutBox.borderRight()); 234 return LayoutUnit(layoutBox.borderRight());
235 } 235 }
236 236
237 ASSERT_NOT_REACHED(); 237 ASSERT_NOT_REACHED();
238 return LayoutUnit(layoutBox.borderBefore()); 238 return LayoutUnit(layoutBox.borderBefore());
239 } 239 }
240 240
241 inline LayoutUnit borderAndPaddingBeforeInWritingMode( 241 inline LayoutUnit borderAndPaddingBeforeInWritingMode(
242 const LayoutBox& layoutBox, 242 const LayoutBox& layoutBox,
243 WritingMode writingMode) { 243 WritingMode writingMode) {
244 switch (writingMode) { 244 switch (writingMode) {
245 case WritingMode::HorizontalTb: 245 case WritingMode::kHorizontalTb:
246 return layoutBox.borderTop() + layoutBox.paddingTop(); 246 return layoutBox.borderTop() + layoutBox.paddingTop();
247 case WritingMode::VerticalLr: 247 case WritingMode::kVerticalLr:
248 return layoutBox.borderLeft() + layoutBox.paddingLeft(); 248 return layoutBox.borderLeft() + layoutBox.paddingLeft();
249 case WritingMode::VerticalRl: 249 case WritingMode::kVerticalRl:
250 return layoutBox.borderRight() + layoutBox.paddingRight(); 250 return layoutBox.borderRight() + layoutBox.paddingRight();
251 } 251 }
252 252
253 ASSERT_NOT_REACHED(); 253 ASSERT_NOT_REACHED();
254 return layoutBox.borderAndPaddingBefore(); 254 return layoutBox.borderAndPaddingBefore();
255 } 255 }
256 256
257 LayoutUnit ShapeOutsideInfo::logicalTopOffset() const { 257 LayoutUnit ShapeOutsideInfo::logicalTopOffset() const {
258 switch (referenceBox(*m_layoutBox.style()->shapeOutside())) { 258 switch (referenceBox(*m_layoutBox.style()->shapeOutside())) {
259 case MarginBox: 259 case MarginBox:
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 return result; 434 return result;
435 } 435 }
436 436
437 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const { 437 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const {
438 if (!m_layoutBox.style()->isHorizontalWritingMode()) 438 if (!m_layoutBox.style()->isHorizontalWritingMode())
439 return size.transposedSize(); 439 return size.transposedSize();
440 return size; 440 return size;
441 } 441 }
442 442
443 } // namespace blink 443 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698