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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_text.h

Issue 2234833003: [LayoutNG] Add base class for NGFragment and NGText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ng_fragment_base.cc to gypi Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 NGText_h 5 #ifndef NGText_h
6 #define NGText_h 6 #define NGText_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_fragment_base.h"
9 #include "platform/LayoutUnit.h" 10 #include "platform/LayoutUnit.h"
10 #include "wtf/text/WTFString.h" 11 #include "wtf/text/WTFString.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 class CORE_EXPORT NGText final { 15 class CORE_EXPORT NGText final : public NGFragmentBase {
15 public: 16 public:
16 NGText(LayoutUnit inlineSize, LayoutUnit blockSize); 17 NGText(LayoutUnit inlineSize,
17 ~NGText() {} 18 LayoutUnit blockSize,
18 19 LayoutUnit inlineOverflow,
19 LayoutUnit inlineSize() const { return m_inlineSize; } 20 LayoutUnit blockOverflow)
20 LayoutUnit blockSize() const { return m_blockSize; } 21 : NGFragmentBase(inlineSize, blockSize, inlineOverflow, blockOverflow) {
21 22 m_isText = true;
22 LayoutUnit inlineOffset() const { return m_inlineOffset; } 23 }
23 LayoutUnit blockOffset() const { return m_blockOffset; }
24 24
25 const String text() const { return String(); } 25 const String text() const { return String(); }
26 26
27 void setOffset(LayoutUnit inlineOffset, LayoutUnit blockOffset); 27 DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
28 28 NGFragmentBase::traceAfterDispatch(visitor);
29 private: 29 }
30 LayoutUnit m_inlineSize;
31 LayoutUnit m_blockSize;
32
33 LayoutUnit m_inlineOffset;
34 LayoutUnit m_blockOffset;
35 }; 30 };
36 31
37 } // namespace blink 32 } // namespace blink
38 33
39 #endif // NGText_h 34 #endif // NGText_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698