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 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1527 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); | 1527 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); |
1528 if (textRunNeedsRenderingContext(font)) | 1528 if (textRunNeedsRenderingContext(font)) |
1529 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer)
); | 1529 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer)
); |
1530 | 1530 |
1531 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. | 1531 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. |
1532 run.setCharactersLength(maximumLength); | 1532 run.setCharactersLength(maximumLength); |
1533 ASSERT(run.charactersLength() >= run.length()); | 1533 ASSERT(run.charactersLength() >= run.length()); |
1534 return run; | 1534 return run; |
1535 } | 1535 } |
1536 | 1536 |
| 1537 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const |
| 1538 { |
| 1539 return InlineTextBox::constructTextRun(style, font); |
| 1540 } |
| 1541 |
1537 #ifndef NDEBUG | 1542 #ifndef NDEBUG |
1538 | 1543 |
1539 const char* InlineTextBox::boxName() const | 1544 const char* InlineTextBox::boxName() const |
1540 { | 1545 { |
1541 return "InlineTextBox"; | 1546 return "InlineTextBox"; |
1542 } | 1547 } |
1543 | 1548 |
1544 void InlineTextBox::showBox(int printedCharacters) const | 1549 void InlineTextBox::showBox(int printedCharacters) const |
1545 { | 1550 { |
1546 const RenderText* obj = toRenderText(renderer()); | 1551 const RenderText* obj = toRenderText(renderer()); |
1547 String value = obj->text(); | 1552 String value = obj->text(); |
1548 value = value.substring(start(), len()); | 1553 value = value.substring(start(), len()); |
1549 value.replaceWithLiteral('\\', "\\\\"); | 1554 value.replaceWithLiteral('\\', "\\\\"); |
1550 value.replaceWithLiteral('\n', "\\n"); | 1555 value.replaceWithLiteral('\n', "\\n"); |
1551 printedCharacters += fprintf(stderr, "%s\t%p", boxName(), this); | 1556 printedCharacters += fprintf(stderr, "%s\t%p", boxName(), this); |
1552 for (; printedCharacters < showTreeCharacterOffset; printedCharacters++) | 1557 for (; printedCharacters < showTreeCharacterOffset; printedCharacters++) |
1553 fputc(' ', stderr); | 1558 fputc(' ', stderr); |
1554 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); | 1559 printedCharacters = fprintf(stderr, "\t%s %p", obj->renderName(), obj); |
1555 const int rendererCharacterOffset = 24; | 1560 const int rendererCharacterOffset = 24; |
1556 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1561 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
1557 fputc(' ', stderr); | 1562 fputc(' ', stderr); |
1558 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1563 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
1559 } | 1564 } |
1560 | 1565 |
1561 #endif | 1566 #endif |
1562 | 1567 |
1563 } // namespace WebCore | 1568 } // namespace WebCore |
OLD | NEW |