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

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

Issue 2536323003: [LayoutNG] Fix enum values to conform to kEnumName in style guide. (Closed)
Patch Set: rebase. Created 4 years 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 6
7 #include "core/layout/ng/ng_physical_fragment_base.h" 7 #include "core/layout/ng/ng_physical_fragment_base.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 LayoutUnit NGFragmentBase::InlineSize() const { 11 LayoutUnit NGFragmentBase::InlineSize() const {
12 return writing_mode_ == HorizontalTopBottom ? physical_fragment_->Width() 12 return writing_mode_ == kHorizontalTopBottom ? physical_fragment_->Width()
13 : physical_fragment_->Height(); 13 : physical_fragment_->Height();
14 } 14 }
15 15
16 LayoutUnit NGFragmentBase::BlockSize() const { 16 LayoutUnit NGFragmentBase::BlockSize() const {
17 return writing_mode_ == HorizontalTopBottom ? physical_fragment_->Height() 17 return writing_mode_ == kHorizontalTopBottom ? physical_fragment_->Height()
18 : physical_fragment_->Width(); 18 : physical_fragment_->Width();
19 } 19 }
20 20
21 LayoutUnit NGFragmentBase::InlineOverflow() const { 21 LayoutUnit NGFragmentBase::InlineOverflow() const {
22 return writing_mode_ == HorizontalTopBottom 22 return writing_mode_ == kHorizontalTopBottom
23 ? physical_fragment_->WidthOverflow() 23 ? physical_fragment_->WidthOverflow()
24 : physical_fragment_->HeightOverflow(); 24 : physical_fragment_->HeightOverflow();
25 } 25 }
26 26
27 LayoutUnit NGFragmentBase::BlockOverflow() const { 27 LayoutUnit NGFragmentBase::BlockOverflow() const {
28 return writing_mode_ == HorizontalTopBottom 28 return writing_mode_ == kHorizontalTopBottom
29 ? physical_fragment_->HeightOverflow() 29 ? physical_fragment_->HeightOverflow()
30 : physical_fragment_->WidthOverflow(); 30 : physical_fragment_->WidthOverflow();
31 } 31 }
32 32
33 LayoutUnit NGFragmentBase::InlineOffset() const { 33 LayoutUnit NGFragmentBase::InlineOffset() const {
34 return writing_mode_ == HorizontalTopBottom ? physical_fragment_->LeftOffset() 34 return writing_mode_ == kHorizontalTopBottom
35 : physical_fragment_->TopOffset(); 35 ? physical_fragment_->LeftOffset()
36 : physical_fragment_->TopOffset();
36 } 37 }
37 38
38 LayoutUnit NGFragmentBase::BlockOffset() const { 39 LayoutUnit NGFragmentBase::BlockOffset() const {
39 return writing_mode_ == HorizontalTopBottom 40 return writing_mode_ == kHorizontalTopBottom
40 ? physical_fragment_->TopOffset() 41 ? physical_fragment_->TopOffset()
41 : physical_fragment_->LeftOffset(); 42 : physical_fragment_->LeftOffset();
42 } 43 }
43 44
44 NGPhysicalFragmentBase::NGFragmentType NGFragmentBase::Type() const { 45 NGPhysicalFragmentBase::NGFragmentType NGFragmentBase::Type() const {
45 return physical_fragment_->Type(); 46 return physical_fragment_->Type();
46 } 47 }
47 48
48 DEFINE_TRACE(NGFragmentBase) { 49 DEFINE_TRACE(NGFragmentBase) {
49 visitor->trace(physical_fragment_); 50 visitor->trace(physical_fragment_);
50 } 51 }
51 52
52 } // namespace blink 53 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698