OLD | NEW |
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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 charactersWithHyphen->append(string); | 1526 charactersWithHyphen->append(string); |
1527 charactersWithHyphen->append(hyphenString); | 1527 charactersWithHyphen->append(hyphenString); |
1528 string = charactersWithHyphen->toString().createView(); | 1528 string = charactersWithHyphen->toString().createView(); |
1529 maximumLength = string.length(); | 1529 maximumLength = string.length(); |
1530 } | 1530 } |
1531 | 1531 |
1532 ASSERT(maximumLength >= static_cast<int>(string.length())); | 1532 ASSERT(maximumLength >= static_cast<int>(string.length())); |
1533 | 1533 |
1534 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSim
pleFontCodePath()); | 1534 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSim
pleFontCodePath()); |
1535 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); | 1535 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); |
| 1536 run.setDistributeJustification(style->textJustify() == TextJustifyDistribute
); |
1536 if (textRunNeedsRenderingContext(font)) | 1537 if (textRunNeedsRenderingContext(font)) |
1537 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer)
); | 1538 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer)
); |
1538 | 1539 |
1539 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. | 1540 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. |
1540 run.setCharactersLength(maximumLength); | 1541 run.setCharactersLength(maximumLength); |
1541 ASSERT(run.charactersLength() >= run.length()); | 1542 ASSERT(run.charactersLength() >= run.length()); |
1542 return run; | 1543 return run; |
1543 } | 1544 } |
1544 | 1545 |
1545 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const | 1546 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const |
(...skipping 21 matching lines...) Expand all Loading... |
1567 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); | 1568 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); |
1568 const int rendererCharacterOffset = 24; | 1569 const int rendererCharacterOffset = 24; |
1569 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1570 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
1570 fputc(' ', stderr); | 1571 fputc(' ', stderr); |
1571 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1572 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
1572 } | 1573 } |
1573 | 1574 |
1574 #endif | 1575 #endif |
1575 | 1576 |
1576 } // namespace WebCore | 1577 } // namespace WebCore |
OLD | NEW |