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

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

Issue 2451553005: Add NGLogicalOrigin and NGLogicalLeader parameters to NGLayoutOpportunityIterator. (Closed)
Patch Set: do not redefine default LayoutOpportunities parameters Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 NGUnits_h 5 #ifndef NGUnits_h
6 #define NGUnits_h 6 #define NGUnits_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_direction.h" 9 #include "core/layout/ng/ng_direction.h"
10 #include "core/layout/ng/ng_writing_mode.h" 10 #include "core/layout/ng/ng_writing_mode.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // @param container_size the size of the rect (typically a fragment). 44 // @param container_size the size of the rect (typically a fragment).
45 // @param inner_size the size of the inner rect (typically a child fragment). 45 // @param inner_size the size of the inner rect (typically a child fragment).
46 CORE_EXPORT NGPhysicalOffset 46 CORE_EXPORT NGPhysicalOffset
47 ConvertToPhysical(NGWritingMode mode, 47 ConvertToPhysical(NGWritingMode mode,
48 NGDirection direction, 48 NGDirection direction,
49 NGPhysicalSize container_size, 49 NGPhysicalSize container_size,
50 NGPhysicalSize inner_size) const; 50 NGPhysicalSize inner_size) const;
51 bool operator==(const NGLogicalOffset& other) const; 51 bool operator==(const NGLogicalOffset& other) const;
52 }; 52 };
53 53
54 // Origin (in logical coordinates) for a fragment or inline content.
55 struct NGLogicalOrigin {
56 LayoutUnit inline_offset;
57 LayoutUnit block_offset;
58 };
59
60 // Leader point (in logical coordinates) for a text fragment.
61 struct NGLogicalLeader {
62 LayoutUnit inline_offset;
63 LayoutUnit block_offset;
64 };
65
54 // NGPhysicalOffset is the position of a rect (typically a fragment) relative to 66 // NGPhysicalOffset is the position of a rect (typically a fragment) relative to
55 // its parent rect in the physical coordinate system. 67 // its parent rect in the physical coordinate system.
56 struct NGPhysicalOffset { 68 struct NGPhysicalOffset {
57 NGPhysicalOffset() {} 69 NGPhysicalOffset() {}
58 NGPhysicalOffset(LayoutUnit left, LayoutUnit top) : left(left), top(top) {} 70 NGPhysicalOffset(LayoutUnit left, LayoutUnit top) : left(left), top(top) {}
59 71
60 LayoutUnit left; 72 LayoutUnit left;
61 LayoutUnit top; 73 LayoutUnit top;
62 }; 74 };
63 75
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 199
188 // Struct to represent a simple edge that has start and end. 200 // Struct to represent a simple edge that has start and end.
189 struct NGEdge { 201 struct NGEdge {
190 LayoutUnit start; 202 LayoutUnit start;
191 LayoutUnit end; 203 LayoutUnit end;
192 }; 204 };
193 205
194 } // namespace blink 206 } // namespace blink
195 207
196 #endif // NGUnits_h 208 #endif // NGUnits_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698