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 9ecb2929eb5cdb9f402419edd5870909aa97dc7c..d7b6be42021d822ad37a2537d9ea0b3d33ba3383 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h |
@@ -54,6 +54,8 @@ class LayoutMultiColumnSpannerPlaceholder; |
class LayoutRubyRun; |
template <class Run> class BidiRunList; |
+enum IndentTextOrNot { DoNotIndentText, IndentText }; |
+ |
// LayoutBlockFlow is the class that implements a block container in CSS 2.1. |
// http://www.w3.org/TR/CSS21/visuren.html#block-boxes |
// |
@@ -97,27 +99,27 @@ public: |
void deleteLineBoxTree() final; |
- LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const |
+ LayoutUnit availableLogicalWidthForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
{ |
- return max<LayoutUnit>(0, logicalRightOffsetForLine(position, shouldIndentText, logicalHeight) - logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight)); |
+ return max<LayoutUnit>(0, logicalRightOffsetForLine(position, indentText, logicalHeight) - logicalLeftOffsetForLine(position, indentText, logicalHeight)); |
} |
- LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const |
+ LayoutUnit logicalRightOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
{ |
- return logicalRightOffsetForLine(position, logicalRightOffsetForContent(), shouldIndentText, logicalHeight); |
+ return logicalRightOffsetForLine(position, logicalRightOffsetForContent(), indentText, logicalHeight); |
} |
- LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const |
+ LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
{ |
- return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), shouldIndentText, logicalHeight); |
+ return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), indentText, logicalHeight); |
} |
- LayoutUnit startOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const |
+ LayoutUnit startOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
{ |
- return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight) |
- : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentText, logicalHeight); |
+ return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, indentText, logicalHeight) |
+ : logicalWidth() - logicalRightOffsetForLine(position, indentText, logicalHeight); |
} |
- LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, LayoutUnit logicalHeight = 0) const |
+ LayoutUnit endOffsetForLine(LayoutUnit position, IndentTextOrNot indentText, LayoutUnit logicalHeight = 0) const |
{ |
- return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight) |
- : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentText, logicalHeight); |
+ return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(position, indentText, logicalHeight) |
+ : logicalWidth() - logicalRightOffsetForLine(position, indentText, logicalHeight); |
} |
// FIXME-BLOCKFLOW: Move this into LayoutBlockFlow once there are no calls |
@@ -183,10 +185,10 @@ public: |
floatingObject.setHeight(logicalWidth); |
} |
- LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText); |
+ LayoutUnit startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot); |
void setStaticInlinePositionForChild(LayoutBox&, LayoutUnit inlinePosition); |
- void updateStaticInlinePositionForChild(LayoutBox&, LayoutUnit logicalTop, bool shouldIndentText = false); |
+ void updateStaticInlinePositionForChild(LayoutBox&, LayoutUnit logicalTop, IndentTextOrNot = DoNotIndentText); |
static bool shouldSkipCreatingRunsForObject(LayoutObject* obj) |
{ |
@@ -309,11 +311,11 @@ protected: |
void addOverflowFromFloats(); |
- LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
+ LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, IndentTextOrNot applyTextIndent, LayoutUnit logicalHeight = 0) const |
{ |
return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(logicalTop, fixedOffset, logicalHeight), applyTextIndent); |
} |
- LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
+ LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, IndentTextOrNot applyTextIndent, LayoutUnit logicalHeight = 0) const |
{ |
return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logicalTop, fixedOffset, logicalHeight), applyTextIndent); |
} |
@@ -366,8 +368,8 @@ private: |
LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit* heightRemaining) const; |
LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit* heightRemaining) const; |
- LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; |
- LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const; |
+ LayoutUnit adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, IndentTextOrNot applyTextIndent) const; |
+ LayoutUnit adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloats, IndentTextOrNot applyTextIndent) const; |
virtual RootInlineBox* createRootInlineBox(); // Subclassed by SVG |