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

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

Issue 1743803002: Rename enums/functions that collide in chromium style in core/style/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-8
Patch Set: get-names-9 Created 4 years, 9 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 bool LayoutFlexibleBox::isHorizontalFlow() const 352 bool LayoutFlexibleBox::isHorizontalFlow() const
353 { 353 {
354 if (isHorizontalWritingMode()) 354 if (isHorizontalWritingMode())
355 return !isColumnFlow(); 355 return !isColumnFlow();
356 return isColumnFlow(); 356 return isColumnFlow();
357 } 357 }
358 358
359 bool LayoutFlexibleBox::isLeftToRightFlow() const 359 bool LayoutFlexibleBox::isLeftToRightFlow() const
360 { 360 {
361 if (isColumnFlow()) 361 if (isColumnFlow())
362 return style()->writingMode() == TopToBottomWritingMode || style()->writ ingMode() == LeftToRightWritingMode; 362 return style()->getWritingMode() == TopToBottomWritingMode || style()->g etWritingMode() == LeftToRightWritingMode;
363 return style()->isLeftToRightDirection() ^ (style()->flexDirection() == Flow RowReverse); 363 return style()->isLeftToRightDirection() ^ (style()->flexDirection() == Flow RowReverse);
364 } 364 }
365 365
366 bool LayoutFlexibleBox::isMultiline() const 366 bool LayoutFlexibleBox::isMultiline() const
367 { 367 {
368 return style()->flexWrap() != FlexNoWrap; 368 return style()->flexWrap() != FlexNoWrap;
369 } 369 }
370 370
371 Length LayoutFlexibleBox::flexBasisForChild(const LayoutBox& child) const 371 Length LayoutFlexibleBox::flexBasisForChild(const LayoutBox& child) const
372 { 372 {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 if (size.type() == MinContent) 465 if (size.type() == MinContent)
466 return child.minPreferredLogicalWidth() - borderAndPadding; 466 return child.minPreferredLogicalWidth() - borderAndPadding;
467 if (size.type() == MaxContent) 467 if (size.type() == MaxContent)
468 return child.maxPreferredLogicalWidth() - borderAndPadding; 468 return child.maxPreferredLogicalWidth() - borderAndPadding;
469 } 469 }
470 return child.computeLogicalWidthUsing(sizeType, size, contentLogicalWidth(), this) - borderAndPadding; 470 return child.computeLogicalWidthUsing(sizeType, size, contentLogicalWidth(), this) - borderAndPadding;
471 } 471 }
472 472
473 LayoutFlexibleBox::TransformedWritingMode LayoutFlexibleBox::transformedWritingM ode() const 473 LayoutFlexibleBox::TransformedWritingMode LayoutFlexibleBox::transformedWritingM ode() const
474 { 474 {
475 WritingMode mode = style()->writingMode(); 475 WritingMode mode = style()->getWritingMode();
476 if (!isColumnFlow()) { 476 if (!isColumnFlow()) {
477 static_assert(static_cast<TransformedWritingMode>(TopToBottomWritingMode ) == TransformedWritingMode::TopToBottomWritingMode 477 static_assert(static_cast<TransformedWritingMode>(TopToBottomWritingMode ) == TransformedWritingMode::TopToBottomWritingMode
478 && static_cast<TransformedWritingMode>(LeftToRightWritingMode) == Tr ansformedWritingMode::LeftToRightWritingMode 478 && static_cast<TransformedWritingMode>(LeftToRightWritingMode) == Tr ansformedWritingMode::LeftToRightWritingMode
479 && static_cast<TransformedWritingMode>(RightToLeftWritingMode) == Tr ansformedWritingMode::RightToLeftWritingMode, 479 && static_cast<TransformedWritingMode>(RightToLeftWritingMode) == Tr ansformedWritingMode::RightToLeftWritingMode,
480 "WritingMode and TransformedWritingMode must match values."); 480 "WritingMode and TransformedWritingMode must match values.");
481 return static_cast<TransformedWritingMode>(mode); 481 return static_cast<TransformedWritingMode>(mode);
482 } 482 }
483 483
484 switch (mode) { 484 switch (mode) {
485 case TopToBottomWritingMode: 485 case TopToBottomWritingMode:
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 ASSERT(child); 1661 ASSERT(child);
1662 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1662 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1663 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1663 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1664 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1664 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1665 adjustAlignmentForChild(*child, newOffset - originalOffset); 1665 adjustAlignmentForChild(*child, newOffset - originalOffset);
1666 } 1666 }
1667 } 1667 }
1668 } 1668 }
1669 1669
1670 } // namespace blink 1670 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698