Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| index cc1dc25e817df631e96b0409d12769b80ca4dd61..354dd0e832b54c160388f96dcf3d27438f0721b6 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
| @@ -99,24 +99,24 @@ public: |
| void deleteLineBoxTree() final; |
| - LayoutUnit availableLogicalWidthForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
| + LayoutUnit availableLogicalWidthForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = LayoutUnit()) const |
| { |
| - return max<LayoutUnit>(0, logicalRightOffsetForLine(position, indentText, logicalHeight) - logicalLeftOffsetForLine(position, indentText, logicalHeight)); |
| + return max<LayoutUnit>(LayoutUnit(), logicalRightOffsetForLine(position, indentText, logicalHeight) - logicalLeftOffsetForLine(position, indentText, logicalHeight)); |
| } |
| - LayoutUnit logicalRightOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
| + LayoutUnit logicalRightOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = LayoutUnit()) const |
| { |
| return logicalRightOffsetForLine(position, logicalRightOffsetForContent(), indentText, logicalHeight); |
| } |
| - LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
| + LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = LayoutUnit()) const |
| { |
| return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), indentText, logicalHeight); |
| } |
| - LayoutUnit startOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
| + LayoutUnit startOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = LayoutUnit()) const |
| { |
| return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, indentText, logicalHeight) |
| : logicalWidth() - logicalRightOffsetForLine(position, indentText, logicalHeight); |
| } |
| - LayoutUnit endOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
| + LayoutUnit endOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = LayoutUnit()) const |
| { |
| return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, indentText, logicalHeight) |
| : logicalWidth() - logicalRightOffsetForLine(position, indentText, logicalHeight); |
| @@ -467,19 +467,19 @@ public: |
| static LayoutUnit positiveMarginBeforeDefault(const LayoutBlockFlow* block) |
| { |
| - return std::max<LayoutUnit>(block->marginBefore(), 0); |
| + return std::max<LayoutUnit>(block->marginBefore(), LayoutUnit()); |
|
eae
2016/01/29 03:38:11
No need for template specification if you specify
leviw_travelin_and_unemployed
2016/01/29 03:47:27
Makes sense.
|
| } |
| static LayoutUnit negativeMarginBeforeDefault(const LayoutBlockFlow* block) |
| { |
| - return std::max<LayoutUnit>(-block->marginBefore(), 0); |
| + return std::max<LayoutUnit>(-block->marginBefore(), LayoutUnit()); |
| } |
| static LayoutUnit positiveMarginAfterDefault(const LayoutBlockFlow* block) |
| { |
| - return std::max<LayoutUnit>(block->marginAfter(), 0); |
| + return std::max<LayoutUnit>(block->marginAfter(), LayoutUnit()); |
| } |
| static LayoutUnit negativeMarginAfterDefault(const LayoutBlockFlow* block) |
| { |
| - return std::max<LayoutUnit>(-block->marginAfter(), 0); |
| + return std::max<LayoutUnit>(-block->marginAfter(), LayoutUnit()); |
| } |
| MarginValues m_margins; |