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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_fragment.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
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/layout/ng/ng_fragment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/ng_fragment.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
index 98077b22a75d374a4dcde1b0a4ba801baf8eddc8..44fef5d670aa89dfcfcfbd7fedddbc720ca78fcf 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
@@ -6,47 +6,31 @@
#define NGFragment_h
#include "core/CoreExport.h"
+#include "core/layout/ng/ng_fragment_base.h"
#include "platform/LayoutUnit.h"
#include "platform/heap/Handle.h"
#include "wtf/Vector.h"
namespace blink {
-class CORE_EXPORT NGFragment final : public GarbageCollected<NGFragment> {
+class CORE_EXPORT NGFragment final : public NGFragmentBase {
public:
NGFragment(LayoutUnit inlineSize,
LayoutUnit blockSize,
LayoutUnit inlineOverflow,
- LayoutUnit blockOverflow);
+ LayoutUnit blockOverflow)
+ : NGFragmentBase(inlineSize, blockSize, inlineOverflow, blockOverflow) {
+ m_isText = false;
+ }
- // Returns the border-box size.
- LayoutUnit inlineSize() const { return m_inlineSize; }
- LayoutUnit blockSize() const { return m_blockSize; }
-
- // Returns the total size, including the contents outside of the border-box.
- LayoutUnit inlineOverflow() const { return m_inlineOverflow; }
- LayoutUnit blockOverflow() const { return m_blockOverflow; }
-
- // Returns the offset relative to the parent fragement's content-box.
- LayoutUnit inlineOffset() const { return m_inlineOffset; }
- LayoutUnit blockOffset() const { return m_blockOffset; }
-
- // Should only be used by the parent fragement's layout.
- void setOffset(LayoutUnit inlineOffset, LayoutUnit blockOffset);
-
- DECLARE_TRACE();
+ DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
+ visitor->trace(m_children);
+ NGFragmentBase::traceAfterDispatch(visitor);
+ }
private:
- LayoutUnit m_inlineSize;
- LayoutUnit m_blockSize;
-
- LayoutUnit m_inlineOverflow;
- LayoutUnit m_blockOverflow;
-
- LayoutUnit m_inlineOffset;
- LayoutUnit m_blockOffset;
-
- HeapVector<Member<const NGFragment>> m_children;
+ HeapVector<Member<const NGFragmentBase>> m_children;
+ bool m_isText;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/layout/ng/ng_fragment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698