Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: Source/core/layout/line/InlineTextBox.h

Issue 940373003: Rename RenderText to LayoutText (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/layout/line/InlineIterator.h ('k') | Source/core/layout/line/InlineTextBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 * 20 *
21 */ 21 */
22 22
23 #ifndef InlineTextBox_h 23 #ifndef InlineTextBox_h
24 #define InlineTextBox_h 24 #define InlineTextBox_h
25 25
26 #include "core/layout/LayoutText.h" // so textRenderer() can be inline
26 #include "core/layout/line/FloatToLayoutUnit.h" 27 #include "core/layout/line/FloatToLayoutUnit.h"
27 #include "core/layout/line/InlineBox.h" 28 #include "core/layout/line/InlineBox.h"
28 #include "core/rendering/RenderText.h" // so textRenderer() can be inline
29 #include "platform/text/TextRun.h" 29 #include "platform/text/TextRun.h"
30 #include "wtf/Forward.h" 30 #include "wtf/Forward.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class DocumentMarker; 34 class DocumentMarker;
35 class GraphicsContext; 35 class GraphicsContext;
36 36
37 const unsigned short cNoTruncation = USHRT_MAX; 37 const unsigned short cNoTruncation = USHRT_MAX;
38 const unsigned short cFullTruncation = USHRT_MAX - 1; 38 const unsigned short cFullTruncation = USHRT_MAX - 1;
39 39
40 class InlineTextBox : public InlineBox { 40 class InlineTextBox : public InlineBox {
41 public: 41 public:
42 InlineTextBox(LayoutObject& obj, int start, unsigned short length) 42 InlineTextBox(LayoutObject& obj, int start, unsigned short length)
43 : InlineBox(obj) 43 : InlineBox(obj)
44 , m_prevTextBox(0) 44 , m_prevTextBox(0)
45 , m_nextTextBox(0) 45 , m_nextTextBox(0)
46 , m_start(start) 46 , m_start(start)
47 , m_len(length) 47 , m_len(length)
48 , m_truncation(cNoTruncation) 48 , m_truncation(cNoTruncation)
49 { 49 {
50 setIsText(true); 50 setIsText(true);
51 } 51 }
52 52
53 RenderText& renderer() const { return toRenderText(InlineBox::renderer()); } 53 LayoutText& renderer() const { return toLayoutText(InlineBox::renderer()); }
54 54
55 virtual void destroy() override final; 55 virtual void destroy() override final;
56 56
57 InlineTextBox* prevTextBox() const { return m_prevTextBox; } 57 InlineTextBox* prevTextBox() const { return m_prevTextBox; }
58 InlineTextBox* nextTextBox() const { return m_nextTextBox; } 58 InlineTextBox* nextTextBox() const { return m_nextTextBox; }
59 void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; } 59 void setNextTextBox(InlineTextBox* n) { m_nextTextBox = n; }
60 void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; } 60 void setPreviousTextBox(InlineTextBox* p) { m_prevTextBox = p; }
61 61
62 // FIXME: These accessors should ASSERT(!isDirty()). See https://bugs.webkit .org/show_bug.cgi?id=97264 62 // FIXME: These accessors should ASSERT(!isDirty()). See https://bugs.webkit .org/show_bug.cgi?id=97264
63 unsigned start() const { return m_start; } 63 unsigned start() const { return m_start; }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 }; 172 };
173 173
174 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); 174 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox);
175 175
176 void alignSelectionRectToDevicePixels(FloatRectWillBeLayoutRect&); 176 void alignSelectionRectToDevicePixels(FloatRectWillBeLayoutRect&);
177 177
178 } // namespace blink 178 } // namespace blink
179 179
180 #endif // InlineTextBox_h 180 #endif // InlineTextBox_h
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineIterator.h ('k') | Source/core/layout/line/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698