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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineIterator.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/InlineIterator.h
diff --git a/third_party/WebKit/Source/core/layout/line/InlineIterator.h b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
index ac0c54d11a05d2aba220cd75390c4d9e4aa1294d..dfb5b1d2bcfbb72f8d2be6f91a4afd13f06dc466 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineIterator.h
+++ b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
@@ -604,13 +604,14 @@ inline BidiRun* InlineBidiResolver::addTrailingRun(
}
template <>
-inline bool InlineBidiResolver::needsToApplyL1Rule(BidiRunList<BidiRun>& runs) {
- if (!runs.logicallyLastRun()
- ->m_lineLayoutItem.style()
- ->breakOnlyAfterWhiteSpace() ||
- !runs.logicallyLastRun()->m_lineLayoutItem.style()->autoWrap())
- return false;
- return true;
+inline bool InlineBidiResolver::needsTrailingSpace(BidiRunList<BidiRun>& runs) {
+ if (m_needsTrailingSpace)
+ return true;
+ const ComputedStyle& style =
+ runs.logicallyLastRun()->m_lineLayoutItem.styleRef();
+ if (style.breakOnlyAfterWhiteSpace() && style.autoWrap())
+ return true;
+ return false;
}
static inline bool isIsolatedInline(LineLayoutItem object) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp ('k') | third_party/WebKit/Source/core/layout/line/LineInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698