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

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

Issue 2850893003: Add container_block_offset,top_offset to NGFloatingObject. (Closed)
Patch Set: add-inline-to-block-flow-with-block-children-that-do-not-need-anonymous-boxes.html is still broken Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 NGPositionedFloat_h 5 #ifndef NGPositionedFloat_h
6 #define NGPositionedFloat_h 6 #define NGPositionedFloat_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_physical_fragment.h" 9 #include "core/layout/ng/ng_physical_fragment.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 // Contains the information necessary for copying back data to a FloatingObject. 13 // Contains the information necessary for copying back data to a FloatingObject.
14 struct CORE_EXPORT NGPositionedFloat { 14 struct CORE_EXPORT NGPositionedFloat {
15 NGPositionedFloat(RefPtr<NGPhysicalFragment> fragment, 15 NGPositionedFloat(RefPtr<NGPhysicalFragment> fragment,
16 NGLogicalOffset offset, 16 const NGLogicalOffset& logical_offset,
17 LayoutUnit left_offset) 17 const NGPhysicalOffset& paint_offset)
18 : fragment(fragment), offset(offset), left_offset(left_offset) {} 18 : fragment(fragment),
19 logical_offset(logical_offset),
20 paint_offset(paint_offset) {}
19 21
20 RefPtr<NGPhysicalFragment> fragment; 22 RefPtr<NGPhysicalFragment> fragment;
21 NGLogicalOffset offset; 23 NGLogicalOffset logical_offset;
22 24
23 // In the case where a legacy FloatingObject is attached to not its own 25 // In the case where a legacy FloatingObject is attached to not its own
24 // parent, e.g. a float surrounded by a bunch of nested empty divs, 26 // parent, e.g. a float surrounded by a bunch of nested empty divs,
25 // NG float fragment's LeftOffset() cannot be used as legacy FloatingObject's 27 // NG float fragment's LeftOffset() cannot be used as legacy FloatingObject's
26 // left offset because that offset should be relative to the original float 28 // left offset because that offset should be relative to the original float
27 // parent. 29 // parent.
28 // {@code left_offset} is calculated when we know to which parent this float 30 // {@code paint_offset} is calculated when we know to which parent this float
29 // would be attached. 31 // would be attached.
30 LayoutUnit left_offset; 32 NGPhysicalOffset paint_offset;
31 }; 33 };
32 34
33 } // namespace blink 35 } // namespace blink
34 36
35 #endif // NGPositionedFloat_h 37 #endif // NGPositionedFloat_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698