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

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

Issue 2651793013: Fix incorrectly calculated size/position information for writing-modes (Closed)
Patch Set: git rebase-update Created 3 years, 10 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 #ifndef NGConstraintSpace_h 5 #ifndef NGConstraintSpace_h
6 #define NGConstraintSpace_h 6 #define NGConstraintSpace_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_units.h" 9 #include "core/layout/ng/ng_units.h"
10 #include "core/layout/ng/ng_writing_mode.h" 10 #include "core/layout/ng/ng_writing_mode.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return BlockFragmentationType() != kFragmentNone; 103 return BlockFragmentationType() != kFragmentNone;
104 } 104 }
105 105
106 // Modifies constraint space to account for a placed fragment. Depending on 106 // Modifies constraint space to account for a placed fragment. Depending on
107 // the shape of the fragment this will either modify the inline or block 107 // the shape of the fragment this will either modify the inline or block
108 // size, or add an exclusion. 108 // size, or add an exclusion.
109 void Subtract(const NGBoxFragment*); 109 void Subtract(const NGBoxFragment*);
110 110
111 NGMarginStrut MarginStrut() const { return margin_strut_; } 111 NGMarginStrut MarginStrut() const { return margin_strut_; }
112 112
113 // TODO(glebl): Rename to Offset() or AbsoluteOffset().
113 NGLogicalOffset BfcOffset() const { return bfc_offset_; } 114 NGLogicalOffset BfcOffset() const { return bfc_offset_; }
114 115
115 DEFINE_INLINE_VIRTUAL_TRACE() {} 116 DEFINE_INLINE_VIRTUAL_TRACE() {}
116 117
117 String ToString() const; 118 String ToString() const;
118 119
119 private: 120 private:
120 friend class NGConstraintSpaceBuilder; 121 friend class NGConstraintSpaceBuilder;
121 // Default constructor. 122 // Default constructor.
122 NGConstraintSpace(NGWritingMode, 123 NGConstraintSpace(NGWritingMode,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 }; 164 };
164 165
165 inline std::ostream& operator<<(std::ostream& stream, 166 inline std::ostream& operator<<(std::ostream& stream,
166 const NGConstraintSpace& value) { 167 const NGConstraintSpace& value) {
167 return stream << value.ToString(); 168 return stream << value.ToString();
168 } 169 }
169 170
170 } // namespace blink 171 } // namespace blink
171 172
172 #endif // NGConstraintSpace_h 173 #endif // NGConstraintSpace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698