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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_length_utils.h

Issue 2721613003: [LayoutNG] Move remaining ng_units structs to their own files (Closed)
Patch Set: Don't export NGBoxStrut for now 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
index 42d59ac840aba7510ee8b3358f73aa7a955c0b9d..a4e731d9258a40f437d776de50357cb04ed44877 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
@@ -6,7 +6,8 @@
#define NGLengthUtils_h
#include "core/CoreExport.h"
-#include "core/layout/ng/ng_units.h"
+#include "core/layout/ng/geometry/ng_box_strut.h"
+#include "core/layout/ng/ng_min_max_content_size.h"
#include "core/layout/ng/ng_writing_mode.h"
#include "platform/text/TextDirection.h"
#include "wtf/Optional.h"
@@ -15,7 +16,7 @@ namespace blink {
class ComputedStyle;
class LayoutUnit;
class Length;
-struct MinAndMaxContentSizes;
+struct MinMaxContentSize;
class NGConstraintSpace;
struct NGBoxStrut;
@@ -29,13 +30,13 @@ enum class LengthResolveType {
// Whether the caller needs to compute min-content and max-content sizes to
// pass them to ResolveInlineLength / ComputeInlineSizeForFragment.
// If this function returns false, it is safe to pass an empty
-// MinAndMaxContentSizes struct to those functions.
-CORE_EXPORT bool NeedMinAndMaxContentSizes(const NGConstraintSpace&,
- const ComputedStyle&);
+// MinMaxContentSize struct to those functions.
+CORE_EXPORT bool NeedMinMaxContentSize(const NGConstraintSpace&,
+ const ComputedStyle&);
-// Like NeedMinAndMaxContentSizes, but for use when calling
+// Like NeedMinMaxContentSize, but for use when calling
// ComputeMinAndMaxContentContribution.
-CORE_EXPORT bool NeedMinAndMaxContentSizesForContentContribution(
+CORE_EXPORT bool NeedMinMaxContentSizeForContentContribution(
const ComputedStyle&);
// Convert an inline-axis length to a layout unit using the given constraint
@@ -43,7 +44,7 @@ CORE_EXPORT bool NeedMinAndMaxContentSizesForContentContribution(
CORE_EXPORT LayoutUnit
ResolveInlineLength(const NGConstraintSpace&,
const ComputedStyle&,
- const WTF::Optional<MinAndMaxContentSizes>&,
+ const WTF::Optional<MinMaxContentSize>&,
const Length&,
LengthResolveType);
@@ -62,9 +63,9 @@ CORE_EXPORT LayoutUnit ResolveBlockLength(const NGConstraintSpace&,
// to zero) and that an auto inline size resolves to the respective min/max
// content size.
// Also, the min/max contribution does include the inline margins as well.
-CORE_EXPORT MinAndMaxContentSizes ComputeMinAndMaxContentContribution(
- const ComputedStyle&,
- const WTF::Optional<MinAndMaxContentSizes>&);
+CORE_EXPORT MinMaxContentSize
+ComputeMinAndMaxContentContribution(const ComputedStyle&,
+ const WTF::Optional<MinMaxContentSize>&);
// Resolves the given length to a layout unit, constraining it by the min
// logical width and max logical width properties from the ComputedStyle
@@ -72,7 +73,7 @@ CORE_EXPORT MinAndMaxContentSizes ComputeMinAndMaxContentContribution(
CORE_EXPORT LayoutUnit
ComputeInlineSizeForFragment(const NGConstraintSpace&,
const ComputedStyle&,
- const WTF::Optional<MinAndMaxContentSizes>&);
+ const WTF::Optional<MinMaxContentSize>&);
// Resolves the given length to a layout unit, constraining it by the min
// logical height and max logical height properties from the ComputedStyle

Powered by Google App Engine
This is Rietveld 408576698