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

Unified Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 50413008: Rendering text-justify:none (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « LayoutTests/fast/css3-text/css3-text-justify/text-justify-none-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index 35540fab37bd914c92b34e68482cf7c37c389fbe..2b9d3b3f7b5f450388dee43c5c02d5b3e599f5b8 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -1013,6 +1013,7 @@ BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo
bool isAfterExpansion = true;
Vector<unsigned, 16> expansionOpportunities;
RenderObject* previousObject = 0;
+ TextJustify textJustify = style()->textJustify();
leviw_travelin_and_unemployed 2013/10/31 00:01:11 I'd rather see this as a boolean. isTextJustifyNon
dw.im 2013/10/31 00:16:33 After sometime, we need to check text-justify:dist
BidiRun* r = firstRun;
for (; r; r = r->next()) {
@@ -1026,7 +1027,7 @@ BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo
// Similarly, line break boxes have no effect on the width.
if (r->m_object->isText()) {
RenderText* rt = toRenderText(r->m_object);
- if (textAlign == JUSTIFY && r != trailingSpaceRun) {
+ if (textAlign == JUSTIFY && r != trailingSpaceRun && textJustify != TextJustifyNone) {
if (!isAfterExpansion)
toInlineTextBox(r->m_box)->setCanHaveLeadingExpansion(true);
unsigned opportunitiesInRun;
@@ -1060,7 +1061,7 @@ BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBo
previousObject = r->m_object;
}
- if (isAfterExpansion && !expansionOpportunities.isEmpty()) {
+ if (textJustify != TextJustifyNone && isAfterExpansion && !expansionOpportunities.isEmpty()) {
leviw_travelin_and_unemployed 2013/10/31 00:01:11 Is this necessary? Won't it be covered by the exis
dw.im 2013/10/31 00:16:33 Hmm. yes. It seems expansionOpportunities would be
expansionOpportunities.last()--;
expansionOpportunityCount--;
}
« no previous file with comments | « LayoutTests/fast/css3-text/css3-text-justify/text-justify-none-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698