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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_text.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_text.h b/third_party/WebKit/Source/core/layout/ng/ng_text.h
index 2b92c4554abd9193d0413e3d132e567500214b6f..111722d62eca54c92ee49690e27ae1a0631a1655 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_text.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_text.h
@@ -6,32 +6,27 @@
#define NGText_h
#include "core/CoreExport.h"
+#include "core/layout/ng/ng_fragment_base.h"
#include "platform/LayoutUnit.h"
#include "wtf/text/WTFString.h"
namespace blink {
-class CORE_EXPORT NGText final {
+class CORE_EXPORT NGText final : public NGFragmentBase {
public:
- NGText(LayoutUnit inlineSize, LayoutUnit blockSize);
- ~NGText() {}
-
- LayoutUnit inlineSize() const { return m_inlineSize; }
- LayoutUnit blockSize() const { return m_blockSize; }
-
- LayoutUnit inlineOffset() const { return m_inlineOffset; }
- LayoutUnit blockOffset() const { return m_blockOffset; }
+ NGText(LayoutUnit inlineSize,
+ LayoutUnit blockSize,
+ LayoutUnit inlineOverflow,
+ LayoutUnit blockOverflow)
+ : NGFragmentBase(inlineSize, blockSize, inlineOverflow, blockOverflow) {
+ m_isText = true;
+ }
const String text() const { return String(); }
- void setOffset(LayoutUnit inlineOffset, LayoutUnit blockOffset);
-
- private:
- LayoutUnit m_inlineSize;
- LayoutUnit m_blockSize;
-
- LayoutUnit m_inlineOffset;
- LayoutUnit m_blockOffset;
+ DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
+ NGFragmentBase::traceAfterDispatch(visitor);
+ }
};
} // namespace blink
« 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