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

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

Issue 2417113002: [LayoutNG] Fix orthogonal writing mode child margin strut from being used in collapsing margins cal… (Closed)
Patch Set: address comments Created 4 years, 2 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 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
(...skipping 23 matching lines...) Expand all
34 return writing_mode_ == HorizontalTopBottom ? physical_fragment_->LeftOffset() 34 return writing_mode_ == HorizontalTopBottom ? physical_fragment_->LeftOffset()
35 : physical_fragment_->TopOffset(); 35 : physical_fragment_->TopOffset();
36 } 36 }
37 37
38 LayoutUnit NGFragmentBase::BlockOffset() const { 38 LayoutUnit NGFragmentBase::BlockOffset() const {
39 return writing_mode_ == HorizontalTopBottom 39 return writing_mode_ == HorizontalTopBottom
40 ? physical_fragment_->TopOffset() 40 ? physical_fragment_->TopOffset()
41 : physical_fragment_->LeftOffset(); 41 : physical_fragment_->LeftOffset();
42 } 42 }
43 43
44 NGMarginStrut NGFragmentBase::MarginStrut() const {
45 // TODO(layout-ng): Change MarginStrut to support writing direction.
46 return physical_fragment_->MarginStrut();
47 }
48
49 DEFINE_TRACE(NGFragmentBase) { 44 DEFINE_TRACE(NGFragmentBase) {
50 visitor->trace(physical_fragment_); 45 visitor->trace(physical_fragment_);
51 } 46 }
52 47
53 } // namespace blink 48 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698