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

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

Issue 2272313004: [layoutng] Rename struct members to match style guide (Closed)
Patch Set: Created 4 years, 3 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 #include "core/layout/ng/ng_fragment_base.h" 5 #include "core/layout/ng/ng_fragment_base.h"
6 #include "core/layout/ng/ng_fragment.h" 6 #include "core/layout/ng/ng_fragment.h"
7 #include "core/layout/ng/ng_text_fragment.h" 7 #include "core/layout/ng/ng_text_fragment.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 NGFragmentBase::NGFragmentBase(NGLogicalSize size, 11 NGFragmentBase::NGFragmentBase(NGLogicalSize size,
12 NGLogicalSize overflow, 12 NGLogicalSize overflow,
13 NGWritingMode writing_mode, 13 NGWritingMode writing_mode,
14 NGDirection direction, 14 NGDirection direction,
15 NGFragmentType type) 15 NGFragmentType type)
16 : size_(size), 16 : size_(size),
17 overflow_(overflow), 17 overflow_(overflow),
18 type_(type), 18 type_(type),
19 writing_mode_(writing_mode), 19 writing_mode_(writing_mode),
20 direction_(direction), 20 direction_(direction),
21 has_been_placed_(false) {} 21 has_been_placed_(false) {}
22 22
23 void NGFragmentBase::SetOffset(LayoutUnit inline_offset, 23 void NGFragmentBase::SetOffset(LayoutUnit inline_offset,
24 LayoutUnit block_offset) { 24 LayoutUnit block_offset) {
25 // setOffset should only be called once. 25 // setOffset should only be called once.
26 DCHECK(!has_been_placed_); 26 DCHECK(!has_been_placed_);
27 offset_.inlineOffset = inline_offset; 27 offset_.inline_offset = inline_offset;
28 offset_.blockOffset = block_offset; 28 offset_.block_offset = block_offset;
29 has_been_placed_ = true; 29 has_been_placed_ = true;
30 } 30 }
31 31
32 DEFINE_TRACE(NGFragmentBase) { 32 DEFINE_TRACE(NGFragmentBase) {
33 if (Type() == FragmentText) 33 if (Type() == FragmentText)
34 static_cast<NGTextFragment*>(this)->traceAfterDispatch(visitor); 34 static_cast<NGTextFragment*>(this)->traceAfterDispatch(visitor);
35 else 35 else
36 static_cast<NGFragment*>(this)->traceAfterDispatch(visitor); 36 static_cast<NGFragment*>(this)->traceAfterDispatch(visitor);
37 } 37 }
38 38
39 } // namespace blink 39 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698