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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc

Issue 2270983002: [layoutng] Add an NGFragmentBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove SwapChildren 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.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc
index f94e94f8bbfb05dfe904f62e81b69a17bfae9d36..7d3c337b908af1e4c78f58b4fbe8150cec000016 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc
@@ -8,33 +8,29 @@
namespace blink {
-NGFragmentBase::NGFragmentBase(LayoutUnit inlineSize,
- LayoutUnit blockSize,
- LayoutUnit inlineOverflow,
- LayoutUnit blockOverflow,
- NGWritingMode writingMode,
+NGFragmentBase::NGFragmentBase(NGLogicalSize size,
+ NGLogicalSize overflow,
+ NGWritingMode writing_mode,
NGDirection direction,
NGFragmentType type)
- : m_inlineSize(inlineSize),
- m_blockSize(blockSize),
- m_inlineOverflow(inlineOverflow),
- m_blockOverflow(blockOverflow),
- m_type(type),
- m_writingMode(writingMode),
- m_direction(direction),
- m_hasBeenPlaced(false) {}
+ : size_(size),
+ overflow_(overflow),
+ type_(type),
+ writing_mode_(writing_mode),
+ direction_(direction),
+ has_been_placed_(false) {}
-void NGFragmentBase::setOffset(LayoutUnit inlineOffset,
- LayoutUnit blockOffset) {
+void NGFragmentBase::SetOffset(LayoutUnit inline_offset,
+ LayoutUnit block_offset) {
// setOffset should only be called once.
- DCHECK(!m_hasBeenPlaced);
- m_inlineOffset = inlineOffset;
- m_blockOffset = blockOffset;
- m_hasBeenPlaced = true;
+ DCHECK(!has_been_placed_);
+ offset_.inlineOffset = inline_offset;
+ offset_.blockOffset = block_offset;
+ has_been_placed_ = true;
}
DEFINE_TRACE(NGFragmentBase) {
- if (type() == FragmentText)
+ if (Type() == FragmentText)
static_cast<NGTextFragment*>(this)->traceAfterDispatch(visitor);
else
static_cast<NGFragment*>(this)->traceAfterDispatch(visitor);

Powered by Google App Engine
This is Rietveld 408576698