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

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

Issue 2636353002: [LayoutNG] Remove the state machine from ng_out_of_flow_layout_part. (Closed)
Patch Set: .. Created 3 years, 11 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 NGAbsoluteUtils_h 5 #ifndef NGAbsoluteUtils_h
6 #define NGAbsoluteUtils_h 6 #define NGAbsoluteUtils_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 "platform/LayoutUnit.h" 10 #include "platform/LayoutUnit.h"
(...skipping 25 matching lines...) Expand all
36 // upon child's block_size. 36 // upon child's block_size.
37 37
38 // True if ComputePartialAbsoluteWithChildInlineSize will need 38 // True if ComputePartialAbsoluteWithChildInlineSize will need
39 // estimated inline size. 39 // estimated inline size.
40 CORE_EXPORT bool AbsoluteNeedsChildInlineSize(const ComputedStyle&); 40 CORE_EXPORT bool AbsoluteNeedsChildInlineSize(const ComputedStyle&);
41 41
42 // True if ComputeFullAbsoluteWithChildBlockSize will need 42 // True if ComputeFullAbsoluteWithChildBlockSize will need
43 // estimated block size. 43 // estimated block size.
44 CORE_EXPORT bool AbsoluteNeedsChildBlockSize(const ComputedStyle&); 44 CORE_EXPORT bool AbsoluteNeedsChildBlockSize(const ComputedStyle&);
45 45
46 // True if the container will contain an absolute child.
47 CORE_EXPORT bool IsContainerForAbsoluteChild(
cbiesinger 2017/01/18 20:27:00 Why not name this IsContainingBlockForChild?
ikilpatrick 2017/01/18 21:32:19 Done. A better name might also be IsContainingBlo
cbiesinger 2017/01/18 21:42:04 Well, it's used for any block, but point taken --
48 const ComputedStyle& container_style,
49 const ComputedStyle& child_style);
50
46 // Compute part of position that depends on child's inline_size 51 // Compute part of position that depends on child's inline_size
47 // returns partially filled position. 52 // returns partially filled position.
48 CORE_EXPORT NGAbsolutePhysicalPosition 53 CORE_EXPORT NGAbsolutePhysicalPosition
49 ComputePartialAbsoluteWithChildInlineSize( 54 ComputePartialAbsoluteWithChildInlineSize(
50 const NGConstraintSpace& space, 55 const NGConstraintSpace& space,
51 const ComputedStyle& style, 56 const ComputedStyle& style,
52 const NGStaticPosition&, 57 const NGStaticPosition&,
53 const Optional<MinAndMaxContentSizes>& child_minmax); 58 const Optional<MinAndMaxContentSizes>& child_minmax);
54 59
55 // Compute rest of NGPhysicalRect that depends on child's block_size. 60 // Compute rest of NGPhysicalRect that depends on child's block_size.
56 CORE_EXPORT void ComputeFullAbsoluteWithChildBlockSize( 61 CORE_EXPORT void ComputeFullAbsoluteWithChildBlockSize(
57 const NGConstraintSpace& space, 62 const NGConstraintSpace& space,
58 const ComputedStyle& style, 63 const ComputedStyle& style,
59 const NGStaticPosition&, 64 const NGStaticPosition&,
60 const Optional<LayoutUnit>& child_block_size, 65 const Optional<LayoutUnit>& child_block_size,
61 NGAbsolutePhysicalPosition* position); 66 NGAbsolutePhysicalPosition* position);
62 67
63 // TODO(atotic) Absolute coordinates for replaced elements 68 // TODO(atotic) Absolute coordinates for replaced elements
64 // ComputeAbsoluteReplaced. 69 // ComputeAbsoluteReplaced.
65 // https://www.w3.org/TR/css-position-3/#abs-replaced-width 70 // https://www.w3.org/TR/css-position-3/#abs-replaced-width
66 } // namespace blink 71 } // namespace blink
67 72
68 #endif // NGAbsoluteUtils_h 73 #endif // NGAbsoluteUtils_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698