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

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

Issue 2560383002: Merge 2924: Apply hyphenation when there is only one word in a paragraph (Closed)
Patch Set: Created 4 years 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const UChar* characters16() const { return toText()->characters16(); } 72 const UChar* characters16() const { return toText()->characters16(); }
73 73
74 bool hasEmptyText() const { return toText()->hasEmptyText(); } 74 bool hasEmptyText() const { return toText()->hasEmptyText(); }
75 75
76 unsigned textLength() const { return toText()->textLength(); } 76 unsigned textLength() const { return toText()->textLength(); }
77 77
78 unsigned resolvedTextLength() const { return toText()->resolvedTextLength(); } 78 unsigned resolvedTextLength() const { return toText()->resolvedTextLength(); }
79 79
80 const String& text() const { return toText()->text(); } 80 const String& text() const { return toText()->text(); }
81 81
82 bool containsOnlyWhitespace(unsigned from, unsigned len) const {
83 return toText()->containsOnlyWhitespace(from, len);
84 }
85
82 float width(unsigned from, 86 float width(unsigned from,
83 unsigned len, 87 unsigned len,
84 const Font& font, 88 const Font& font,
85 LayoutUnit xPos, 89 LayoutUnit xPos,
86 TextDirection textDirection, 90 TextDirection textDirection,
87 HashSet<const SimpleFontData*>* fallbackFonts, 91 HashSet<const SimpleFontData*>* fallbackFonts,
88 FloatRect* glyphBounds) const { 92 FloatRect* glyphBounds) const {
89 return toText()->width(from, len, font, xPos, textDirection, fallbackFonts, 93 return toText()->width(from, len, font, xPos, textDirection, fallbackFonts,
90 glyphBounds); 94 glyphBounds);
91 } 95 }
(...skipping 22 matching lines...) Expand all
114 float minLogicalWidth() const { return toText()->minLogicalWidth(); } 118 float minLogicalWidth() const { return toText()->minLogicalWidth(); }
115 119
116 private: 120 private:
117 LayoutText* toText() { return toLayoutText(layoutObject()); } 121 LayoutText* toText() { return toLayoutText(layoutObject()); }
118 const LayoutText* toText() const { return toLayoutText(layoutObject()); } 122 const LayoutText* toText() const { return toLayoutText(layoutObject()); }
119 }; 123 };
120 124
121 } // namespace blink 125 } // namespace blink
122 126
123 #endif // LineLayoutText_h 127 #endif // LineLayoutText_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698