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

Unified Diff: third_party/WebKit/Source/core/layout/line/LineWidth.h

Issue 1583783002: Use IndentTextOrNot instead of a bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@568851-2
Patch Set: Update Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/line/LineWidth.h
diff --git a/third_party/WebKit/Source/core/layout/line/LineWidth.h b/third_party/WebKit/Source/core/layout/line/LineWidth.h
index 89fca11d2ef08692111c35649af29490169109e2..33d94c44df66199665904118803f839b913bc5fc 100644
--- a/third_party/WebKit/Source/core/layout/line/LineWidth.h
+++ b/third_party/WebKit/Source/core/layout/line/LineWidth.h
@@ -39,13 +39,12 @@ namespace blink {
class FloatingObject;
class LineLayoutRubyRun;
-enum IndentTextOrNot { DoNotIndentText, IndentText };
enum WhitespaceTreatment { ExcludeWhitespace, IncludeWhitespace };
class LineWidth {
STACK_ALLOCATED();
public:
- LineWidth(LineLayoutBlockFlow, bool isFirstLine, IndentTextOrNot shouldIndentText);
+ LineWidth(LineLayoutBlockFlow, bool isFirstLine, IndentTextOrNot);
bool fitsOnLine() const { return currentWidth() <= (m_availableWidth + LayoutUnit::epsilon()); }
bool fitsOnLine(float extra) const { return currentWidth() + extra <= (m_availableWidth + LayoutUnit::epsilon()); }
@@ -74,7 +73,7 @@ public:
void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = width; }
void snapUncommittedWidth() { m_uncommittedWidth = LayoutUnit(m_uncommittedWidth).toFloat(); }
- bool shouldIndentText() const { return m_shouldIndentText == IndentText; }
+ IndentTextOrNot indentText() const { return m_indentText; }
private:
void computeAvailableWidthFromLeftAndRight();
@@ -90,7 +89,7 @@ private:
float m_right;
float m_availableWidth;
bool m_isFirstLine;
- IndentTextOrNot m_shouldIndentText;
+ IndentTextOrNot m_indentText;
};
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/LineBreaker.cpp ('k') | third_party/WebKit/Source/core/layout/line/LineWidth.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698