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

Side by Side Diff: trunk/Source/core/rendering/InlineTextBox.cpp

Issue 146503002: Revert 165189 "Rendering text-justify:distribute for 8 bit chara..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 charactersWithHyphen->append(hyphenString); 1515 charactersWithHyphen->append(hyphenString);
1516 string = charactersWithHyphen->toString().createView(); 1516 string = charactersWithHyphen->toString().createView();
1517 maximumLength = string.length(); 1517 maximumLength = string.length();
1518 } 1518 }
1519 1519
1520 ASSERT(maximumLength >= static_cast<int>(string.length())); 1520 ASSERT(maximumLength >= static_cast<int>(string.length()));
1521 1521
1522 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction() , dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSim pleFontCodePath()); 1522 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction() , dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSim pleFontCodePath());
1523 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); 1523 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize());
1524 run.setCharacterScanForCodePath(!textRenderer->canUseSimpleFontCodePath()); 1524 run.setCharacterScanForCodePath(!textRenderer->canUseSimpleFontCodePath());
1525 run.setDistributeJustification(style->textJustify() == TextJustifyDistribute );
1526 if (textRunNeedsRenderingContext(font)) 1525 if (textRunNeedsRenderingContext(font))
1527 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer) ); 1526 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer) );
1528 1527
1529 // Propagate the maximum length of the characters buffer to the TextRun, eve n when we're only processing a substring. 1528 // Propagate the maximum length of the characters buffer to the TextRun, eve n when we're only processing a substring.
1530 run.setCharactersLength(maximumLength); 1529 run.setCharactersLength(maximumLength);
1531 ASSERT(run.charactersLength() >= run.length()); 1530 ASSERT(run.charactersLength() >= run.length());
1532 return run; 1531 return run;
1533 } 1532 }
1534 1533
1535 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo nt& font) const 1534 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo nt& font) const
(...skipping 21 matching lines...) Expand all
1557 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); 1556 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj);
1558 const int rendererCharacterOffset = 24; 1557 const int rendererCharacterOffset = 24;
1559 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1558 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1560 fputc(' ', stderr); 1559 fputc(' ', stderr);
1561 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1560 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1562 } 1561 }
1563 1562
1564 #endif 1563 #endif
1565 1564
1566 } // namespace WebCore 1565 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698