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

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

Issue 2786753002: Fix text-align: center/right when line wraps at atomic inline and spaces (Closed)
Patch Set: Rebase Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/line/LineInfo.h
diff --git a/third_party/WebKit/Source/core/layout/line/LineInfo.h b/third_party/WebKit/Source/core/layout/line/LineInfo.h
index c9a9f951556a40a2e1baff3ab369f847c5bf59e6..a44a35f75a2ebc6201d8791d10bb229fd9db3a5b 100644
--- a/third_party/WebKit/Source/core/layout/line/LineInfo.h
+++ b/third_party/WebKit/Source/core/layout/line/LineInfo.h
@@ -26,6 +26,7 @@
#define LineInfo_h
#include "core/layout/line/LineWidth.h"
+#include "core/style/ComputedStyleConstants.h"
#include "wtf/Allocator.h"
namespace blink {
@@ -39,7 +40,8 @@ class LineInfo {
m_isLastLine(false),
m_isEmpty(true),
m_previousLineBrokeCleanly(true),
- m_runsFromLeadingWhitespace(0) {}
+ m_runsFromLeadingWhitespace(0),
+ m_textAlign(ETextAlign::kLeft) {}
bool isFirstLine() const { return m_isFirstLine; }
bool isLastLine() const { return m_isLastLine; }
@@ -59,12 +61,16 @@ class LineInfo {
m_previousLineBrokeCleanly = previousLineBrokeCleanly;
}
+ ETextAlign textAlign() const { return m_textAlign; }
+ void setTextAlign(ETextAlign textAlign) { m_textAlign = textAlign; }
+
private:
bool m_isFirstLine;
bool m_isLastLine;
bool m_isEmpty;
bool m_previousLineBrokeCleanly;
unsigned m_runsFromLeadingWhitespace;
+ ETextAlign m_textAlign;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineIterator.h ('k') | third_party/WebKit/Source/platform/text/BidiResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698