Index: third_party/WebKit/Source/core/layout/ng/ng_space_utils.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_space_utils.h b/third_party/WebKit/Source/core/layout/ng/ng_space_utils.h |
index 71ec335b28e899b9aa0ad165ab03bbb5075d8dd4..ee5cf74bf50d49b0bd6f593d0b97fbf5a8dee861 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_space_utils.h |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_space_utils.h |
@@ -6,6 +6,7 @@ |
#define NGSpaceUtils_h |
#include "core/CoreExport.h" |
+#include "core/style/ComputedStyleConstants.h" |
#include "platform/LayoutUnit.h" |
#include "platform/wtf/Optional.h" |
@@ -14,6 +15,7 @@ namespace blink { |
class ComputedStyle; |
struct NGExclusions; |
class NGLayoutInputNode; |
+struct NGLogicalOffset; |
// Whether an in-flow child creates a new formatting context. |
// |
@@ -25,11 +27,11 @@ CORE_EXPORT bool IsNewFormattingContextForBlockLevelChild( |
const ComputedStyle& parent_style, |
const NGLayoutInputNode& node); |
-// Gets the clearance offset based on the provided {@code style} and list of |
-// exclusions that represent left/right float. |
+// Gets the clearance offset based on the provided {@code clear_type} and list |
+// of exclusions that represent left/right float. |
CORE_EXPORT WTF::Optional<LayoutUnit> GetClearanceOffset( |
const std::shared_ptr<NGExclusions>& exclusions, |
- const ComputedStyle& style); |
+ EClear clear_type); |
// Whether child's constraint space should shrink to its intrinsic width. |
// This is needed for buttons, select, input, floats and orthogonal children. |
@@ -37,6 +39,11 @@ CORE_EXPORT WTF::Optional<LayoutUnit> GetClearanceOffset( |
bool ShouldShrinkToFit(const ComputedStyle& parent_style, |
const ComputedStyle& style); |
+// Adjusts {@code offset} to the clearance line. |
+CORE_EXPORT void AdjustToClearance( |
+ const WTF::Optional<LayoutUnit>& clearance_offset, |
+ NGLogicalOffset* offset); |
+ |
} // namespace blink |
#endif // NGSpaceUtils_h |