OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * Copyright (C) 2013 Adobe Systems Incorporated. | 5 * Copyright (C) 2013 Adobe Systems Incorporated. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "core/rendering/InlineTextBox.h" | 28 #include "core/rendering/InlineTextBox.h" |
29 #include "core/rendering/RenderCombineText.h" | 29 #include "core/rendering/RenderCombineText.h" |
30 #include "core/rendering/RenderInline.h" | 30 #include "core/rendering/RenderInline.h" |
31 #include "core/rendering/RenderLayer.h" | 31 #include "core/rendering/RenderLayer.h" |
32 #include "core/rendering/RenderListMarker.h" | 32 #include "core/rendering/RenderListMarker.h" |
33 #include "core/rendering/RenderRubyRun.h" | 33 #include "core/rendering/RenderRubyRun.h" |
34 #include "core/rendering/break_lines.h" | 34 #include "core/rendering/break_lines.h" |
35 #include "core/rendering/line/LineBreaker.h" | 35 #include "core/rendering/line/LineBreaker.h" |
36 #include "core/rendering/line/LineInfo.h" | 36 #include "core/rendering/line/LineInfo.h" |
37 #include "core/rendering/line/LineWidth.h" | 37 #include "core/rendering/line/LineWidth.h" |
| 38 #include "core/rendering/line/RenderTextInfo.h" |
38 #include "core/rendering/line/TrailingObjects.h" | 39 #include "core/rendering/line/TrailingObjects.h" |
| 40 #include "core/rendering/line/WordMeasurement.h" |
39 #include "core/rendering/svg/RenderSVGInlineText.h" | 41 #include "core/rendering/svg/RenderSVGInlineText.h" |
40 | 42 |
41 namespace WebCore { | 43 namespace WebCore { |
42 | 44 |
43 // We don't let our line box tree for a single line get any deeper than this. | 45 // We don't let our line box tree for a single line get any deeper than this. |
44 const unsigned cMaxLineDepth = 200; | 46 const unsigned cMaxLineDepth = 200; |
45 | 47 |
46 class WordMeasurement { | |
47 public: | |
48 WordMeasurement() | |
49 : renderer(0) | |
50 , width(0) | |
51 , startOffset(0) | |
52 , endOffset(0) | |
53 { | |
54 } | |
55 | |
56 RenderText* renderer; | |
57 float width; | |
58 int startOffset; | |
59 int endOffset; | |
60 HashSet<const SimpleFontData*> fallbackFonts; | |
61 }; | |
62 | |
63 class BreakingContext { | 48 class BreakingContext { |
64 public: | 49 public: |
65 BreakingContext(InlineBidiResolver& resolver, LineInfo& inLineInfo, LineWidt
h& lineWidth, RenderTextInfo& inRenderTextInfo, FloatingObject* inLastFloatFromP
reviousLine, bool appliedStartWidth, RenderBlockFlow* block) | 50 BreakingContext(InlineBidiResolver& resolver, LineInfo& inLineInfo, LineWidt
h& lineWidth, RenderTextInfo& inRenderTextInfo, FloatingObject* inLastFloatFromP
reviousLine, bool appliedStartWidth, RenderBlockFlow* block) |
66 : m_resolver(resolver) | 51 : m_resolver(resolver) |
67 , m_current(resolver.position()) | 52 , m_current(resolver.position()) |
68 , m_lineBreak(resolver.position()) | 53 , m_lineBreak(resolver.position()) |
69 , m_block(block) | 54 , m_block(block) |
70 , m_lastObject(m_current.object()) | 55 , m_lastObject(m_current.object()) |
71 , m_nextObject(0) | 56 , m_nextObject(0) |
72 , m_currentStyle(0) | 57 , m_currentStyle(0) |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 | 892 |
908 if (style->textIndentType() == TextIndentHanging) | 893 if (style->textIndentType() == TextIndentHanging) |
909 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In
dentText; | 894 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In
dentText; |
910 | 895 |
911 return shouldIndentText; | 896 return shouldIndentText; |
912 } | 897 } |
913 | 898 |
914 } | 899 } |
915 | 900 |
916 #endif // BreakingContextInlineHeaders_h | 901 #endif // BreakingContextInlineHeaders_h |
OLD | NEW |