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

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

Issue 1164933006: Create LineLayout api (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: all line API implementations now in headers 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef LineLayoutText_h
6 #define LineLayoutText_h
7
8 #include "core/layout/LayoutText.h"
9 #include "core/layout/api/LineLayoutItem.h"
10 #include "platform/LayoutUnit.h"
11 #include "platform/text/TextPath.h"
12 #include "wtf/Forward.h"
13
14 namespace blink {
15
16 class LayoutText;
17
18 class LineLayoutText : public LineLayoutItem {
19 public:
20 LineLayoutText(LayoutText* layoutObject) : LineLayoutItem(layoutObject) { }
21 LineLayoutText(const LineLayoutItem&);
22 LineLayoutText() { }
23
24 bool isWordBreak() const
25 {
26 return toText()->isWordBreak();
27 }
28
29 bool isAllCollapsibleWhitespace() const
30 {
31 return toText()->isAllCollapsibleWhitespace();
32 }
33
34 UChar characterAt(unsigned offset) const
35 {
36 return toText()->characterAt(offset);
37 }
38
39 unsigned textLength() const
40 {
41 return toText()->textLength();
42 }
43
44 private:
45 LayoutText* toText() { return toLayoutText(layoutObject()); }
46 const LayoutText* toText() const { return toLayoutText(layoutObject()); }
47 };
48
49 } // namespace blink
50
51 #endif // LineLayoutText_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698