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 28 matching lines...) Expand all Loading... |
39 #include "core/rendering/HitTestResult.h" | 39 #include "core/rendering/HitTestResult.h" |
40 #include "core/rendering/PaintInfo.h" | 40 #include "core/rendering/PaintInfo.h" |
41 #include "core/rendering/RenderBR.h" | 41 #include "core/rendering/RenderBR.h" |
42 #include "core/rendering/RenderBlock.h" | 42 #include "core/rendering/RenderBlock.h" |
43 #include "core/rendering/RenderCombineText.h" | 43 #include "core/rendering/RenderCombineText.h" |
44 #include "core/rendering/RenderRubyRun.h" | 44 #include "core/rendering/RenderRubyRun.h" |
45 #include "core/rendering/RenderRubyText.h" | 45 #include "core/rendering/RenderRubyText.h" |
46 #include "core/rendering/RenderTheme.h" | 46 #include "core/rendering/RenderTheme.h" |
47 #include "core/rendering/TextPainter.h" | 47 #include "core/rendering/TextPainter.h" |
48 #include "core/rendering/style/ShadowList.h" | 48 #include "core/rendering/style/ShadowList.h" |
49 #include "core/rendering/svg/SVGTextRunRenderingContext.h" | |
50 #include "platform/RuntimeEnabledFeatures.h" | 49 #include "platform/RuntimeEnabledFeatures.h" |
51 #include "platform/fonts/FontCache.h" | 50 #include "platform/fonts/FontCache.h" |
52 #include "platform/fonts/GlyphBuffer.h" | 51 #include "platform/fonts/GlyphBuffer.h" |
53 #include "platform/fonts/shaping/SimpleShaper.h" | 52 #include "platform/fonts/shaping/SimpleShaper.h" |
54 #include "platform/graphics/GraphicsContextStateSaver.h" | 53 #include "platform/graphics/GraphicsContextStateSaver.h" |
55 #include "wtf/Vector.h" | 54 #include "wtf/Vector.h" |
56 #include "wtf/text/CString.h" | 55 #include "wtf/text/CString.h" |
57 #include "wtf/text/StringBuilder.h" | 56 #include "wtf/text/StringBuilder.h" |
58 | 57 |
59 #include <algorithm> | 58 #include <algorithm> |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 charactersWithHyphen->append(hyphenString); | 519 charactersWithHyphen->append(hyphenString); |
521 string = charactersWithHyphen->toString().createView(); | 520 string = charactersWithHyphen->toString().createView(); |
522 maximumLength = string.length(); | 521 maximumLength = string.length(); |
523 } | 522 } |
524 | 523 |
525 ASSERT(maximumLength >= static_cast<int>(string.length())); | 524 ASSERT(maximumLength >= static_cast<int>(string.length())); |
526 | 525 |
527 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !renderer().canUseSimple
FontCodePath()); | 526 TextRun run(string, textPos(), expansion(), expansionBehavior(), direction()
, dirOverride() || style->rtlOrdering() == VisualOrder, !renderer().canUseSimple
FontCodePath()); |
528 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); | 527 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); |
529 run.setCharacterScanForCodePath(!renderer().canUseSimpleFontCodePath()); | 528 run.setCharacterScanForCodePath(!renderer().canUseSimpleFontCodePath()); |
530 if (textRunNeedsRenderingContext(font)) | |
531 run.setRenderingContext(SVGTextRunRenderingContext::create(&renderer()))
; | |
532 | 529 |
533 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. | 530 // Propagate the maximum length of the characters buffer to the TextRun, eve
n when we're only processing a substring. |
534 run.setCharactersLength(maximumLength); | 531 run.setCharactersLength(maximumLength); |
535 ASSERT(run.charactersLength() >= run.length()); | 532 ASSERT(run.charactersLength() >= run.length()); |
536 return run; | 533 return run; |
537 } | 534 } |
538 | 535 |
539 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const | 536 TextRun InlineTextBox::constructTextRunForInspector(RenderStyle* style, const Fo
nt& font) const |
540 { | 537 { |
541 return InlineTextBox::constructTextRun(style, font); | 538 return InlineTextBox::constructTextRun(style, font); |
(...skipping 19 matching lines...) Expand all Loading... |
561 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); | 558 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); |
562 const int rendererCharacterOffset = 24; | 559 const int rendererCharacterOffset = 24; |
563 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 560 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
564 fputc(' ', stderr); | 561 fputc(' ', stderr); |
565 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 562 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
566 } | 563 } |
567 | 564 |
568 #endif | 565 #endif |
569 | 566 |
570 } // namespace blink | 567 } // namespace blink |
OLD | NEW |