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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 charactersWithHyphen->append(string); | 1536 charactersWithHyphen->append(string); |
1537 charactersWithHyphen->append(hyphenString); | 1537 charactersWithHyphen->append(hyphenString); |
1538 string = charactersWithHyphen->toString().createView(); | 1538 string = charactersWithHyphen->toString().createView(); |
1539 maximumLength = string.length(); | 1539 maximumLength = string.length(); |
1540 } | 1540 } |
1541 | 1541 |
1542 ASSERT(maximumLength >= static_cast<int>(string.length())); | 1542 ASSERT(maximumLength >= static_cast<int>(string.length())); |
1543 | 1543 |
1544 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSim
pleFontCodePath()); | 1544 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSim
pleFontCodePath()); |
1545 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); | 1545 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); |
| 1546 run.setDistributeJustification(style->textJustify() == TextJustifyDistribute
); |
1546 if (textRunNeedsRenderingContext(font)) | 1547 if (textRunNeedsRenderingContext(font)) |
1547 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer)
); | 1548 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer)
); |
1548 | 1549 |
1549 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. | 1550 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. |
1550 run.setCharactersLength(maximumLength); | 1551 run.setCharactersLength(maximumLength); |
1551 ASSERT(run.charactersLength() >= run.length()); | 1552 ASSERT(run.charactersLength() >= run.length()); |
1552 return run; | 1553 return run; |
1553 } | 1554 } |
1554 | 1555 |
1555 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const | 1556 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const |
(...skipping 21 matching lines...) Expand all Loading... |
1577 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); | 1578 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); |
1578 const int rendererCharacterOffset = 24; | 1579 const int rendererCharacterOffset = 24; |
1579 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1580 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
1580 fputc(' ', stderr); | 1581 fputc(' ', stderr); |
1581 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1582 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
1582 } | 1583 } |
1583 | 1584 |
1584 #endif | 1585 #endif |
1585 | 1586 |
1586 } // namespace WebCore | 1587 } // namespace WebCore |
OLD | NEW |