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

Side by Side Diff: Source/core/layout/api/LineLayoutText.h

Issue 1330433003: [Line Layout API] Add textStartOffset to LineLayoutText (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ignore previous patch, review hypnotoad Created 5 years, 3 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
« no previous file with comments | « Source/core/layout/LayoutText.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LineLayoutText_h 5 #ifndef LineLayoutText_h
6 #define LineLayoutText_h 6 #define LineLayoutText_h
7 7
8 #include "core/layout/LayoutText.h" 8 #include "core/layout/LayoutText.h"
9 #include "core/layout/api/LineLayoutItem.h" 9 #include "core/layout/api/LineLayoutItem.h"
10 #include "platform/LayoutUnit.h" 10 #include "platform/LayoutUnit.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 SelectionState selectionState() const 115 SelectionState selectionState() const
116 { 116 {
117 return toText()->selectionState(); 117 return toText()->selectionState();
118 } 118 }
119 119
120 void selectionStartEnd(int& spos, int& epos) const 120 void selectionStartEnd(int& spos, int& epos) const
121 { 121 {
122 return toText()->selectionStartEnd(spos, epos); 122 return toText()->selectionStartEnd(spos, epos);
123 } 123 }
124 124
125 unsigned textStartOffset() const
126 {
127 return toText()->textStartOffset();
128 }
129
125 private: 130 private:
126 LayoutText* toText() { return toLayoutText(layoutObject()); } 131 LayoutText* toText() { return toLayoutText(layoutObject()); }
127 const LayoutText* toText() const { return toLayoutText(layoutObject()); } 132 const LayoutText* toText() const { return toLayoutText(layoutObject()); }
128 }; 133 };
129 134
130 } // namespace blink 135 } // namespace blink
131 136
132 #endif // LineLayoutText_h 137 #endif // LineLayoutText_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698