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

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

Issue 2569013006: Changed EOverflow to an enum class and renamed its members (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_constraint_space.h" 5 #include "core/layout/ng/ng_constraint_space.h"
6 6
7 #include "core/layout/LayoutBlock.h" 7 #include "core/layout/LayoutBlock.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/layout/ng/ng_constraint_space_builder.h" 9 #include "core/layout/ng/ng_constraint_space_builder.h"
10 #include "core/layout/ng/ng_layout_opportunity_iterator.h" 10 #include "core/layout/ng/ng_layout_opportunity_iterator.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 bool is_new_fc = 67 bool is_new_fc =
68 box.isLayoutBlock() && toLayoutBlock(box).createsNewFormattingContext(); 68 box.isLayoutBlock() && toLayoutBlock(box).createsNewFormattingContext();
69 69
70 NGLogicalSize size = {available_logical_width, available_logical_height}; 70 NGLogicalSize size = {available_logical_width, available_logical_height};
71 auto writing_mode = FromPlatformWritingMode(box.styleRef().getWritingMode()); 71 auto writing_mode = FromPlatformWritingMode(box.styleRef().getWritingMode());
72 return NGConstraintSpaceBuilder(writing_mode) 72 return NGConstraintSpaceBuilder(writing_mode)
73 .SetAvailableSize(size) 73 .SetAvailableSize(size)
74 .SetPercentageResolutionSize(size) 74 .SetPercentageResolutionSize(size)
75 .SetIsInlineDirectionTriggersScrollbar( 75 .SetIsInlineDirectionTriggersScrollbar(
76 box.styleRef().overflowInlineDirection() == OverflowAuto) 76 box.styleRef().overflowInlineDirection() == EOverflow::Auto)
77 .SetIsBlockDirectionTriggersScrollbar( 77 .SetIsBlockDirectionTriggersScrollbar(
78 box.styleRef().overflowBlockDirection() == OverflowAuto) 78 box.styleRef().overflowBlockDirection() == EOverflow::Auto)
79 .SetIsFixedSizeInline(fixed_inline) 79 .SetIsFixedSizeInline(fixed_inline)
80 .SetIsFixedSizeBlock(fixed_block) 80 .SetIsFixedSizeBlock(fixed_block)
81 .SetIsNewFormattingContext(is_new_fc) 81 .SetIsNewFormattingContext(is_new_fc)
82 .SetTextDirection(box.styleRef().direction()) 82 .SetTextDirection(box.styleRef().direction())
83 .ToConstraintSpace(); 83 .ToConstraintSpace();
84 } 84 }
85 85
86 void NGConstraintSpace::AddExclusion(const NGExclusion& exclusion) { 86 void NGConstraintSpace::AddExclusion(const NGExclusion& exclusion) {
87 exclusions_->Add(exclusion); 87 exclusions_->Add(exclusion);
88 } 88 }
(...skipping 23 matching lines...) Expand all
112 112
113 String NGConstraintSpace::ToString() const { 113 String NGConstraintSpace::ToString() const {
114 return String::format("%s,%s %sx%s", 114 return String::format("%s,%s %sx%s",
115 offset_.inline_offset.toString().ascii().data(), 115 offset_.inline_offset.toString().ascii().data(),
116 offset_.block_offset.toString().ascii().data(), 116 offset_.block_offset.toString().ascii().data(),
117 AvailableSize().inline_size.toString().ascii().data(), 117 AvailableSize().inline_size.toString().ascii().data(),
118 AvailableSize().block_size.toString().ascii().data()); 118 AvailableSize().block_size.toString().ascii().data());
119 } 119 }
120 120
121 } // namespace blink 121 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/TextAutosizer.cpp ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698