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 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 charactersWithHyphen->append(hyphenString); | 1485 charactersWithHyphen->append(hyphenString); |
1486 string = charactersWithHyphen->toString().createView(); | 1486 string = charactersWithHyphen->toString().createView(); |
1487 maximumLength = string.length(); | 1487 maximumLength = string.length(); |
1488 } | 1488 } |
1489 | 1489 |
1490 ASSERT(maximumLength >= static_cast<int>(string.length())); | 1490 ASSERT(maximumLength >= static_cast<int>(string.length())); |
1491 | 1491 |
1492 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !renderer().canUseSimple
FontCodePath()); | 1492 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !renderer().canUseSimple
FontCodePath()); |
1493 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); | 1493 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); |
1494 run.setCharacterScanForCodePath(!renderer().canUseSimpleFontCodePath()); | 1494 run.setCharacterScanForCodePath(!renderer().canUseSimpleFontCodePath()); |
| 1495 run.setTextJustify(static_cast<ETextJustify>(style->textJustify())); |
1495 if (textRunNeedsRenderingContext(font)) | 1496 if (textRunNeedsRenderingContext(font)) |
1496 run.setRenderingContext(SVGTextRunRenderingContext::create(&renderer()))
; | 1497 run.setRenderingContext(SVGTextRunRenderingContext::create(&renderer()))
; |
1497 | 1498 |
1498 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. | 1499 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. |
1499 run.setCharactersLength(maximumLength); | 1500 run.setCharactersLength(maximumLength); |
1500 ASSERT(run.charactersLength() >= run.length()); | 1501 ASSERT(run.charactersLength() >= run.length()); |
1501 return run; | 1502 return run; |
1502 } | 1503 } |
1503 | 1504 |
1504 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const | 1505 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const |
(...skipping 21 matching lines...) Expand all Loading... |
1526 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); | 1527 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); |
1527 const int rendererCharacterOffset = 24; | 1528 const int rendererCharacterOffset = 24; |
1528 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1529 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
1529 fputc(' ', stderr); | 1530 fputc(' ', stderr); |
1530 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1531 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
1531 } | 1532 } |
1532 | 1533 |
1533 #endif | 1534 #endif |
1534 | 1535 |
1535 } // namespace blink | 1536 } // namespace blink |
OLD | NEW |