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

Unified Diff: Source/core/layout/api/LineLayoutText.cpp

Issue 1164933006: Create LineLayout api (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: naming nits, remove unimplemented operators 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/api/LineLayoutText.cpp
diff --git a/Source/core/layout/api/LineLayoutText.cpp b/Source/core/layout/api/LineLayoutText.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1bc8f796f7989f53f0ea9d08328413c04a9657a4
--- /dev/null
+++ b/Source/core/layout/api/LineLayoutText.cpp
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "core/layout/api/LineLayoutText.h"
+
+namespace blink {
+
+LineLayoutText::LineLayoutText(const LineLayoutItem& item)
+ : LineLayoutItem(item)
+{
+ ASSERT(!item.layoutObject() || item.layoutObject()->isText());
+}
+
+bool LineLayoutText::isWordBreak() const
+{
+ return toText()->isWordBreak();
+}
+
+bool LineLayoutText::isAllCollapsibleWhitespace() const
+{
+ return toText()->isAllCollapsibleWhitespace();
+}
+
+UChar LineLayoutText::characterAt(unsigned offset) const
+{
+ return toText()->characterAt(offset);
+}
+
+unsigned LineLayoutText::textLength() const
+{
+ return toText()->textLength();
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698