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

Side by Side Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 881133003: Revert of text-combine should scale rather than fall back to none when wide (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « Source/core/paint/TextPainter.cpp ('k') | Source/core/rendering/RenderCombineText.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 } else if (child->isText()) { 1390 } else if (child->isText()) {
1391 // Case (3). Text. 1391 // Case (3). Text.
1392 RenderText* t = toRenderText(child); 1392 RenderText* t = toRenderText(child);
1393 1393
1394 if (t->isWordBreak()) { 1394 if (t->isWordBreak()) {
1395 minLogicalWidth = std::max(minLogicalWidth, inlineMin.toLayo utUnit()); 1395 minLogicalWidth = std::max(minLogicalWidth, inlineMin.toLayo utUnit());
1396 inlineMin = FloatWillBeLayoutUnit(); 1396 inlineMin = FloatWillBeLayoutUnit();
1397 continue; 1397 continue;
1398 } 1398 }
1399 1399
1400 if (t->style()->hasTextCombine() && t->isCombineText())
1401 toRenderCombineText(t)->combineText();
1402
1400 // Determine if we have a breakable character. Pass in 1403 // Determine if we have a breakable character. Pass in
1401 // whether or not we should ignore any spaces at the front 1404 // whether or not we should ignore any spaces at the front
1402 // of the string. If those are going to be stripped out, 1405 // of the string. If those are going to be stripped out,
1403 // then they shouldn't be considered in the breakable char 1406 // then they shouldn't be considered in the breakable char
1404 // check. 1407 // check.
1405 bool hasBreakableChar, hasBreak; 1408 bool hasBreakableChar, hasBreak;
1406 FloatWillBeLayoutUnit firstLineMinWidth, lastLineMinWidth; 1409 FloatWillBeLayoutUnit firstLineMinWidth, lastLineMinWidth;
1407 bool hasBreakableStart, hasBreakableEnd; 1410 bool hasBreakableStart, hasBreakableEnd;
1408 FloatWillBeLayoutUnit firstLineMaxWidth, lastLineMaxWidth; 1411 FloatWillBeLayoutUnit firstLineMaxWidth, lastLineMaxWidth;
1409 t->trimmedPrefWidths(inlineMax, 1412 t->trimmedPrefWidths(inlineMax,
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 2051 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
2049 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 2052 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
2050 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 2053 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
2051 2054
2052 if (!style()->isLeftToRightDirection()) 2055 if (!style()->isLeftToRightDirection())
2053 return logicalWidth() - logicalLeft; 2056 return logicalWidth() - logicalLeft;
2054 return logicalLeft; 2057 return logicalLeft;
2055 } 2058 }
2056 2059
2057 } 2060 }
OLDNEW
« no previous file with comments | « Source/core/paint/TextPainter.cpp ('k') | Source/core/rendering/RenderCombineText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698