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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_fragment_base.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
similarity index 75%
copy from third_party/WebKit/Source/core/layout/ng/ng_fragment.h
copy to third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
index 98077b22a75d374a4dcde1b0a4ba801baf8eddc8..d8910a1d2d63a3a38883c8348eec2c777d142b81 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NGFragment_h
-#define NGFragment_h
+#ifndef NGFragmentBase_h
+#define NGFragmentBase_h
#include "core/CoreExport.h"
#include "platform/LayoutUnit.h"
@@ -12,13 +12,8 @@
namespace blink {
-class CORE_EXPORT NGFragment final : public GarbageCollected<NGFragment> {
+class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
public:
- NGFragment(LayoutUnit inlineSize,
- LayoutUnit blockSize,
- LayoutUnit inlineOverflow,
- LayoutUnit blockOverflow);
-
// Returns the border-box size.
LayoutUnit inlineSize() const { return m_inlineSize; }
LayoutUnit blockSize() const { return m_blockSize; }
@@ -34,21 +29,24 @@ class CORE_EXPORT NGFragment final : public GarbageCollected<NGFragment> {
// Should only be used by the parent fragement's layout.
void setOffset(LayoutUnit inlineOffset, LayoutUnit blockOffset);
+ DEFINE_INLINE_TRACE_AFTER_DISPATCH() {}
DECLARE_TRACE();
- private:
+ protected:
+ NGFragmentBase(LayoutUnit inlineSize,
+ LayoutUnit blockSize,
+ LayoutUnit inlineOverflow,
+ LayoutUnit blockOverflow);
+
LayoutUnit m_inlineSize;
LayoutUnit m_blockSize;
-
LayoutUnit m_inlineOverflow;
LayoutUnit m_blockOverflow;
-
LayoutUnit m_inlineOffset;
LayoutUnit m_blockOffset;
-
- HeapVector<Member<const NGFragment>> m_children;
+ bool m_isText;
};
} // namespace blink
-#endif // NGFragment_h
+#endif // NGFragmentBase_h
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698