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

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

Issue 1043643002: Switch line layout to LayoutUnit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More TestExpectations tweaks Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef AbstractInlineTextBox_h 31 #ifndef AbstractInlineTextBox_h
32 #define AbstractInlineTextBox_h 32 #define AbstractInlineTextBox_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/dom/Range.h" 35 #include "core/dom/Range.h"
36 #include "core/layout/LayoutText.h" 36 #include "core/layout/LayoutText.h"
37 #include "core/layout/line/FloatToLayoutUnit.h"
38 #include "core/layout/line/InlineTextBox.h" 37 #include "core/layout/line/InlineTextBox.h"
39 #include "wtf/HashMap.h" 38 #include "wtf/HashMap.h"
40 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
41 40
42 namespace blink { 41 namespace blink {
43 42
44 class InlineTextBox; 43 class InlineTextBox;
45 44
46 // High-level abstraction of InlineTextBox to allow the accessibility module to 45 // High-level abstraction of InlineTextBox to allow the accessibility module to
47 // get information about InlineTextBoxes without tight coupling. 46 // get information about InlineTextBoxes without tight coupling.
(...skipping 24 matching lines...) Expand all
72 TopToBottom, 71 TopToBottom,
73 BottomToTop 72 BottomToTop
74 }; 73 };
75 74
76 LayoutText* layoutText() const { return m_layoutText; } 75 LayoutText* layoutText() const { return m_layoutText; }
77 76
78 PassRefPtr<AbstractInlineTextBox> nextInlineTextBox() const; 77 PassRefPtr<AbstractInlineTextBox> nextInlineTextBox() const;
79 LayoutRect bounds() const; 78 LayoutRect bounds() const;
80 unsigned len() const; 79 unsigned len() const;
81 Direction direction() const; 80 Direction direction() const;
82 void characterWidths(Vector<FloatWillBeLayoutUnit>&) const; 81 void characterWidths(Vector<float>&) const;
83 void wordBoundaries(Vector<WordBoundaries>&) const; 82 void wordBoundaries(Vector<WordBoundaries>&) const;
84 String text() const; 83 String text() const;
85 bool isFirst() const; 84 bool isFirst() const;
86 bool isLast() const; 85 bool isLast() const;
87 PassRefPtr<AbstractInlineTextBox> nextOnLine() const; 86 PassRefPtr<AbstractInlineTextBox> nextOnLine() const;
88 PassRefPtr<AbstractInlineTextBox> previousOnLine() const; 87 PassRefPtr<AbstractInlineTextBox> previousOnLine() const;
89 88
90 private: 89 private:
91 void detach(); 90 void detach();
92 91
93 // Weak ptrs; these are nulled when InlineTextBox::destroy() calls AbstractI nlineTextBox::willDestroy. 92 // Weak ptrs; these are nulled when InlineTextBox::destroy() calls AbstractI nlineTextBox::willDestroy.
94 LayoutText* m_layoutText; 93 LayoutText* m_layoutText;
95 InlineTextBox* m_inlineTextBox; 94 InlineTextBox* m_inlineTextBox;
96 95
97 typedef HashMap<InlineTextBox*, RefPtr<AbstractInlineTextBox>> InlineToAbstr actInlineTextBoxHashMap; 96 typedef HashMap<InlineTextBox*, RefPtr<AbstractInlineTextBox>> InlineToAbstr actInlineTextBoxHashMap;
98 static InlineToAbstractInlineTextBoxHashMap* gAbstractInlineTextBoxMap; 97 static InlineToAbstractInlineTextBoxHashMap* gAbstractInlineTextBoxMap;
99 }; 98 };
100 99
101 } // namespace blink 100 } // namespace blink
102 101
103 #endif // AbstractInlineTextBox_h 102 #endif // AbstractInlineTextBox_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTreeAsText.cpp ('k') | Source/core/layout/line/AbstractInlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698