Adding helper functions to create and check for Length variants

Instead of Length(123.45, kFixed) -> Length::Fixed(123.45)
Instead of Length(kAuto) -> Length::Auto()
...

I have a plan to make kAuto and kFixed non-blink-globals (by making
their enum an enum class) but that will make code using those
constants more verbose so to reduce the effect, this patch
greatly reduces the use of those constants by wrapping them in helper
functions.

I believe this also makes the code a little bit more readable but
since it is different it will mean learning something new.

The old way still works.

Change-Id: I1e88be433dc5819e62832522ec90e48a8409ebc3
Reviewed-on: https://chromium-review.googlesource.com/c/1460919
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631634}
diff --git a/third_party/blink/renderer/build/scripts/core/css/properties/templates/style_builder_functions.tmpl b/third_party/blink/renderer/build/scripts/core/css/properties/templates/style_builder_functions.tmpl
index 5ff29d8..039ec51 100644
--- a/third_party/blink/renderer/build/scripts/core/css/properties/templates/style_builder_functions.tmpl
+++ b/third_party/blink/renderer/build/scripts/core/css/properties/templates/style_builder_functions.tmpl
@@ -162,7 +162,7 @@
   {# Check for equality in case we can bail out before creating a new NinePieceImage. #}
       {% if modifier_type == 'Outset' %}
   if (style_building_utils::BorderImageLengthMatchesAllSides(current_image.Outset(),
-                                       BorderImageLength(Length(0, kFixed))))
+                                       BorderImageLength(Length::Fixed(0))))
     return;
       {% elif modifier_type == 'Repeat' %}
   if (current_image.HorizontalRule() == kStretchImageRule &&
@@ -172,17 +172,17 @@
   // Masks have a different initial value for slices. Preserve the value of 0
   // for backwards compatibility.
   if (current_image.Fill() == true &&
-      style_building_utils::LengthMatchesAllSides(current_image.ImageSlices(), Length(0, kFixed)))
+      style_building_utils::LengthMatchesAllSides(current_image.ImageSlices(), Length::Fixed(0)))
     return;
       {% elif modifier_type == 'Slice' and not is_mask_box %}
   if (current_image.Fill() == false &&
-      style_building_utils::LengthMatchesAllSides(current_image.ImageSlices(), Length(100, kPercent)))
+      style_building_utils::LengthMatchesAllSides(current_image.ImageSlices(), Length::Percent(100)))
     return;
       {% elif modifier_type == 'Width' and is_mask_box %}
   // Masks have a different initial value for widths. Preserve the value of
   // 'auto' for backwards compatibility.
   if (style_building_utils::BorderImageLengthMatchesAllSides(current_image.BorderSlices(),
-                                       BorderImageLength(Length(kAuto))))
+                                       BorderImageLength(Length::Auto())))
     return;
       {% elif modifier_type == 'Width' and not is_mask_box %}
   if (style_building_utils::BorderImageLengthMatchesAllSides(current_image.BorderSlices(),
@@ -191,18 +191,18 @@
       {% endif %}
   NinePieceImage image(current_image);
       {% if modifier_type == 'Outset' %}
-  image.SetOutset(Length(0, kFixed));
+  image.SetOutset(Length::Fixed(0));
       {% elif modifier_type == 'Repeat' %}
   image.SetHorizontalRule(kStretchImageRule);
   image.SetVerticalRule(kStretchImageRule);
       {% elif modifier_type == 'Slice' and is_mask_box %}
-  image.SetImageSlices(LengthBox({{ (['Length(0, kFixed)']*4) | join(', ') }}));
+  image.SetImageSlices(LengthBox({{ (['Length::Fixed(0)']*4) | join(', ') }}));
   image.SetFill(true);
       {% elif modifier_type == 'Slice' and not is_mask_box %}
-  image.SetImageSlices(LengthBox({{ (['Length(100, kPercent)']*4) | join(', ') }}));
+  image.SetImageSlices(LengthBox({{ (['Length::Percent(100)']*4) | join(', ') }}));
   image.SetFill(false);
       {% elif modifier_type == 'Width' %}
-  image.SetBorderSlices({{ 'Length(kAuto)' if is_mask_box else '1.0' }});
+  image.SetBorderSlices({{ 'Length::Auto()' if is_mask_box else '1.0' }});
       {% endif %}
   state.Style()->{{setter}}(image);
     {% endcall %}
diff --git a/third_party/blink/renderer/build/scripts/core/style/templates/computed_style_initial_values.h.tmpl b/third_party/blink/renderer/build/scripts/core/style/templates/computed_style_initial_values.h.tmpl
index 9de161a..752078d 100644
--- a/third_party/blink/renderer/build/scripts/core/style/templates/computed_style_initial_values.h.tmpl
+++ b/third_party/blink/renderer/build/scripts/core/style/templates/computed_style_initial_values.h.tmpl
@@ -68,15 +68,15 @@
   }
 
   // -webkit-perspective-origin-x
-  static Length InitialPerspectiveOriginX() { return Length(50.0, kPercent); }
+  static Length InitialPerspectiveOriginX() { return Length::Percent(50.0); }
 
   // -webkit-perspective-origin-y
-  static Length InitialPerspectiveOriginY() { return Length(50.0, kPercent); }
+  static Length InitialPerspectiveOriginY() { return Length::Percent(50.0); }
 
   // -webkit-transform-origin-x
-  static Length InitialTransformOriginX() { return Length(50.0, kPercent); }
+  static Length InitialTransformOriginX() { return Length::Percent(50.0); }
   // -webkit-transform-origin-y
-  static Length InitialTransformOriginY() { return Length(50.0, kPercent); }
+  static Length InitialTransformOriginY() { return Length::Percent(50.0); }
   // -webkit-transform-origin-z
   static float InitialTransformOriginZ() { return 0; }
 
diff --git a/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc b/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc
index 8a077911..ee5cb16 100644
--- a/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc
+++ b/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc
@@ -83,8 +83,8 @@
     return Unwrap(
         CSSPositionAxisListInterpolationType::ConvertPositionAxisCSSValue(
             *coordinate));
-  return Unwrap(LengthInterpolationFunctions::MaybeConvertLength(
-      Length(50, kPercent), 1));
+  return Unwrap(
+      LengthInterpolationFunctions::MaybeConvertLength(Length::Percent(50), 1));
 }
 
 std::unique_ptr<InterpolableValue> ConvertCoordinate(
diff --git a/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc
index 02b0d00..c128890 100644
--- a/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc
+++ b/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc
@@ -430,14 +430,14 @@
         return clampTo<double>(ToInterpolableNumber(list.Get(index))->Value(),
                                0);
       case SideType::kAuto:
-        return Length(kAuto);
+        return Length::Auto();
       case SideType::kLength:
         return LengthInterpolationFunctions::CreateLength(
             *list.Get(index), non_interpolable_values[index].get(),
             state.CssToLengthConversionData(), kValueRangeNonNegative);
       default:
         NOTREACHED();
-        return Length(kAuto);
+        return Length::Auto();
     }
   };
   BorderImageLengthBox box(convert_side(kSideTop), convert_side(kSideRight),
diff --git a/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc
index e66554d..8046ee4 100644
--- a/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc
+++ b/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc
@@ -180,10 +180,10 @@
   if (underlying_autos.is_auto)
     return nullptr;
   LengthBox neutral_box(
-      underlying_autos.is_top_auto ? Length(kAuto) : Length(0, kFixed),
-      underlying_autos.is_right_auto ? Length(kAuto) : Length(0, kFixed),
-      underlying_autos.is_bottom_auto ? Length(kAuto) : Length(0, kFixed),
-      underlying_autos.is_left_auto ? Length(kAuto) : Length(0, kFixed));
+      underlying_autos.is_top_auto ? Length::Auto() : Length::Fixed(0),
+      underlying_autos.is_right_auto ? Length::Auto() : Length::Fixed(0),
+      underlying_autos.is_bottom_auto ? Length::Auto() : Length::Fixed(0),
+      underlying_autos.is_left_auto ? Length::Auto() : Length::Fixed(0));
   return CreateClipValue(neutral_box, 1);
 }
 
@@ -287,7 +287,7 @@
   const InterpolableList& list = ToInterpolableList(interpolable_value);
   const auto& convert_index = [&list, &state](bool is_auto, wtf_size_t index) {
     if (is_auto)
-      return Length(kAuto);
+      return Length::Auto();
     return LengthInterpolationFunctions::CreateLength(
         *list.Get(index), nullptr, state.CssToLengthConversionData(),
         kValueRangeAll);
diff --git a/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc
index ac3b543..bcddce8 100644
--- a/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc
+++ b/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc
@@ -162,10 +162,14 @@
   conversion_checkers.push_back(
       UnderlyingSliceTypesChecker::Create(underlying_types));
   LengthBox zero_box(
-      Length(0, underlying_types.is_number[kSideTop] ? kFixed : kPercent),
-      Length(0, underlying_types.is_number[kSideRight] ? kFixed : kPercent),
-      Length(0, underlying_types.is_number[kSideBottom] ? kFixed : kPercent),
-      Length(0, underlying_types.is_number[kSideLeft] ? kFixed : kPercent));
+      underlying_types.is_number[kSideTop] ? Length::Fixed(0)
+                                           : Length::Percent(0),
+      underlying_types.is_number[kSideRight] ? Length::Fixed(0)
+                                             : Length::Percent(0),
+      underlying_types.is_number[kSideBottom] ? Length::Fixed(0)
+                                              : Length::Percent(0),
+      underlying_types.is_number[kSideLeft] ? Length::Fixed(0)
+                                            : Length::Percent(0));
   return ConvertImageSlice(ImageSlice(zero_box, underlying_types.fill), 1);
 }
 
@@ -272,9 +276,8 @@
   const auto& convert_side = [&types, &list, &style](wtf_size_t index) {
     float value =
         clampTo<float>(ToInterpolableNumber(list.Get(index))->Value(), 0);
-    return types.is_number[index]
-               ? Length(value * style.EffectiveZoom(), kFixed)
-               : Length(value, kPercent);
+    return types.is_number[index] ? Length::Fixed(value * style.EffectiveZoom())
+                                  : Length::Percent(value);
   };
   LengthBox box(convert_side(kSideTop), convert_side(kSideRight),
                 convert_side(kSideBottom), convert_side(kSideLeft));
diff --git a/third_party/blink/renderer/core/animation/css_text_indent_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_text_indent_interpolation_type.cc
index 2699091..f94809b 100644
--- a/third_party/blink/renderer/core/animation/css_text_indent_interpolation_type.cc
+++ b/third_party/blink/renderer/core/animation/css_text_indent_interpolation_type.cc
@@ -137,7 +137,7 @@
       ToCSSTextIndentNonInterpolableValue(*underlying.non_interpolable_value)
           .Mode();
   conversion_checkers.push_back(UnderlyingIndentModeChecker::Create(mode));
-  return CreateValue(Length(0, kFixed), mode, 1);
+  return CreateValue(Length::Fixed(0), mode, 1);
 }
 
 InterpolationValue CSSTextIndentInterpolationType::MaybeConvertInitial(
diff --git a/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc
index fb731e6..69a4e5e 100644
--- a/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc
+++ b/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc
@@ -90,7 +90,7 @@
                                translate->Y(), zoom)
                                .interpolable_value);
   result->Set(kTranslateZ, LengthInterpolationFunctions::MaybeConvertLength(
-                               Length(translate->Z(), kFixed), zoom)
+                               Length::Fixed(translate->Z()), zoom)
                                .interpolable_value);
   return InterpolationValue(std::move(result));
 }
diff --git a/third_party/blink/renderer/core/animation/length_interpolation_functions.cc b/third_party/blink/renderer/core/animation/length_interpolation_functions.cc
index cbf455a..bdf01ce 100644
--- a/third_party/blink/renderer/core/animation/length_interpolation_functions.cc
+++ b/third_party/blink/renderer/core/animation/length_interpolation_functions.cc
@@ -196,10 +196,9 @@
         range));
   }
   if (has_percentage)
-    return Length(ClampToRange(percentage, range), kPercent);
-  return Length(
-      CSSPrimitiveValue::ClampToCSSLengthRange(ClampToRange(pixels, range)),
-      kFixed);
+    return Length::Percent(ClampToRange(percentage, range));
+  return Length::Fixed(
+      CSSPrimitiveValue::ClampToCSSLengthRange(ClampToRange(pixels, range)));
 }
 
 const CSSValue* LengthInterpolationFunctions::CreateCSSValue(
diff --git a/third_party/blink/renderer/core/animation/length_list_property_functions.cc b/third_party/blink/renderer/core/animation/length_list_property_functions.cc
index 10b57c6..c5a2cc7 100644
--- a/third_party/blink/renderer/core/animation/length_list_property_functions.cc
+++ b/third_party/blink/renderer/core/animation/length_list_property_functions.cc
@@ -123,7 +123,7 @@
                            Vector<Length>& result) {
   result.push_back(transform_origin.X());
   result.push_back(transform_origin.Y());
-  result.push_back(Length(transform_origin.Z(), kFixed));
+  result.push_back(Length::Fixed(transform_origin.Z()));
   return true;
 }
 
diff --git a/third_party/blink/renderer/core/animation/length_property_functions.cc b/third_party/blink/renderer/core/animation/length_property_functions.cc
index d0ea0f2..c11eb097 100644
--- a/third_party/blink/renderer/core/animation/length_property_functions.cc
+++ b/third_party/blink/renderer/core/animation/length_property_functions.cc
@@ -106,15 +106,14 @@
     case CSSPropertyBorderLeftWidth:
     case CSSPropertyBorderRightWidth:
     case CSSPropertyBorderTopWidth:
-      result = Length(ComputedStyleInitialValues::InitialBorderWidth(), kFixed);
+      result = Length::Fixed(ComputedStyleInitialValues::InitialBorderWidth());
       return true;
     case CSSPropertyOutlineWidth:
-      result =
-          Length(ComputedStyleInitialValues::InitialOutlineWidth(), kFixed);
+      result = Length::Fixed(ComputedStyleInitialValues::InitialOutlineWidth());
       return true;
     case CSSPropertyColumnRuleWidth:
       result =
-          Length(ComputedStyleInitialValues::InitialColumnRuleWidth(), kFixed);
+          Length::Fixed(ComputedStyleInitialValues::InitialColumnRuleWidth());
       return true;
 
     default:
@@ -230,31 +229,31 @@
       return true;
 
     case CSSPropertyBorderBottomWidth:
-      result = Length(style.BorderBottomWidth(), kFixed);
+      result = Length::Fixed(style.BorderBottomWidth());
       return true;
     case CSSPropertyBorderLeftWidth:
-      result = Length(style.BorderLeftWidth(), kFixed);
+      result = Length::Fixed(style.BorderLeftWidth());
       return true;
     case CSSPropertyBorderRightWidth:
-      result = Length(style.BorderRightWidth(), kFixed);
+      result = Length::Fixed(style.BorderRightWidth());
       return true;
     case CSSPropertyBorderTopWidth:
-      result = Length(style.BorderTopWidth(), kFixed);
+      result = Length::Fixed(style.BorderTopWidth());
       return true;
     case CSSPropertyLetterSpacing:
-      result = Length(style.LetterSpacing(), kFixed);
+      result = Length::Fixed(style.LetterSpacing());
       return true;
     case CSSPropertyOutlineOffset:
-      result = Length(style.OutlineOffset(), kFixed);
+      result = Length::Fixed(style.OutlineOffset());
       return true;
     case CSSPropertyOutlineWidth:
-      result = Length(style.OutlineWidth(), kFixed);
+      result = Length::Fixed(style.OutlineWidth());
       return true;
     case CSSPropertyWebkitBorderHorizontalSpacing:
-      result = Length(style.HorizontalBorderSpacing(), kFixed);
+      result = Length::Fixed(style.HorizontalBorderSpacing());
       return true;
     case CSSPropertyWebkitBorderVerticalSpacing:
-      result = Length(style.VerticalBorderSpacing(), kFixed);
+      result = Length::Fixed(style.VerticalBorderSpacing());
       return true;
     case CSSPropertyRowGap:
       if (style.RowGap().IsNormal())
@@ -267,13 +266,13 @@
       result = style.ColumnGap().GetLength();
       return true;
     case CSSPropertyColumnRuleWidth:
-      result = Length(style.ColumnRuleWidth(), kFixed);
+      result = Length::Fixed(style.ColumnRuleWidth());
       return true;
     case CSSPropertyWebkitTransformOriginZ:
-      result = Length(style.TransformOriginZ(), kFixed);
+      result = Length::Fixed(style.TransformOriginZ());
       return true;
     case CSSPropertyWordSpacing:
-      result = Length(style.WordSpacing(), kFixed);
+      result = Length::Fixed(style.WordSpacing());
       return true;
 
     case CSSPropertyBaselineShift:
@@ -290,7 +289,7 @@
     case CSSPropertyPerspective:
       if (!style.HasPerspective())
         return false;
-      result = Length(style.Perspective(), kFixed);
+      result = Length::Fixed(style.Perspective());
       return true;
     case CSSPropertyStrokeWidth:
       DCHECK(!IsZoomedLength(CSSProperty::Get(CSSPropertyStrokeWidth)));
@@ -304,7 +303,7 @@
     case CSSPropertyColumnWidth:
       if (style.HasAutoColumnWidth())
         return false;
-      result = Length(style.ColumnWidth(), kFixed);
+      result = Length::Fixed(style.ColumnWidth());
       return true;
     default:
       return false;
diff --git a/third_party/blink/renderer/core/animation/number_property_functions.cc b/third_party/blink/renderer/core/animation/number_property_functions.cc
index 77bac29f..fd3845d 100644
--- a/third_party/blink/renderer/core/animation/number_property_functions.cc
+++ b/third_party/blink/renderer/core/animation/number_property_functions.cc
@@ -140,7 +140,7 @@
       style.SetFloodOpacity(value);
       return true;
     case CSSPropertyLineHeight:
-      style.SetLineHeight(Length(value * 100, kPercent));
+      style.SetLineHeight(Length::Percent(value * 100));
       return true;
     case CSSPropertyOpacity:
       style.SetOpacity(value);
diff --git a/third_party/blink/renderer/core/animation/size_interpolation_functions.cc b/third_party/blink/renderer/core/animation/size_interpolation_functions.cc
index a7032b228..6488247 100644
--- a/third_party/blink/renderer/core/animation/size_interpolation_functions.cc
+++ b/third_party/blink/renderer/core/animation/size_interpolation_functions.cc
@@ -180,7 +180,7 @@
     const CSSToLengthConversionData& conversion_data) {
   if (non_interpolable_value.IsKeyword()) {
     DCHECK_EQ(non_interpolable_value.Keyword(), CSSValueAuto);
-    return Length(kAuto);
+    return Length::Auto();
   }
   return LengthInterpolationFunctions::CreateLength(
       interpolable_value, non_interpolable_value.LengthNonInterpolableValue(),
diff --git a/third_party/blink/renderer/core/css/basic_shape_functions.cc b/third_party/blink/renderer/core/css/basic_shape_functions.cc
index f27bc7ff..78bd7d9a 100644
--- a/third_party/blink/renderer/core/css/basic_shape_functions.cc
+++ b/third_party/blink/renderer/core/css/basic_shape_functions.cc
@@ -206,14 +206,14 @@
 static Length ConvertToLength(const StyleResolverState& state,
                               const CSSPrimitiveValue* value) {
   if (!value)
-    return Length(0, kFixed);
+    return Length::Fixed(0);
   return value->ConvertToLength(state.CssToLengthConversionData());
 }
 
 static LengthSize ConvertToLengthSize(const StyleResolverState& state,
                                       const CSSValuePair* value) {
   if (!value)
-    return LengthSize(Length(0, kFixed), Length(0, kFixed));
+    return LengthSize(Length::Fixed(0), Length::Fixed(0));
 
   return LengthSize(
       ConvertToLength(state, &ToCSSPrimitiveValue(value->First())),
@@ -224,7 +224,7 @@
     const StyleResolverState& state,
     CSSValue* value) {
   BasicShapeCenterCoordinate::Direction direction;
-  Length offset = Length(0, kFixed);
+  Length offset = Length::Fixed(0);
 
   CSSValueID keyword = CSSValueTop;
   if (!value) {
@@ -250,7 +250,7 @@
       break;
     case CSSValueCenter:
       direction = BasicShapeCenterCoordinate::kTopLeft;
-      offset = Length(50, kPercent);
+      offset = Length::Percent(50);
       break;
     default:
       NOTREACHED();
diff --git a/third_party/blink/renderer/core/css/css_primitive_value.cc b/third_party/blink/renderer/core/css/css_primitive_value.cc
index 11e9d16..fa435f0 100644
--- a/third_party/blink/renderer/core/css/css_primitive_value.cc
+++ b/third_party/blink/renderer/core/css/css_primitive_value.cc
@@ -282,8 +282,8 @@
 template <>
 Length CSSPrimitiveValue::ComputeLength(
     const CSSToLengthConversionData& conversion_data) const {
-  return Length(ClampToCSSLengthRange(ComputeLengthDouble(conversion_data)),
-                kFixed);
+  return Length::Fixed(
+      ClampToCSSLengthRange(ComputeLengthDouble(conversion_data)));
 }
 
 template <>
@@ -406,7 +406,7 @@
   if (IsLength())
     return ComputeLength<Length>(conversion_data);
   if (IsPercentage())
-    return Length(GetDoubleValue(), kPercent);
+    return Length::Percent(GetDoubleValue());
   DCHECK(IsCalculated());
   return Length(CssCalcValue()->ToCalcValue(conversion_data));
 }
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index 316e06a..6ffc1ab 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -1026,7 +1026,7 @@
       field_group: "surround",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_size.h"],
-      default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
+      default_value: "LengthSize(Length::Fixed(0), Length::Fixed(0))",
       type_name: "LengthSize",
       converter: "ConvertRadius",
       typedom_types: ["Length", "Percentage"],
@@ -1038,7 +1038,7 @@
       field_group: "surround",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_size.h"],
-      default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
+      default_value: "LengthSize(Length::Fixed(0), Length::Fixed(0))",
       type_name: "LengthSize",
       converter: "ConvertRadius",
       typedom_types: ["Length", "Percentage"],
@@ -1238,7 +1238,7 @@
       field_group: "surround",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_size.h"],
-      default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
+      default_value: "LengthSize(Length::Fixed(0), Length::Fixed(0))",
       type_name: "LengthSize",
       converter: "ConvertRadius",
       typedom_types: ["Length", "Percentage"],
@@ -1250,7 +1250,7 @@
       field_group: "surround",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_size.h"],
-      default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
+      default_value: "LengthSize(Length::Fixed(0), Length::Fixed(0))",
       type_name: "LengthSize",
       converter: "ConvertRadius",
       typedom_types: ["Length", "Percentage"],
@@ -1639,7 +1639,7 @@
       interpolable: true,
       field_group: "*",
       field_template: "<length>",
-      default_value: "Length(kAuto)",
+      default_value: "Length::Auto()",
       converter: "ConvertLengthOrAuto",
       typedom_types: ["Keyword", "Length", "Percentage"],
       keywords: ["auto"]
@@ -1716,7 +1716,7 @@
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/wtf/vector.h",
                       "third_party/blink/renderer/core/style/grid_track_size.h"],
-      default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length(kAuto)))",
+      default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length::Auto()))",
       type_name: "Vector<GridTrackSize>",
       converter: "ConvertGridTrackSizeList",
       keywords: ["auto", "min-content", "max-content"],
@@ -1743,7 +1743,7 @@
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/wtf/vector.h",
                       "third_party/blink/renderer/core/style/grid_track_size.h"],
-      default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length(kAuto)))",
+      default_value: "Vector<GridTrackSize>(1, GridTrackSize(Length::Auto()))",
       type_name: "Vector<GridTrackSize>",
       converter: "ConvertGridTrackSizeList",
       keywords: ["auto", "min-content", "max-content"],
@@ -1964,7 +1964,7 @@
       inherited: true,
       field_group: "inherited",
       field_template: "<length>",
-      default_value: "Length(-100.0, kPercent)",
+      default_value: "Length::Percent(-100.0)",
       getter: "SpecifiedLineHeight",
       computed_style_custom_functions: ["getter"],
       converter: "ConvertLineHeight",
@@ -2038,7 +2038,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertQuirkyLength",
       keywords: ["auto"],
       typedom_types: ["Keyword", "Length", "Percentage"]
@@ -2050,7 +2050,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertQuirkyLength",
       keywords: ["auto"],
       typedom_types: ["Keyword", "Length", "Percentage"]
@@ -2062,7 +2062,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertQuirkyLength",
       keywords: ["auto"],
       typedom_types: ["Keyword", "Length", "Percentage"]
@@ -2074,7 +2074,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertQuirkyLength",
       keywords: ["auto"],
       typedom_types: ["Keyword", "Length", "Percentage"]
@@ -2139,7 +2139,7 @@
       interpolable: true,
       field_group: "box",
       field_template: "<length>",
-      default_value: "Length(kMaxSizeNone)",
+      default_value: "Length::MaxSizeNone()",
       converter: "ConvertLengthMaxSizing",
       keywords: ["none"],
       typedom_types: ["Keyword", "Length", "Percentage"]
@@ -2151,7 +2151,7 @@
       interpolable: true,
       field_group: "box",
       field_template: "<length>",
-      default_value: "Length(kMaxSizeNone)",
+      default_value: "Length::MaxSizeNone()",
       converter: "ConvertLengthMaxSizing",
       keywords: ["none"],
       typedom_types: ["Keyword", "Length", "Percentage"]
@@ -2211,7 +2211,7 @@
       field_group: "*",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_point.h"],
-      default_value: "LengthPoint(Length(50.0, kPercent), Length(50.0, kPercent))",
+      default_value: "LengthPoint(Length::Percent(50.0), Length::Percent(50.0))",
       type_name: "LengthPoint",
       converter: "ConvertPosition",
       typedom_types: ["Keyword", "Position"],
@@ -2224,7 +2224,7 @@
       field_group: "*",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_point.h"],
-      default_value: "LengthPoint(Length(kAuto), Length(kAuto))",
+      default_value: "LengthPoint(Length::Auto(), Length::Auto())",
       type_name: "LengthPoint",
       converter: "ConvertPositionOrAuto",
       keywords: ["auto"],
@@ -2236,7 +2236,7 @@
       interpolable: true,
       field_group: "*",
       field_template: "<length>",
-      default_value: "Length(0, kFixed)",
+      default_value: "Length::Fixed(0)",
       converter: "ConvertLength",
       typedom_types: ["Length", "Percentage"]
     },
@@ -2262,7 +2262,7 @@
       field_group: "*",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_point.h"],
-      default_value: "LengthPoint(Length(kAuto), Length(kAuto))",
+      default_value: "LengthPoint(Length::Auto(), Length::Auto())",
       type_name: "LengthPoint",
       converter: "ConvertPositionOrAuto",
       keywords: ["auto"],
@@ -2442,7 +2442,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertLength",
       typedom_types: ["Keyword", "Length", "Percentage"]
     },
@@ -2453,7 +2453,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertLength",
       typedom_types: ["Keyword", "Length", "Percentage"]
     },
@@ -2464,7 +2464,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertLength",
       typedom_types: ["Keyword", "Length", "Percentage"]
     },
@@ -2475,7 +2475,7 @@
       layout_dependent: true,
       field_group: "surround",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       converter: "ConvertLength",
       typedom_types: ["Keyword", "Length", "Percentage"]
     },
@@ -2508,7 +2508,7 @@
       field_group: "*",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/platform/geometry/length_point.h"],
-      default_value: "LengthPoint(Length(50.0, kPercent), Length(50.0, kPercent))",
+      default_value: "LengthPoint(Length::Percent(50.0), Length::Percent(50.0))",
       type_name: "LengthPoint",
       converter: "ConvertPosition",
       typedom_types: ["Position"]
@@ -2834,7 +2834,7 @@
       interpolable: true,
       field_group: "*",
       field_template: "<length>",
-      default_value: "Length(0, kFixed)",
+      default_value: "Length::Fixed(0)",
       converter: "ConvertLength",
       keywords: ["none"],
       typedom_types: ["Length", "Percentage"]
@@ -3100,7 +3100,7 @@
       inherited: true,
       field_group: "*",
       field_template: "<length>",
-      default_value: "Length(kFixed)",
+      default_value: "Length::Fixed()",
       style_builder_custom_functions: ["initial", "inherit", "value"],
       typedom_types: ["Length", "Percentage"]
     },
@@ -3237,7 +3237,7 @@
       field_group: "*",
       field_template: "external",
       include_paths: ["third_party/blink/renderer/core/style/transform_origin.h"],
-      default_value: "TransformOrigin(Length(50.0, kPercent), Length(50.0, kPercent), 0)",
+      default_value: "TransformOrigin(Length::Percent(50.0), Length::Percent(50.0), 0)",
       getter: "GetTransformOrigin",
       type_name: "TransformOrigin",
       converter: "ConvertTransformOrigin",
diff --git a/third_party/blink/renderer/core/css/properties/longhands/baseline_shift_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/baseline_shift_custom.cc
index a16199c..1cedbe1 100644
--- a/third_party/blink/renderer/core/css/properties/longhands/baseline_shift_custom.cc
+++ b/third_party/blink/renderer/core/css/properties/longhands/baseline_shift_custom.cc
@@ -64,7 +64,7 @@
   switch (ToCSSIdentifierValue(value).GetValueID()) {
     case CSSValueBaseline:
       svg_style.SetBaselineShift(BS_LENGTH);
-      svg_style.SetBaselineShiftValue(Length(kFixed));
+      svg_style.SetBaselineShiftValue(Length::Fixed());
       return;
     case CSSValueSub:
       svg_style.SetBaselineShift(BS_SUB);
diff --git a/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc b/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc
index 944103d..38966d6e 100644
--- a/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc
+++ b/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc
@@ -568,8 +568,8 @@
 
 static Length ConvertBorderImageSliceSide(const CSSPrimitiveValue& value) {
   if (value.IsPercentage())
-    return Length(value.GetDoubleValue(), kPercent);
-  return Length(round(value.GetDoubleValue()), kFixed);
+    return Length::Percent(value.GetDoubleValue());
+  return Length::Fixed(round(value.GetDoubleValue()));
 }
 
 void CSSToStyleMap::MapNinePieceImageSlice(StyleResolverState&,
@@ -611,7 +611,7 @@
     StyleResolverState& state,
     const CSSValue& value) {
   if (!value.IsQuadValue())
-    return BorderImageLengthBox(Length(kAuto));
+    return BorderImageLengthBox(Length::Auto());
 
   const CSSQuadValue& slices = ToCSSQuadValue(value);
   // Set up a border image length box to represent our image slices.
diff --git a/third_party/blink/renderer/core/css/resolver/filter_operation_resolver.cc b/third_party/blink/renderer/core/css/resolver/filter_operation_resolver.cc
index 8b147e0..82077dc 100644
--- a/third_party/blink/renderer/core/css/resolver/filter_operation_resolver.cc
+++ b/third_party/blink/renderer/core/css/resolver/filter_operation_resolver.cc
@@ -212,7 +212,7 @@
         break;
       }
       case CSSValueBlur: {
-        Length std_deviation = Length(0, kFixed);
+        Length std_deviation = Length::Fixed(0);
         if (filter_value->length() >= 1) {
           std_deviation = first_value->ConvertToLength(conversion_data);
         }
@@ -296,7 +296,7 @@
         break;
       }
       case CSSValueBlur: {
-        Length std_deviation = Length(0, kFixed);
+        Length std_deviation = Length::Fixed(0);
         if (filter_value->length() >= 1) {
           std_deviation = first_value->ConvertToLength(conversion_data);
         }
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
index 90a2408..0f3d3358 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -69,11 +69,11 @@
 
   if (value.IsIdentifierValue() &&
       ToCSSIdentifierValue(value).GetValueID() == CSSValueMinContent)
-    return Length(kMinContent);
+    return Length::MinContent();
 
   if (value.IsIdentifierValue() &&
       ToCSSIdentifierValue(value).GetValueID() == CSSValueMaxContent)
-    return Length(kMaxContent);
+    return Length::MaxContent();
 
   return StyleBuilderConverter::ConvertLengthOrAuto(state, value);
 }
@@ -1005,7 +1005,7 @@
     const CSSValue& value) {
   if (value.IsIdentifierValue() &&
       ToCSSIdentifierValue(value).GetValueID() == CSSValueAuto)
-    return Length(kAuto);
+    return Length::Auto();
   return ToCSSPrimitiveValue(value).ConvertToLength(
       state.CssToLengthConversionData());
 }
@@ -1019,17 +1019,17 @@
   switch (identifier_value.GetValueID()) {
     case CSSValueMinContent:
     case CSSValueWebkitMinContent:
-      return Length(kMinContent);
+      return Length::MinContent();
     case CSSValueMaxContent:
     case CSSValueWebkitMaxContent:
-      return Length(kMaxContent);
+      return Length::MaxContent();
     case CSSValueWebkitFillAvailable:
-      return Length(kFillAvailable);
+      return Length::FillAvailable();
     case CSSValueWebkitFitContent:
     case CSSValueFitContent:
-      return Length(kFitContent);
+      return Length::FitContent();
     case CSSValueAuto:
-      return Length(kAuto);
+      return Length::Auto();
     default:
       NOTREACHED();
       return Length();
@@ -1040,7 +1040,7 @@
                                                      const CSSValue& value) {
   if (value.IsIdentifierValue() &&
       ToCSSIdentifierValue(value).GetValueID() == CSSValueNone)
-    return Length(kMaxSizeNone);
+    return Length::MaxSizeNone();
   return ConvertLengthSizing(state, value);
 }
 
@@ -1071,22 +1071,19 @@
           LineHeightToLengthConversionData(state));
     }
     if (primitive_value.IsPercentage()) {
-      return Length(
+      return Length::Fixed(
           (state.Style()->ComputedFontSize() * primitive_value.GetIntValue()) /
-              100.0,
-          kFixed);
+          100.0);
     }
     if (primitive_value.IsNumber()) {
-      return Length(clampTo<float>(primitive_value.GetDoubleValue() * 100.0),
-                    kPercent);
+      return Length::Percent(
+          clampTo<float>(primitive_value.GetDoubleValue() * 100.0));
     }
     if (primitive_value.IsCalculated()) {
       Length zoomed_length = Length(primitive_value.CssCalcValue()->ToCalcValue(
           LineHeightToLengthConversionData(state)));
-      return Length(
-          ValueForLength(zoomed_length,
-                         LayoutUnit(state.Style()->ComputedFontSize())),
-          kFixed);
+      return Length::Fixed(ValueForLength(
+          zoomed_length, LayoutUnit(state.Style()->ComputedFontSize())));
     }
   }
 
@@ -1153,7 +1150,7 @@
   if (value.IsValuePair())
     return ConvertPosition(state, value);
   DCHECK(ToCSSIdentifierValue(value).GetValueID() == CSSValueAuto);
-  return LengthPoint(Length(kAuto), Length(kAuto));
+  return LengthPoint(Length::Auto(), Length::Auto());
 }
 
 static float ConvertPerspectiveLength(
@@ -1550,7 +1547,7 @@
   const CSSValueList& list = ToCSSValueList(value);
   DCHECK_LE(list.length(), 3u);
   Length tx = ConvertLength(state, list.Item(0));
-  Length ty(0, kFixed);
+  Length ty = Length::Fixed(0);
   double tz = 0;
   if (list.length() >= 2)
     ty = ConvertLength(state, list.Item(1));
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
index 933d95e..bbfbfaf 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
@@ -328,11 +328,11 @@
   if (value.IsIdentifierValue()) {
     switch (ToCSSIdentifierValue(value).GetValueID()) {
       case cssValueFor0:
-        return Length(0, kPercent);
+        return Length::Percent(0);
       case cssValueFor100:
-        return Length(100, kPercent);
+        return Length::Percent(100);
       case CSSValueCenter:
-        return Length(50, kPercent);
+        return Length::Percent(50);
       default:
         NOTREACHED();
     }
diff --git a/third_party/blink/renderer/core/css/resolver/transform_builder.cc b/third_party/blink/renderer/core/css/resolver/transform_builder.cc
index d081b6b6..e338e971 100644
--- a/third_party/blink/renderer/core/css/resolver/transform_builder.cc
+++ b/third_party/blink/renderer/core/css/resolver/transform_builder.cc
@@ -188,8 +188,8 @@
       case TransformOperation::kTranslate:
       case TransformOperation::kTranslateX:
       case TransformOperation::kTranslateY: {
-        Length tx = Length(0, kFixed);
-        Length ty = Length(0, kFixed);
+        Length tx = Length::Fixed(0);
+        Length ty = Length::Fixed(0);
         if (transform_type == TransformOperation::kTranslateY)
           ty = ConvertToFloatLength(first_value, conversion_data);
         else {
@@ -209,8 +209,8 @@
       }
       case TransformOperation::kTranslateZ:
       case TransformOperation::kTranslate3D: {
-        Length tx = Length(0, kFixed);
-        Length ty = Length(0, kFixed);
+        Length tx = Length::Fixed(0);
+        Length ty = Length::Fixed(0);
         double tz = 0;
         if (transform_type == TransformOperation::kTranslateZ) {
           tz = first_value.ComputeLength<double>(conversion_data);
diff --git a/third_party/blink/renderer/core/css/resolver/viewport_style_resolver.cc b/third_party/blink/renderer/core/css/resolver/viewport_style_resolver.cc
index c4cb3ec..058dfd6d 100644
--- a/third_party/blink/renderer/core/css/resolver/viewport_style_resolver.cc
+++ b/third_party/blink/renderer/core/css/resolver/viewport_style_resolver.cc
@@ -296,9 +296,9 @@
   if (value->IsIdentifierValue()) {
     CSSValueID value_id = ToCSSIdentifierValue(value)->GetValueID();
     if (value_id == CSSValueInternalExtendToZoom)
-      return Length(kExtendToZoom);
+      return Length::ExtendToZoom();
     if (value_id == CSSValueAuto)
-      return Length(kAuto);
+      return Length::Auto();
   }
 
   const CSSPrimitiveValue* primitive_value = ToCSSPrimitiveValue(value);
diff --git a/third_party/blink/renderer/core/css/threaded/filter_operation_resolver_threaded_test.cc b/third_party/blink/renderer/core/css/threaded/filter_operation_resolver_threaded_test.cc
index fbe080b..a4942a8 100644
--- a/third_party/blink/renderer/core/css/threaded/filter_operation_resolver_threaded_test.cc
+++ b/third_party/blink/renderer/core/css/threaded/filter_operation_resolver_threaded_test.cc
@@ -60,8 +60,7 @@
     FilterOperations fo =
         FilterOperationResolver::CreateOffscreenFilterOperations(*value, font);
     ASSERT_EQ(fo.size(), 1ul);
-    EXPECT_EQ(*fo.at(0),
-              *BlurFilterOperation::Create(Length(10, LengthType::kFixed)));
+    EXPECT_EQ(*fo.at(0), *BlurFilterOperation::Create(Length::Fixed(10)));
   });
 }
 
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc
index 611b344..537a049 100644
--- a/third_party/blink/renderer/core/exported/web_frame_test.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -1307,8 +1307,8 @@
       document->GetViewportData().GetViewportDescription();
   // Choose a width that's not going match the viewport width of the loaded
   // document.
-  description.min_width = Length(100, blink::kFixed);
-  description.max_width = Length(100, blink::kFixed);
+  description.min_width = Length::Fixed(100);
+  description.max_width = Length::Fixed(100);
   web_view_helper.GetWebView()->UpdatePageDefinedViewportConstraints(
       description);
 
@@ -2383,8 +2383,8 @@
           ->GetDocument()
           ->GetViewportData();
   ViewportDescription description = viewport.GetViewportDescription();
-  description.min_width = Length(321, blink::kFixed);
-  description.max_width = Length(321, blink::kFixed);
+  description.min_width = Length::Fixed(321);
+  description.max_width = Length::Fixed(321);
   viewport.SetViewportDescription(description);
   UpdateAllLifecyclePhases(web_view_helper.GetWebView());
   EXPECT_EQ(321, web_view_helper.GetWebView()
@@ -2393,8 +2393,8 @@
                      ->GetLayoutSize()
                      .Width());
 
-  description.min_width = Length(320, blink::kFixed);
-  description.max_width = Length(320, blink::kFixed);
+  description.min_width = Length::Fixed(320);
+  description.max_width = Length::Fixed(320);
   viewport.SetViewportDescription(description);
   UpdateAllLifecyclePhases(web_view_helper.GetWebView());
   EXPECT_EQ(600, web_view_helper.GetWebView()
@@ -2404,7 +2404,7 @@
                      .Width());
 
   description = viewport.GetViewportDescription();
-  description.max_height = Length(1000, blink::kFixed);
+  description.max_height = Length::Fixed(1000);
   viewport.SetViewportDescription(description);
   UpdateAllLifecyclePhases(web_view_helper.GetWebView());
   EXPECT_EQ(1000, web_view_helper.GetWebView()
@@ -2413,7 +2413,7 @@
                       ->GetLayoutSize()
                       .Height());
 
-  description.max_height = Length(320, blink::kFixed);
+  description.max_height = Length::Fixed(320);
   viewport.SetViewportDescription(description);
   UpdateAllLifecyclePhases(web_view_helper.GetWebView());
   EXPECT_EQ(800, web_view_helper.GetWebView()
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index d0382eda..cab2ce7 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2564,7 +2564,7 @@
   Length default_min_width =
       document->GetViewportData().ViewportDefaultMinWidth();
   if (default_min_width.IsAuto())
-    default_min_width = Length(kExtendToZoom);
+    default_min_width = Length::ExtendToZoom();
 
   ViewportDescription adjusted_description = description;
   if (SettingsImpl()->ViewportMetaLayoutSizeQuirk() &&
@@ -2573,10 +2573,10 @@
     if (adjusted_description.max_width.IsFixed() &&
         adjusted_description.max_width.Value() <=
             kLegacyWidthSnappingMagicNumber)
-      adjusted_description.max_width = Length(kDeviceWidth);
+      adjusted_description.max_width = Length::DeviceWidth();
     if (adjusted_description.max_height.IsFixed() &&
         adjusted_description.max_height.Value() <= size_.height)
-      adjusted_description.max_height = Length(kDeviceHeight);
+      adjusted_description.max_height = Length::DeviceHeight();
     adjusted_description.min_width = adjusted_description.max_width;
     adjusted_description.min_height = adjusted_description.max_height;
   }
@@ -2591,7 +2591,7 @@
       GetPageScaleConstraintsSet().UserAgentConstraints().initial_scale *
               DeviceScaleFactor() <=
           1) {
-    if (description.max_width == Length(kDeviceWidth) ||
+    if (description.max_width == Length::DeviceWidth() ||
         (description.max_width.IsAuto() &&
          GetPageScaleConstraintsSet().PageDefinedConstraints().initial_scale ==
              1.0f))
diff --git a/third_party/blink/renderer/core/frame/page_scale_constraints_set.cc b/third_party/blink/renderer/core/frame/page_scale_constraints_set.cc
index 148e0a7..55ba414 100644
--- a/third_party/blink/renderer/core/frame/page_scale_constraints_set.cc
+++ b/third_party/blink/renderer/core/frame/page_scale_constraints_set.cc
@@ -201,9 +201,9 @@
     bool reset_initial_scale = false;
     if (description.zoom == -1) {
       if (description.max_width.IsAuto() ||
-          description.max_width.GetType() == kExtendToZoom)
+          description.max_width.IsExtendToZoom())
         reset_initial_scale = true;
-      if (use_wide_viewport || description.max_width.GetType() == kDeviceWidth)
+      if (use_wide_viewport || description.max_width.IsDeviceWidth())
         reset_initial_scale = true;
     }
     if (reset_initial_scale)
@@ -226,8 +226,7 @@
     if (page_defined_constraints_.maximum_scale != -1)
       page_defined_constraints_.maximum_scale *= target_density_dpi_factor;
     if (wide_viewport_quirk_enabled &&
-        (!use_wide_viewport ||
-         description.max_width.GetType() == kDeviceWidth)) {
+        (!use_wide_viewport || description.max_width.IsDeviceWidth())) {
       adjusted_layout_size_width /= target_density_dpi_factor;
       adjusted_layout_size_height /= target_density_dpi_factor;
     }
@@ -236,7 +235,7 @@
   if (wide_viewport_quirk_enabled) {
     if (use_wide_viewport &&
         (description.max_width.IsAuto() ||
-         description.max_width.GetType() == kExtendToZoom) &&
+         description.max_width.IsExtendToZoom()) &&
         description.zoom != 1.0f) {
       if (layout_fallback_width)
         adjusted_layout_size_width = layout_fallback_width;
@@ -244,9 +243,8 @@
           adjusted_layout_size_width, FloatSize(icb_size_));
     } else if (!use_wide_viewport) {
       const float non_wide_scale =
-          description.zoom < 1 &&
-                  description.max_width.GetType() != kDeviceWidth &&
-                  description.max_width.GetType() != kDeviceHeight
+          description.zoom < 1 && !description.max_width.IsDeviceWidth() &&
+                  !description.max_width.IsDeviceHeight()
               ? -1
               : old_initial_scale;
       adjusted_layout_size_width = GetLayoutWidthForNonWideViewport(
@@ -254,9 +252,9 @@
                                    target_density_dpi_factor;
       float new_initial_scale = target_density_dpi_factor;
       if (user_agent_constraints_.initial_scale != -1 &&
-          (description.max_width.GetType() == kDeviceWidth ||
+          (description.max_width.IsDeviceWidth() ||
            ((description.max_width.IsAuto() ||
-             description.max_width.GetType() == kExtendToZoom) &&
+             description.max_width.IsExtendToZoom()) &&
             description.zoom == -1))) {
         adjusted_layout_size_width /= user_agent_constraints_.initial_scale;
         new_initial_scale = user_agent_constraints_.initial_scale;
@@ -284,8 +282,8 @@
     page_defined_constraints_.maximum_scale =
         page_defined_constraints_.initial_scale;
     if (description.max_width.IsAuto() ||
-        description.max_width.GetType() == kExtendToZoom ||
-        description.max_width.GetType() == kDeviceWidth) {
+        description.max_width.IsExtendToZoom() ||
+        description.max_width.IsDeviceWidth()) {
       adjusted_layout_size_width =
           icb_size_.Width() / target_density_dpi_factor;
       adjusted_layout_size_height = ComputeHeightByAspectRatio(
diff --git a/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc b/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc
index 886ff81..b25f10d 100644
--- a/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc
+++ b/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc
@@ -586,7 +586,7 @@
           *style, child_element->textContent());
     }
   }
-  style->SetWidth(Length(ceilf(width), kFixed));
+  style->SetWidth(Length::Fixed(ceilf(width)));
   return style;
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc
index 62b9ee0..22a7d4e 100644
--- a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc
+++ b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc
@@ -78,7 +78,7 @@
   style->InheritFrom(OwnerShadowHost()->ComputedStyleRef());
 
   style->SetFlexGrow(1);
-  style->SetMinWidth(Length(0, kFixed));
+  style->SetMinWidth(Length::Fixed(0));
   style->SetDisplay(EDisplay::kBlock);
   style->SetDirection(TextDirection::kLtr);
 
diff --git a/third_party/blink/renderer/core/html/html_meta_element.cc b/third_party/blink/renderer/core/html/html_meta_element.cc
index 1c67a20..915e3df 100644
--- a/third_party/blink/renderer/core/html/html_meta_element.cc
+++ b/third_party/blink/renderer/core/html/html_meta_element.cc
@@ -185,9 +185,9 @@
   // 4) Other keywords and unknown values translate to auto.
 
   if (DeprecatedEqualIgnoringCase(value_string, "device-width"))
-    return Length(kDeviceWidth);
+    return Length::DeviceWidth();
   if (DeprecatedEqualIgnoringCase(value_string, "device-height"))
-    return Length(kDeviceHeight);
+    return Length::DeviceHeight();
 
   bool ok;
 
@@ -204,7 +204,7 @@
     value =
         document->GetPage()->GetChromeClient().WindowToViewportScalar(value);
   }
-  return Length(ClampLengthValue(value), kFixed);
+  return Length::Fixed(ClampLengthValue(value));
 }
 
 float HTMLMetaElement::ParseViewportValueAsZoom(
@@ -330,14 +330,14 @@
     const Length& width = ParseViewportValueAsLength(document, report_warnings,
                                                      key_string, value_string);
     if (!width.IsAuto()) {
-      description.min_width = Length(kExtendToZoom);
+      description.min_width = Length::ExtendToZoom();
       description.max_width = width;
     }
   } else if (key_string == "height") {
     const Length& height = ParseViewportValueAsLength(document, report_warnings,
                                                       key_string, value_string);
     if (!height.IsAuto()) {
-      description.min_height = Length(kExtendToZoom);
+      description.min_height = Length::ExtendToZoom();
       description.max_height = height;
     }
   } else if (key_string == "initial-scale") {
diff --git a/third_party/blink/renderer/core/html/lazy_load_frame_observer.cc b/third_party/blink/renderer/core/html/lazy_load_frame_observer.cc
index 40d89cf..96facfd 100644
--- a/third_party/blink/renderer/core/html/lazy_load_frame_observer.cc
+++ b/third_party/blink/renderer/core/html/lazy_load_frame_observer.cc
@@ -116,9 +116,8 @@
   was_recorded_as_deferred_ = false;
 
   lazy_load_intersection_observer_ = IntersectionObserver::Create(
-      {Length(GetLazyFrameLoadingViewportDistanceThresholdPx(
-                  element_->GetDocument()),
-              kFixed)},
+      {Length::Fixed(GetLazyFrameLoadingViewportDistanceThresholdPx(
+          element_->GetDocument()))},
       {std::numeric_limits<float>::min()}, &element_->GetDocument(),
       WTF::BindRepeating(&LazyLoadFrameObserver::LoadIfHiddenOrNearViewport,
                          WrapWeakPersistent(this)));
diff --git a/third_party/blink/renderer/core/html/lazy_load_image_observer.cc b/third_party/blink/renderer/core/html/lazy_load_image_observer.cc
index 2f10b82..f1cfd96 100644
--- a/third_party/blink/renderer/core/html/lazy_load_image_observer.cc
+++ b/third_party/blink/renderer/core/html/lazy_load_image_observer.cc
@@ -103,8 +103,8 @@
         "Images loaded lazily and replaced with placeholders. Load events are "
         "deferred. See https://crbug.com/846170"));
     lazy_load_intersection_observer_ = IntersectionObserver::Create(
-        {Length(GetLazyImageLoadingViewportDistanceThresholdPx(*root_document),
-                kFixed)},
+        {Length::Fixed(
+            GetLazyImageLoadingViewportDistanceThresholdPx(*root_document))},
         {std::numeric_limits<float>::min()}, root_document,
         WTF::BindRepeating(&LazyLoadImageObserver::LoadIfNearViewport,
                            WrapWeakPersistent(this)));
diff --git a/third_party/blink/renderer/core/intersection_observer/intersection_geometry.cc b/third_party/blink/renderer/core/intersection_observer/intersection_geometry.cc
index bdb377a..7abf8a13 100644
--- a/third_party/blink/renderer/core/intersection_observer/intersection_geometry.cc
+++ b/third_party/blink/renderer/core/intersection_observer/intersection_geometry.cc
@@ -55,7 +55,7 @@
     return LayoutUnit(static_cast<int>(reference_length.ToFloat() *
                                        length.Percent() / 100.0));
   }
-  DCHECK_EQ(length.GetType(), kFixed);
+  DCHECK(length.IsFixed());
   return LayoutUnit(length.IntValue());
 }
 
diff --git a/third_party/blink/renderer/core/intersection_observer/intersection_observer.cc b/third_party/blink/renderer/core/intersection_observer/intersection_observer.cc
index 328652df..c6579ce 100644
--- a/third_party/blink/renderer/core/intersection_observer/intersection_observer.cc
+++ b/third_party/blink/renderer/core/intersection_observer/intersection_observer.cc
@@ -85,16 +85,16 @@
     const CSSParserToken& token = token_range.ConsumeIncludingWhitespace();
     switch (token.GetType()) {
       case kPercentageToken:
-        root_margin.push_back(Length(token.NumericValue(), kPercent));
+        root_margin.push_back(Length::Percent(token.NumericValue()));
         break;
       case kDimensionToken:
         switch (token.GetUnitType()) {
           case CSSPrimitiveValue::UnitType::kPixels:
             root_margin.push_back(
-                Length(static_cast<int>(floor(token.NumericValue())), kFixed));
+                Length::Fixed(static_cast<int>(floor(token.NumericValue()))));
             break;
           case CSSPrimitiveValue::UnitType::kPercentage:
-            root_margin.push_back(Length(token.NumericValue(), kPercent));
+            root_margin.push_back(Length::Percent(token.NumericValue()));
             break;
           default:
             exception_state.ThrowDOMException(
diff --git a/third_party/blink/renderer/core/layout/grid_track_sizing_algorithm.cc b/third_party/blink/renderer/core/layout/grid_track_sizing_algorithm.cc
index 8ca78288..060399833 100644
--- a/third_party/blink/renderer/core/layout/grid_track_sizing_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/grid_track_sizing_algorithm.cc
@@ -850,14 +850,14 @@
   // Collapse empty auto repeat tracks if auto-fit.
   if (grid_.HasAutoRepeatEmptyTracks(direction) &&
       grid_.IsEmptyAutoRepeatTrack(direction, translated_index))
-    return {Length(kFixed), kLengthTrackSizing};
+    return {Length::Fixed(), kLengthTrackSizing};
 
   const GridTrackSize& track_size =
       RawGridTrackSize(direction, translated_index);
   if (track_size.IsFitContent()) {
     return IsRelativeGridLengthAsAuto(track_size.FitContentTrackBreadth(),
                                       direction)
-               ? GridTrackSize(Length(kAuto), Length(kMaxContent))
+               ? GridTrackSize(Length::Auto(), Length::MaxContent())
                : track_size;
   }
 
@@ -872,9 +872,9 @@
           WebFeature::kGridRowTrackPercentIndefiniteHeight);
     }
     if (min_track_breadth.HasPercentage())
-      min_track_breadth = Length(kAuto);
+      min_track_breadth = Length::Auto();
     if (max_track_breadth.HasPercentage())
-      max_track_breadth = Length(kAuto);
+      max_track_breadth = Length::Auto();
   }
 
   // Flex sizes are invalid as a min sizing function. However we still can have
@@ -883,7 +883,7 @@
   // TODO(jfernandez): https://github.com/w3c/csswg-drafts/issues/2611
   // TODO(jfernandez): We may have to change IsIntrinsicSizedGridArea too.
   if (min_track_breadth.IsFlex())
-    min_track_breadth = Length(kAuto);
+    min_track_breadth = Length::Auto();
 
   return GridTrackSize(min_track_breadth, max_track_breadth);
 }
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc
index 17c5754..d2a202c 100644
--- a/third_party/blink/renderer/core/layout/layout_box.cc
+++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -3153,10 +3153,10 @@
       if (containing_block_style.IsLeftToRightDirection() !=
           StyleRef().IsLeftToRightDirection()) {
         if (!margin_start_length.IsAuto())
-          margin_end_length = Length(kAuto);
+          margin_end_length = Length::Auto();
       } else {
         if (!margin_end_length.IsAuto())
-          margin_start_length = Length(kAuto);
+          margin_start_length = Length::Auto();
       }
     }
 
@@ -3272,11 +3272,10 @@
     // The parent box is flexing us, so it has increased or decreased our
     // height. We have to grab our cached flexible height.
     if (HasOverrideLogicalHeight()) {
-      h = Length(OverrideLogicalHeight(), kFixed);
+      h = Length::Fixed(OverrideLogicalHeight());
     } else if (treat_as_replaced) {
-      h = Length(
-          ComputeReplacedLogicalHeight() + BorderAndPaddingLogicalHeight(),
-          kFixed);
+      h = Length::Fixed(ComputeReplacedLogicalHeight() +
+                        BorderAndPaddingLogicalHeight());
     } else {
       h = StyleRef().LogicalHeight();
       check_min_max_height = true;
@@ -3287,9 +3286,8 @@
     // https://bugs.webkit.org/show_bug.cgi?id=46418
     if (h.IsAuto() && in_horizontal_box &&
         ToLayoutDeprecatedFlexibleBox(Parent())->IsStretchingChildren()) {
-      h = Length(
-          ParentBox()->ContentLogicalHeight() - MarginBefore() - MarginAfter(),
-          kFixed);
+      h = Length::Fixed(ParentBox()->ContentLogicalHeight() - MarginBefore() -
+                        MarginAfter());
       check_min_max_height = false;
     }
 
@@ -4751,7 +4749,7 @@
          height_size_type == kMainOrPreferredSize ||
          !logical_height_length.IsAuto());
   if (height_size_type == kMinSize && logical_height_length.IsAuto())
-    logical_height_length = Length(0, kFixed);
+    logical_height_length = Length::Fixed(0);
 
   // 'top' and 'bottom' cannot both be 'auto' because 'top would of been
   // converted to the static position in computePositionedLogicalHeight()
@@ -5429,7 +5427,7 @@
 }
 
 bool LayoutBox::PercentageLogicalHeightIsResolvable() const {
-  Length fake_length(100, kPercent);
+  Length fake_length = Length::Percent(100);
   return ComputePercentageLogicalHeight(fake_length) != -1;
 }
 
diff --git a/third_party/blink/renderer/core/layout/layout_button.cc b/third_party/blink/renderer/core/layout/layout_button.cc
index 0ff2229..f58451fb 100644
--- a/third_party/blink/renderer/core/layout/layout_button.cc
+++ b/third_party/blink/renderer/core/layout/layout_button.cc
@@ -59,7 +59,7 @@
   DCHECK_EQ(inner_, child);
   child_style.SetFlexGrow(1.0f);
   // min-width: 0; is needed for correct shrinking.
-  child_style.SetMinWidth(Length(0, kFixed));
+  child_style.SetMinWidth(Length::Fixed(0));
   // Use margin:auto instead of align-items:center to get safe centering, i.e.
   // when the content overflows, treat it the same as align-items: flex-start.
   child_style.SetMarginTop(Length());
diff --git a/third_party/blink/renderer/core/layout/layout_flexible_box.cc b/third_party/blink/renderer/core/layout/layout_flexible_box.cc
index a30a307a..8cb06d3 100644
--- a/third_party/blink/renderer/core/layout/layout_flexible_box.cc
+++ b/third_party/blink/renderer/core/layout/layout_flexible_box.cc
@@ -1039,7 +1039,7 @@
     sizes.min_size = std::max(LayoutUnit(), sizes.min_size);
   } else if (algorithm.ShouldApplyMinSizeAutoForChild(child)) {
     LayoutUnit content_size =
-        ComputeMainAxisExtentForChild(child, kMinSize, Length(kMinContent));
+        ComputeMainAxisExtentForChild(child, kMinSize, Length::MinContent());
     DCHECK_GE(content_size, LayoutUnit());
     if (HasAspectRatio(child) && child.IntrinsicSize().Height() > 0)
       content_size =
@@ -1108,7 +1108,7 @@
   // 2) of the flexbox spec.
   // We need to check for the flexbox to have a definite main size.
   // We make up a percentage to check whether we have a definite size.
-  if (!MainAxisLengthIsDefinite(child, Length(0, kPercent)))
+  if (!MainAxisLengthIsDefinite(child, Length::Percent(0)))
     return false;
 
   if (MainAxisIsInlineAxis(child))
diff --git a/third_party/blink/renderer/core/layout/layout_list_item.cc b/third_party/blink/renderer/core/layout/layout_list_item.cc
index daa7aed..4529fee 100644
--- a/third_party/blink/renderer/core/layout/layout_list_item.cc
+++ b/third_party/blink/renderer/core/layout/layout_list_item.cc
@@ -205,7 +205,7 @@
         marker_parent = nullptr;
       }
     } else if (line_box_parent) {
-      ForceLogicalHeight(*marker_parent, Length(0, kFixed));
+      ForceLogicalHeight(*marker_parent, Length::Fixed(0));
     }
   }
 
@@ -216,7 +216,7 @@
       // Create marker_container and set its LogicalHeight to 0px.
       LayoutBlock* marker_container = CreateAnonymousBlock();
       if (line_box_parent)
-        ForceLogicalHeight(*marker_container, Length(0, kFixed));
+        ForceLogicalHeight(*marker_container, Length::Fixed(0));
       marker_container->AddChild(marker_,
                                  FirstNonMarkerChild(marker_container));
       AddChild(marker_container, before_child);
diff --git a/third_party/blink/renderer/core/layout/layout_list_marker.cc b/third_party/blink/renderer/core/layout/layout_list_marker.cc
index 99284c0..15986960 100644
--- a/third_party/blink/renderer/core/layout/layout_list_marker.cc
+++ b/third_party/blink/renderer/core/layout/layout_list_marker.cc
@@ -282,8 +282,8 @@
         InlineMarginsForOutside(style, IsImage(), MinPreferredLogicalWidth());
   }
 
-  Length start_length(margin_start, kFixed);
-  Length end_length(margin_end, kFixed);
+  Length start_length = Length::Fixed(margin_start);
+  Length end_length = Length::Fixed(margin_end);
 
   if (start_length != style.MarginStart() || end_length != style.MarginEnd()) {
     scoped_refptr<ComputedStyle> new_style = ComputedStyle::Clone(style);
diff --git a/third_party/blink/renderer/core/layout/layout_menu_list.cc b/third_party/blink/renderer/core/layout/layout_menu_list.cc
index 5a6f950..2ee46c4 100644
--- a/third_party/blink/renderer/core/layout/layout_menu_list.cc
+++ b/third_party/blink/renderer/core/layout/layout_menu_list.cc
@@ -120,7 +120,7 @@
   inner_style.SetFlexGrow(1);
   inner_style.SetFlexShrink(1);
   // min-width: 0; is needed for correct shrinking.
-  inner_style.SetMinWidth(Length(0, kFixed));
+  inner_style.SetMinWidth(Length::Fixed(0));
 
   // Use margin:auto instead of align-items:center to get safe centering, i.e.
   // when the content overflows, treat it the same as align-items: flex-start.
@@ -132,22 +132,21 @@
     inner_style.SetAlignSelfPosition(ItemPosition::kFlexStart);
   }
 
-  Length padding_start = Length(
-      LayoutTheme::GetTheme().PopupInternalPaddingStart(StyleRef()), kFixed);
+  Length padding_start = Length::Fixed(
+      LayoutTheme::GetTheme().PopupInternalPaddingStart(StyleRef()));
   Length padding_end =
-      Length(LayoutTheme::GetTheme().PopupInternalPaddingEnd(
-                 GetFrameView()->GetChromeClient(), StyleRef()),
-             kFixed);
+      Length::Fixed(LayoutTheme::GetTheme().PopupInternalPaddingEnd(
+          GetFrameView()->GetChromeClient(), StyleRef()));
   inner_style.SetPaddingLeft(StyleRef().Direction() == TextDirection::kLtr
                                  ? padding_start
                                  : padding_end);
   inner_style.SetPaddingRight(StyleRef().Direction() == TextDirection::kLtr
                                   ? padding_end
                                   : padding_start);
-  inner_style.SetPaddingTop(Length(
-      LayoutTheme::GetTheme().PopupInternalPaddingTop(StyleRef()), kFixed));
-  inner_style.SetPaddingBottom(Length(
-      LayoutTheme::GetTheme().PopupInternalPaddingBottom(StyleRef()), kFixed));
+  inner_style.SetPaddingTop(Length::Fixed(
+      LayoutTheme::GetTheme().PopupInternalPaddingTop(StyleRef())));
+  inner_style.SetPaddingBottom(Length::Fixed(
+      LayoutTheme::GetTheme().PopupInternalPaddingBottom(StyleRef())));
   inner_style.SetTextAlign(StyleRef().IsLeftToRightDirection()
                                ? ETextAlign::kLeft
                                : ETextAlign::kRight);
diff --git a/third_party/blink/renderer/core/layout/layout_table_cell.cc b/third_party/blink/renderer/core/layout/layout_table_cell.cc
index 85607f2..482bfd8 100644
--- a/third_party/blink/renderer/core/layout/layout_table_cell.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_cell.cc
@@ -171,11 +171,11 @@
   // Column widths specified on <col> apply to the border box of the cell, see
   // bug 8126.
   // FIXME: Why is border/padding ignored in the negative width case?
-  if (col_width_sum > 0)
-    return Length(
-        std::max(0, col_width_sum - BorderAndPaddingLogicalWidth().Ceil()),
-        kFixed);
-  return Length(col_width_sum, kFixed);
+  if (col_width_sum > 0) {
+    return Length::Fixed(
+        std::max(0, col_width_sum - BorderAndPaddingLogicalWidth().Ceil()));
+  }
+  return Length::Fixed(col_width_sum);
 }
 
 void LayoutTableCell::ComputePreferredLogicalWidths() {
diff --git a/third_party/blink/renderer/core/layout/layout_theme.cc b/third_party/blink/renderer/core/layout/layout_theme.cc
index e01bd3db..d7df2dfe 100644
--- a/third_party/blink/renderer/core/layout/layout_theme.cc
+++ b/third_party/blink/renderer/core/layout/layout_theme.cc
@@ -898,9 +898,9 @@
 // static
 void LayoutTheme::SetSizeIfAuto(ComputedStyle& style, const IntSize& size) {
   if (style.Width().IsIntrinsicOrAuto())
-    style.SetWidth(Length(size.Width(), kFixed));
+    style.SetWidth(Length::Fixed(size.Width()));
   if (style.Height().IsIntrinsicOrAuto())
-    style.SetHeight(Length(size.Height(), kFixed));
+    style.SetHeight(Length::Fixed(size.Height()));
 }
 
 // static
@@ -925,8 +925,8 @@
 // static
 void LayoutTheme::SetMinimumSizeIfAuto(ComputedStyle& style,
                                        const IntSize& size) {
-  LengthSize length_size(Length(size.Width(), kFixed),
-                         Length(size.Height(), kFixed));
+  LengthSize length_size(Length::Fixed(size.Width()),
+                         Length::Fixed(size.Height()));
   SetMinimumSize(style, &length_size);
 }
 
diff --git a/third_party/blink/renderer/core/layout/layout_theme_default.cc b/third_party/blink/renderer/core/layout/layout_theme_default.cc
index 5c154fb..6e1aae5 100644
--- a/third_party/blink/renderer/core/layout/layout_theme_default.cc
+++ b/third_party/blink/renderer/core/layout/layout_theme_default.cc
@@ -171,11 +171,11 @@
   // FIXME: Mock theme doesn't handle zoomed sliders.
   float zoom_level = UseMockTheme() ? 1 : style.EffectiveZoom();
   if (style.Appearance() == kSliderThumbHorizontalPart) {
-    style.SetWidth(Length(size.Width() * zoom_level, kFixed));
-    style.SetHeight(Length(size.Height() * zoom_level, kFixed));
+    style.SetWidth(Length::Fixed(size.Width() * zoom_level));
+    style.SetHeight(Length::Fixed(size.Height() * zoom_level));
   } else if (style.Appearance() == kSliderThumbVerticalPart) {
-    style.SetWidth(Length(size.Height() * zoom_level, kFixed));
-    style.SetHeight(Length(size.Width() * zoom_level, kFixed));
+    style.SetWidth(Length::Fixed(size.Height() * zoom_level));
+    style.SetHeight(Length::Fixed(size.Width() * zoom_level));
   }
 }
 
@@ -224,8 +224,8 @@
       WebThemeEngine::kPartInnerSpinButton);
 
   float zoom_level = style.EffectiveZoom();
-  style.SetWidth(Length(size.Width() * zoom_level, kFixed));
-  style.SetMinWidth(Length(size.Width() * zoom_level, kFixed));
+  style.SetWidth(Length::Fixed(size.Width() * zoom_level));
+  style.SetMinWidth(Length::Fixed(size.Width() * zoom_level));
 }
 
 bool LayoutThemeDefault::ShouldOpenPickerWithF4Key() const {
@@ -296,8 +296,8 @@
   int cancel_button_size = static_cast<int>(lroundf(std::min(
       std::max(kMinCancelButtonSize, kDefaultCancelButtonSize * font_scale),
       kMaxCancelButtonSize)));
-  style.SetWidth(Length(cancel_button_size, kFixed));
-  style.SetHeight(Length(cancel_button_size, kFixed));
+  style.SetWidth(Length::Fixed(cancel_button_size));
+  style.SetHeight(Length::Fixed(cancel_button_size));
 }
 
 void LayoutThemeDefault::AdjustMenuListStyle(ComputedStyle& style,
diff --git a/third_party/blink/renderer/core/layout/layout_theme_mac.mm b/third_party/blink/renderer/core/layout/layout_theme_mac.mm
index 2563c9fb7..7929f5f 100644
--- a/third_party/blink/renderer/core/layout/layout_theme_mac.mm
+++ b/third_party/blink/renderer/core/layout/layout_theme_mac.mm
@@ -556,9 +556,9 @@
   // account.
   IntSize size = SizeForFont(style, sizes);
   if (style.Width().IsIntrinsicOrAuto() && size.Width() > 0)
-    style.SetWidth(Length(size.Width(), kFixed));
+    style.SetWidth(Length::Fixed(size.Width()));
   if (style.Height().IsAuto() && size.Height() > 0)
-    style.SetHeight(Length(size.Height(), kFixed));
+    style.SetHeight(Length::Fixed(size.Height()));
 }
 
 void LayoutThemeMac::SetFontFromControlSize(ComputedStyle& style,
@@ -641,7 +641,7 @@
   style.ResetPadding();
 
   // Height is locked to auto.
-  style.SetHeight(Length(kAuto));
+  style.SetHeight(Length::Auto());
 
   // White-space is locked to pre.
   style.SetWhiteSpace(EWhiteSpace::kPre);
@@ -726,7 +726,7 @@
               int(kBaseBorderRadius + font_scale - 1)));  // FIXME: Round up?
 
   const int kMinHeight = 15;
-  style.SetMinHeight(Length(kMinHeight, kFixed));
+  style.SetMinHeight(Length::Fixed(kMinHeight));
 
   style.SetLineHeight(ComputedStyleInitialValues::InitialLineHeight());
 }
@@ -808,7 +808,7 @@
   style.SetBorderTopStyle(EBorderStyle::kInset);
 
   // Override height.
-  style.SetHeight(Length(kAuto));
+  style.SetHeight(Length::Auto());
   SetSearchFieldSize(style);
 
   NSControlSize control_size = ControlSizeForFont(style);
@@ -817,10 +817,10 @@
   const int vertical_padding = 1 * style.EffectiveZoom();
   const int horizontal_padding =
       SearchFieldHorizontalPaddings()[control_size] * style.EffectiveZoom();
-  style.SetPaddingLeft(Length(horizontal_padding, kFixed));
-  style.SetPaddingRight(Length(horizontal_padding, kFixed));
-  style.SetPaddingTop(Length(vertical_padding, kFixed));
-  style.SetPaddingBottom(Length(vertical_padding, kFixed));
+  style.SetPaddingLeft(Length::Fixed(horizontal_padding));
+  style.SetPaddingRight(Length::Fixed(horizontal_padding));
+  style.SetPaddingTop(Length::Fixed(vertical_padding));
+  style.SetPaddingBottom(Length::Fixed(vertical_padding));
 
   SetFontFromControlSize(style, control_size);
 
@@ -836,8 +836,8 @@
 void LayoutThemeMac::AdjustSearchFieldCancelButtonStyle(
     ComputedStyle& style) const {
   IntSize size = SizeForSystemFont(style, CancelButtonSizes());
-  style.SetWidth(Length(size.Width(), kFixed));
-  style.SetHeight(Length(size.Height(), kFixed));
+  style.SetWidth(Length::Fixed(size.Width()));
+  style.SetHeight(Length::Fixed(size.Height()));
   style.SetBoxShadow(nullptr);
 }
 
@@ -855,7 +855,7 @@
   int height = ProgressBarHeights()[control_size] * zoom_level;
 
   // Now inflate it to account for the shadow.
-  style.SetMinHeight(Length(height + zoom_level, kFixed));
+  style.SetMinHeight(Length::Fixed(height + zoom_level));
 }
 
 void LayoutThemeMac::AdjustSliderThumbSize(ComputedStyle& style) const {
@@ -863,9 +863,9 @@
   if (style.Appearance() == kSliderThumbHorizontalPart ||
       style.Appearance() == kSliderThumbVerticalPart) {
     style.SetWidth(
-        Length(static_cast<int>(kSliderThumbWidth * zoom_level), kFixed));
+        Length::Fixed(static_cast<int>(kSliderThumbWidth * zoom_level)));
     style.SetHeight(
-        Length(static_cast<int>(kSliderThumbHeight * zoom_level), kFixed));
+        Length::Fixed(static_cast<int>(kSliderThumbHeight * zoom_level)));
   }
 }
 
diff --git a/third_party/blink/renderer/core/layout/layout_theme_mobile.cc b/third_party/blink/renderer/core/layout/layout_theme_mobile.cc
index 4a7e186b..dbbfe5be 100644
--- a/third_party/blink/renderer/core/layout/layout_theme_mobile.cc
+++ b/third_party/blink/renderer/core/layout/layout_theme_mobile.cc
@@ -58,8 +58,8 @@
     IntSize size = Platform::Current()->ThemeEngine()->GetSize(
         WebThemeEngine::kPartInnerSpinButton);
 
-    style.SetWidth(Length(size.Width(), kFixed));
-    style.SetMinWidth(Length(size.Width(), kFixed));
+    style.SetWidth(Length::Fixed(size.Width()));
+    style.SetMinWidth(Length::Fixed(size.Width()));
   }
 }
 
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
index ec1143a..912dcea 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
@@ -449,7 +449,7 @@
 TEST_F(NGInlineNodeTest, CreateLineBidiIsolate) {
   UseLayoutObjectAndAhem();
   scoped_refptr<ComputedStyle> style = ComputedStyle::Create();
-  style->SetLineHeight(Length(1, kFixed));
+  style->SetLineHeight(Length::Fixed(1));
   style->GetFont().Update(nullptr);
   NGInlineNodeForTest node = CreateInlineNode();
   node = CreateBidiIsolateNode(node, style.get(), layout_object_);
diff --git a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc
index be144715..05c93c1 100644
--- a/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc
+++ b/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_item.cc
@@ -133,8 +133,8 @@
         style, EDisplay::kInline);
     auto margins =
         LayoutListMarker::InlineMarginsForInside(style, IsMarkerImage());
-    marker_style->SetMarginStart(Length(margins.first, kFixed));
-    marker_style->SetMarginEnd(Length(margins.second, kFixed));
+    marker_style->SetMarginStart(Length::Fixed(margins.first));
+    marker_style->SetMarginEnd(Length::Fixed(margins.second));
   } else {
     if (marker_ && !marker_->IsLayoutBlockFlow())
       DestroyMarker();
diff --git a/third_party/blink/renderer/core/layout/ng/ng_absolute_utils_test.cc b/third_party/blink/renderer/core/layout/ng/ng_absolute_utils_test.cc
index f22a454..01c0fcd 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_absolute_utils_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_absolute_utils_test.cc
@@ -54,20 +54,18 @@
       LayoutUnit margin_right,
       LayoutUnit right,
       WritingMode writing_mode = WritingMode::kHorizontalTb) {
-    style_->SetLeft(left == NGAuto ? Length(LengthType::kAuto)
-                                   : Length(left.ToInt(), LengthType::kFixed));
-    style_->SetMarginLeft(margin_left == NGAuto ? Length(LengthType::kAuto)
-                                                : Length(margin_left.ToInt(),
-                                                         LengthType::kFixed));
-    style_->SetWidth(width == NGAuto
-                         ? Length(LengthType::kAuto)
-                         : Length(width.ToInt(), LengthType::kFixed));
-    style_->SetMarginRight(margin_right == NGAuto ? Length(LengthType::kAuto)
-                                                  : Length(margin_right.ToInt(),
-                                                           LengthType::kFixed));
-    style_->SetRight(right == NGAuto
-                         ? Length(LengthType::kAuto)
-                         : Length(right.ToInt(), LengthType::kFixed));
+    style_->SetLeft(left == NGAuto ? Length::Auto()
+                                   : Length::Fixed(left.ToInt()));
+    style_->SetMarginLeft(margin_left == NGAuto
+                              ? Length::Auto()
+                              : Length::Fixed(margin_left.ToInt()));
+    style_->SetWidth(width == NGAuto ? Length::Auto()
+                                     : Length::Fixed(width.ToInt()));
+    style_->SetMarginRight(margin_right == NGAuto
+                               ? Length::Auto()
+                               : Length::Fixed(margin_right.ToInt()));
+    style_->SetRight(right == NGAuto ? Length::Auto()
+                                     : Length::Fixed(right.ToInt()));
     style_->SetWritingMode(writing_mode);
   }
 
@@ -77,21 +75,17 @@
                         LayoutUnit margin_bottom,
                         LayoutUnit bottom,
                         WritingMode writing_mode = WritingMode::kHorizontalTb) {
-    style_->SetTop(top == NGAuto ? Length(LengthType::kAuto)
-                                 : Length(top.ToInt(), LengthType::kFixed));
+    style_->SetTop(top == NGAuto ? Length::Auto() : Length::Fixed(top.ToInt()));
     style_->SetMarginTop(margin_top == NGAuto
-                             ? Length(LengthType::kAuto)
-                             : Length(margin_top.ToInt(), LengthType::kFixed));
-    style_->SetHeight(height == NGAuto
-                          ? Length(LengthType::kAuto)
-                          : Length(height.ToInt(), LengthType::kFixed));
-    style_->SetMarginBottom(
-        margin_bottom == NGAuto
-            ? Length(LengthType::kAuto)
-            : Length(margin_bottom.ToInt(), LengthType::kFixed));
-    style_->SetBottom(bottom == NGAuto
-                          ? Length(LengthType::kAuto)
-                          : Length(bottom.ToInt(), LengthType::kFixed));
+                             ? Length::Auto()
+                             : Length::Fixed(margin_top.ToInt()));
+    style_->SetHeight(height == NGAuto ? Length::Auto()
+                                       : Length::Fixed(height.ToInt()));
+    style_->SetMarginBottom(margin_bottom == NGAuto
+                                ? Length::Auto()
+                                : Length::Fixed(margin_bottom.ToInt()));
+    style_->SetBottom(bottom == NGAuto ? Length::Auto()
+                                       : Length::Fixed(bottom.ToInt()));
     style_->SetWritingMode(writing_mode);
   }
 
@@ -131,8 +125,8 @@
 
   style_->SetBorderLeftWidth(border_left.ToInt());
   style_->SetBorderRightWidth(border_right.ToInt());
-  style_->SetPaddingLeft(Length(padding_left.ToInt(), LengthType::kFixed));
-  style_->SetPaddingRight(Length(padding_right.ToInt(), LengthType::kFixed));
+  style_->SetPaddingLeft(Length::Fixed(padding_left.ToInt()));
+  style_->SetPaddingRight(Length::Fixed(padding_right.ToInt()));
 
   // These default to 3 which is not what we want.
   style_->SetBorderBottomWidth(0);
@@ -357,8 +351,8 @@
 
   style_->SetBorderTopWidth(border_top.ToInt());
   style_->SetBorderBottomWidth(border_bottom.ToInt());
-  style_->SetPaddingTop(Length(padding_top.ToInt(), LengthType::kFixed));
-  style_->SetPaddingBottom(Length(padding_bottom.ToInt(), LengthType::kFixed));
+  style_->SetPaddingTop(Length::Fixed(padding_top.ToInt()));
+  style_->SetPaddingBottom(Length::Fixed(padding_bottom.ToInt()));
   // These default to 3 which is not what we want.
   style_->SetBorderLeftWidth(0);
   style_->SetBorderRightWidth(0);
@@ -513,10 +507,10 @@
   LayoutUnit min{50};
   LayoutUnit max{150};
 
-  style_->SetMinWidth(Length(min.ToInt(), LengthType::kFixed));
-  style_->SetMaxWidth(Length(max.ToInt(), LengthType::kFixed));
-  style_->SetMinHeight(Length(min.ToInt(), LengthType::kFixed));
-  style_->SetMaxHeight(Length(max.ToInt(), LengthType::kFixed));
+  style_->SetMinWidth(Length::Fixed(min.ToInt()));
+  style_->SetMaxWidth(Length::Fixed(max.ToInt()));
+  style_->SetMinHeight(Length::Fixed(min.ToInt()));
+  style_->SetMaxHeight(Length::Fixed(max.ToInt()));
 
   NGBoxStrut ltr_border_padding =
       ComputeBorders(ltr_space_, *style_) + ComputePadding(ltr_space_, *style_);
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc
index 2048191..c7c8bfe 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -415,13 +415,13 @@
   };
 
   // height == auto
-  run_test(Length(kAuto));
+  run_test(Length::Auto());
   // Margins are collapsed with the result 200 = std::max(20, 200)
   // The fragment size 258 == body's margin 8 + child's height 50 + 200
   EXPECT_EQ(NGPhysicalSize(LayoutUnit(800), LayoutUnit(258)), fragment->Size());
 
   // height == fixed
-  run_test(Length(50, kFixed));
+  run_test(Length::Fixed(50));
   // Margins are not collapsed, so fragment still has margins == 20.
   // The fragment size 78 == body's margin 8 + child's height 50 + 20
   EXPECT_EQ(NGPhysicalSize(LayoutUnit(800), LayoutUnit(78)), fragment->Size());
@@ -469,7 +469,7 @@
   };
 
   // with padding
-  run_test(Length(20, kFixed));
+  run_test(Length::Fixed(20));
   // 500 = child's height 50 + 2xmargin 400 + paddint-top 20 +
   // container's margin 30
   EXPECT_EQ(NGPhysicalSize(LayoutUnit(800), LayoutUnit(500)), fragment->Size());
@@ -479,7 +479,7 @@
   EXPECT_EQ(LayoutUnit(220), child_offset.top);
 
   // without padding
-  run_test(Length(0, kFixed));
+  run_test(Length::Fixed(0));
   // 450 = 2xmax(body's margin 8, container's margin 30, child's margin 200) +
   //       child's height 50
   EXPECT_EQ(NGPhysicalSize(LayoutUnit(800), LayoutUnit(450)), fragment->Size());
@@ -777,11 +777,11 @@
 
   // Base case of no margins.
   run_test(
-      /* #zero-top margin-bottom */ Length(0, kFixed),
-      /* #zero-inner margin-top */ Length(0, kFixed),
-      /* #zero-inner margin-bottom */ Length(0, kFixed),
-      /* #zero margin-bottom */ Length(0, kFixed),
-      /* #inflow margin-top */ Length(0, kFixed));
+      /* #zero-top margin-bottom */ Length::Fixed(0),
+      /* #zero-inner margin-top */ Length::Fixed(0),
+      /* #zero-inner margin-bottom */ Length::Fixed(0),
+      /* #zero margin-bottom */ Length::Fixed(0),
+      /* #inflow margin-top */ Length::Fixed(0));
 
   // #zero, #abs, #inflow should all be positioned at the float.
   EXPECT_EQ(LayoutUnit(50), zero->Location().Y());
@@ -791,11 +791,11 @@
   // A margin strut which resolves to -50 (-70 + 20) adjusts the position of
   // #zero to the float clearance.
   run_test(
-      /* #zero-top margin-bottom */ Length(0, kFixed),
-      /* #zero-inner margin-top */ Length(-60, kFixed),
-      /* #zero-inner margin-bottom */ Length(20, kFixed),
-      /* #zero margin-bottom */ Length(-70, kFixed),
-      /* #inflow margin-top */ Length(50, kFixed));
+      /* #zero-top margin-bottom */ Length::Fixed(0),
+      /* #zero-inner margin-top */ Length::Fixed(-60),
+      /* #zero-inner margin-bottom */ Length::Fixed(20),
+      /* #zero margin-bottom */ Length::Fixed(-70),
+      /* #inflow margin-top */ Length::Fixed(50));
 
   // #zero is placed at the float, the margin strut is at:
   // 90 = (50 - (-60 + 20)).
@@ -815,11 +815,11 @@
   // NOTE: This case below has wildly different results on different browsers,
   // we may have to change the behaviour here in the future for web compat.
   run_test(
-      /* #zero-top margin-bottom */ Length(0, kFixed),
-      /* #zero-inner margin-top */ Length(70, kFixed),
-      /* #zero-inner margin-bottom */ Length(-10, kFixed),
-      /* #zero margin-bottom */ Length(-20, kFixed),
-      /* #inflow margin-top */ Length(80, kFixed));
+      /* #zero-top margin-bottom */ Length::Fixed(0),
+      /* #zero-inner margin-top */ Length::Fixed(70),
+      /* #zero-inner margin-bottom */ Length::Fixed(-10),
+      /* #zero margin-bottom */ Length::Fixed(-20),
+      /* #inflow margin-top */ Length::Fixed(80));
 
   // #zero is placed at 60 (-10 + 70).
   EXPECT_EQ(LayoutUnit(60), zero->Location().Y());
@@ -836,11 +836,11 @@
   // affected by clearance, it needs to have layout performed again, starting
   // with an empty margin strut.
   run_test(
-      /* #zero-top margin-bottom */ Length(30, kFixed),
-      /* #zero-inner margin-top */ Length(20, kFixed),
-      /* #zero-inner margin-bottom */ Length(-10, kFixed),
-      /* #zero margin-bottom */ Length(0, kFixed),
-      /* #inflow margin-top */ Length(25, kFixed));
+      /* #zero-top margin-bottom */ Length::Fixed(30),
+      /* #zero-inner margin-top */ Length::Fixed(20),
+      /* #zero-inner margin-bottom */ Length::Fixed(-10),
+      /* #zero margin-bottom */ Length::Fixed(0),
+      /* #inflow margin-top */ Length::Fixed(25));
 
   // #zero is placed at the float, the margin strut is at:
   // 40 = (50 - (-10 + 20)).
@@ -2163,7 +2163,7 @@
   };
 
   // #new-fc is small enough to fit on the same line with #float.
-  run_test(Length(80, kFixed));
+  run_test(Length::Fixed(80));
   // 100 = float's width, 0 = no margin collapsing
   EXPECT_THAT(new_fc_offset, NGPhysicalOffset(LayoutUnit(100), LayoutUnit(0)));
   // 8 = body's margins, 20 = new-fc's margin top(20) collapses with
@@ -2171,7 +2171,7 @@
   EXPECT_THAT(body_offset, NGPhysicalOffset(LayoutUnit(8), LayoutUnit(20)));
 
   // #new-fc is too wide to be positioned on the same line with #float
-  run_test(Length(120, kFixed));
+  run_test(Length::Fixed(120));
   // 30 = #float's height
   EXPECT_THAT(new_fc_offset, NGPhysicalOffset(LayoutUnit(0), LayoutUnit(30)));
   // 8 = body's margins, no margin collapsing
diff --git a/third_party/blink/renderer/core/layout/ng/ng_length_utils.cc b/third_party/blink/renderer/core/layout/ng/ng_length_utils.cc
index 9899e56..0b9af17 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_length_utils.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_length_utils.cc
@@ -480,7 +480,7 @@
   const ComputedStyle& style = node.Style();
   Length logical_width = style.LogicalWidth();
   if (logical_width.IsAuto() && space.IsShrinkToFit())
-    logical_width = Length(kFitContent);
+    logical_width = Length::FitContent();
 
   LayoutBox* box = node.GetLayoutBox();
   // If we have usable cached min/max intrinsic sizes, use those if we can. They
@@ -1127,7 +1127,7 @@
        node.Style().FlexBasis().IsPercentOrCalc())) {
     // This call has the side-effect of setting HasPercentHeightDescendants
     // correctly.
-    node.GetLayoutBox()->ComputePercentageLogicalHeight(Length(0, kPercent));
+    node.GetLayoutBox()->ComputePercentageLogicalHeight(Length::Percent(0));
   }
 
   return NGLogicalSize(
diff --git a/third_party/blink/renderer/core/layout/ng/ng_length_utils_test.cc b/third_party/blink/renderer/core/layout/ng/ng_length_utils_test.cc
index 92fdc51..83a15f427 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_length_utils_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_length_utils_test.cc
@@ -105,57 +105,57 @@
 };
 
 TEST_F(NGLengthUtilsTest, testResolveInlineLength) {
-  EXPECT_EQ(LayoutUnit(60), ResolveInlineLength(Length(30, kPercent)));
-  EXPECT_EQ(LayoutUnit(150), ResolveInlineLength(Length(150, kFixed)));
+  EXPECT_EQ(LayoutUnit(60), ResolveInlineLength(Length::Percent(30)));
+  EXPECT_EQ(LayoutUnit(150), ResolveInlineLength(Length::Fixed(150)));
   EXPECT_EQ(LayoutUnit(0),
-            ResolveInlineLength(Length(kAuto), LengthResolveType::kMinSize,
+            ResolveInlineLength(Length::Auto(), LengthResolveType::kMinSize,
                                 LengthResolvePhase::kIntrinsic));
-  EXPECT_EQ(LayoutUnit(200), ResolveInlineLength(Length(kAuto)));
-  EXPECT_EQ(LayoutUnit(200), ResolveInlineLength(Length(kFillAvailable)));
+  EXPECT_EQ(LayoutUnit(200), ResolveInlineLength(Length::Auto()));
+  EXPECT_EQ(LayoutUnit(200), ResolveInlineLength(Length::FillAvailable()));
 
   EXPECT_EQ(
       LayoutUnit::Max(),
-      ResolveInlineLength(Length(30, kPercent), LengthResolveType::kMaxSize,
+      ResolveInlineLength(Length::Percent(30), LengthResolveType::kMaxSize,
                           LengthResolvePhase::kIntrinsic));
   EXPECT_EQ(
       LayoutUnit::Max(),
-      ResolveInlineLength(Length(kFillAvailable), LengthResolveType::kMaxSize,
+      ResolveInlineLength(Length::FillAvailable(), LengthResolveType::kMaxSize,
                           LengthResolvePhase::kIntrinsic));
   MinMaxSize sizes;
   sizes.min_size = LayoutUnit(30);
   sizes.max_size = LayoutUnit(40);
   EXPECT_EQ(
       LayoutUnit(30),
-      ResolveInlineLength(Length(kMinContent), LengthResolveType::kContentSize,
+      ResolveInlineLength(Length::MinContent(), LengthResolveType::kContentSize,
                           LengthResolvePhase::kLayout, sizes));
   EXPECT_EQ(
       LayoutUnit(40),
-      ResolveInlineLength(Length(kMaxContent), LengthResolveType::kContentSize,
+      ResolveInlineLength(Length::MaxContent(), LengthResolveType::kContentSize,
                           LengthResolvePhase::kLayout, sizes));
   EXPECT_EQ(
       LayoutUnit(40),
-      ResolveInlineLength(Length(kFitContent), LengthResolveType::kContentSize,
+      ResolveInlineLength(Length::FitContent(), LengthResolveType::kContentSize,
                           LengthResolvePhase::kLayout, sizes));
   sizes.max_size = LayoutUnit(800);
   EXPECT_EQ(
       LayoutUnit(200),
-      ResolveInlineLength(Length(kFitContent), LengthResolveType::kContentSize,
+      ResolveInlineLength(Length::FitContent(), LengthResolveType::kContentSize,
                           LengthResolvePhase::kLayout, sizes));
 
 #if DCHECK_IS_ON()
   // This should fail a DCHECK.
-  EXPECT_DEATH_IF_SUPPORTED(ResolveInlineLength(Length(kFitContent)), "");
+  EXPECT_DEATH_IF_SUPPORTED(ResolveInlineLength(Length::FitContent()), "");
 #endif
 }
 
 TEST_F(NGLengthUtilsTest, testResolveBlockLength) {
-  EXPECT_EQ(LayoutUnit(90), ResolveBlockLength(Length(30, kPercent)));
-  EXPECT_EQ(LayoutUnit(150), ResolveBlockLength(Length(150, kFixed)));
-  EXPECT_EQ(LayoutUnit(0), ResolveBlockLength(Length(kAuto)));
-  EXPECT_EQ(LayoutUnit(300), ResolveBlockLength(Length(kFillAvailable)));
+  EXPECT_EQ(LayoutUnit(90), ResolveBlockLength(Length::Percent(30)));
+  EXPECT_EQ(LayoutUnit(150), ResolveBlockLength(Length::Fixed(150)));
+  EXPECT_EQ(LayoutUnit(0), ResolveBlockLength(Length::Auto()));
+  EXPECT_EQ(LayoutUnit(300), ResolveBlockLength(Length::FillAvailable()));
 
-  EXPECT_EQ(LayoutUnit(0), ResolveBlockLength(Length(kAuto)));
-  EXPECT_EQ(LayoutUnit(300), ResolveBlockLength(Length(kFillAvailable)));
+  EXPECT_EQ(LayoutUnit(0), ResolveBlockLength(Length::Auto()));
+  EXPECT_EQ(LayoutUnit(300), ResolveBlockLength(Length::FillAvailable()));
 }
 
 TEST_F(NGLengthUtilsTest, testComputeContentContribution) {
@@ -166,30 +166,30 @@
   NGBoxStrut border_padding;
 
   MinMaxSize expected = sizes;
-  style_->SetLogicalWidth(Length(30, kPercent));
+  style_->SetLogicalWidth(Length::Percent(30));
   EXPECT_EQ(expected,
             ComputeMinAndMaxContentContribution(
                 style_->GetWritingMode(), *style_, border_padding, sizes));
 
-  style_->SetLogicalWidth(Length(kFillAvailable));
+  style_->SetLogicalWidth(Length::FillAvailable());
   EXPECT_EQ(expected,
             ComputeMinAndMaxContentContribution(
                 style_->GetWritingMode(), *style_, border_padding, sizes));
 
   expected = MinMaxSize{LayoutUnit(150), LayoutUnit(150)};
-  style_->SetLogicalWidth(Length(150, kFixed));
+  style_->SetLogicalWidth(Length::Fixed(150));
   EXPECT_EQ(expected,
             ComputeMinAndMaxContentContribution(
                 style_->GetWritingMode(), *style_, border_padding, sizes));
 
   expected = sizes;
-  style_->SetLogicalWidth(Length(kAuto));
+  style_->SetLogicalWidth(Length::Auto());
   EXPECT_EQ(expected,
             ComputeMinAndMaxContentContribution(
                 style_->GetWritingMode(), *style_, border_padding, sizes));
 
   expected = MinMaxSize{LayoutUnit(430), LayoutUnit(440)};
-  style_->SetPaddingLeft(Length(400, kFixed));
+  style_->SetPaddingLeft(Length::Fixed(400));
   auto sizes_padding400 = sizes;
   sizes_padding400 += LayoutUnit(400);
   NGBoxStrut border_padding400 = {LayoutUnit(400), LayoutUnit(), LayoutUnit(),
@@ -199,7 +199,7 @@
                           sizes_padding400));
 
   expected = MinMaxSize{LayoutUnit(30), LayoutUnit(40)};
-  style_->SetPaddingLeft(Length(0, kFixed));
+  style_->SetPaddingLeft(Length::Fixed(0));
   style_->SetLogicalWidth(Length(CalculationValue::Create(
       PixelsAndPercent(100, -10), kValueRangeNonNegative)));
   EXPECT_EQ(expected,
@@ -207,23 +207,23 @@
                 style_->GetWritingMode(), *style_, border_padding, sizes));
 
   expected = MinMaxSize{LayoutUnit(30), LayoutUnit(35)};
-  style_->SetLogicalWidth(Length(kAuto));
-  style_->SetMaxWidth(Length(35, kFixed));
+  style_->SetLogicalWidth(Length::Auto());
+  style_->SetMaxWidth(Length::Fixed(35));
   EXPECT_EQ(expected,
             ComputeMinAndMaxContentContribution(
                 style_->GetWritingMode(), *style_, border_padding, sizes));
 
   expected = MinMaxSize{LayoutUnit(80), LayoutUnit(80)};
-  style_->SetLogicalWidth(Length(50, kFixed));
-  style_->SetMinWidth(Length(80, kFixed));
+  style_->SetLogicalWidth(Length::Fixed(50));
+  style_->SetMinWidth(Length::Fixed(80));
   EXPECT_EQ(expected,
             ComputeMinAndMaxContentContribution(
                 style_->GetWritingMode(), *style_, border_padding, sizes));
 
   expected = MinMaxSize{LayoutUnit(150), LayoutUnit(150)};
   style_ = ComputedStyle::Create();
-  style_->SetLogicalWidth(Length(100, kFixed));
-  style_->SetPaddingLeft(Length(50, kFixed));
+  style_->SetLogicalWidth(Length::Fixed(100));
+  style_->SetPaddingLeft(Length::Fixed(50));
   auto sizes_padding50 = sizes;
   NGBoxStrut border_padding50 = {LayoutUnit(50), LayoutUnit(), LayoutUnit(),
                                  LayoutUnit()};
@@ -241,18 +241,18 @@
   // Content size should never be below zero, even with box-sizing: border-box
   // and a large padding...
   expected = MinMaxSize{LayoutUnit(400), LayoutUnit(400)};
-  style_->SetPaddingLeft(Length(400, kFixed));
+  style_->SetPaddingLeft(Length::Fixed(400));
   EXPECT_EQ(expected, ComputeMinAndMaxContentContribution(
                           style_->GetWritingMode(), *style_, border_padding400,
                           sizes_padding400));
 
   expected.min_size = expected.max_size = sizes.min_size + LayoutUnit(400);
-  style_->SetLogicalWidth(Length(kMinContent));
+  style_->SetLogicalWidth(Length::MinContent());
   EXPECT_EQ(expected, ComputeMinAndMaxContentContribution(
                           style_->GetWritingMode(), *style_, border_padding400,
                           sizes_padding400));
-  style_->SetLogicalWidth(Length(100, kFixed));
-  style_->SetMaxWidth(Length(kMaxContent));
+  style_->SetLogicalWidth(Length::Fixed(100));
+  style_->SetMaxWidth(Length::MaxContent());
   // Due to padding and box-sizing, width computes to 400px and max-width to
   // 440px, so the result is 400.
   expected = MinMaxSize{LayoutUnit(400), LayoutUnit(400)};
@@ -260,7 +260,7 @@
                           style_->GetWritingMode(), *style_, border_padding400,
                           sizes_padding400));
   expected = MinMaxSize{LayoutUnit(40), LayoutUnit(40)};
-  style_->SetPaddingLeft(Length(0, kFixed));
+  style_->SetPaddingLeft(Length::Fixed(0));
   EXPECT_EQ(expected,
             ComputeMinAndMaxContentContribution(
                 style_->GetWritingMode(), *style_, border_padding, sizes));
@@ -271,16 +271,16 @@
   sizes.min_size = LayoutUnit(30);
   sizes.max_size = LayoutUnit(40);
 
-  style_->SetLogicalWidth(Length(30, kPercent));
+  style_->SetLogicalWidth(Length::Percent(30));
   EXPECT_EQ(LayoutUnit(60), ComputeInlineSizeForFragment());
 
-  style_->SetLogicalWidth(Length(150, kFixed));
+  style_->SetLogicalWidth(Length::Fixed(150));
   EXPECT_EQ(LayoutUnit(150), ComputeInlineSizeForFragment());
 
-  style_->SetLogicalWidth(Length(kAuto));
+  style_->SetLogicalWidth(Length::Auto());
   EXPECT_EQ(LayoutUnit(200), ComputeInlineSizeForFragment());
 
-  style_->SetLogicalWidth(Length(kFillAvailable));
+  style_->SetLogicalWidth(Length::FillAvailable());
   EXPECT_EQ(LayoutUnit(200), ComputeInlineSizeForFragment());
 
   style_->SetLogicalWidth(Length(CalculationValue::Create(
@@ -289,23 +289,23 @@
 
   NGConstraintSpace constraint_space =
       ConstructConstraintSpace(120, 120, true, true);
-  style_->SetLogicalWidth(Length(150, kFixed));
+  style_->SetLogicalWidth(Length::Fixed(150));
   EXPECT_EQ(LayoutUnit(120), ComputeInlineSizeForFragment(constraint_space));
 
-  style_->SetLogicalWidth(Length(200, kFixed));
-  style_->SetMaxWidth(Length(80, kPercent));
+  style_->SetLogicalWidth(Length::Fixed(200));
+  style_->SetMaxWidth(Length::Percent(80));
   EXPECT_EQ(LayoutUnit(160), ComputeInlineSizeForFragment());
 
-  style_->SetLogicalWidth(Length(100, kFixed));
-  style_->SetMinWidth(Length(80, kPercent));
+  style_->SetLogicalWidth(Length::Fixed(100));
+  style_->SetMinWidth(Length::Percent(80));
   EXPECT_EQ(LayoutUnit(160), ComputeInlineSizeForFragment());
 
   style_ = ComputedStyle::Create();
-  style_->SetMarginRight(Length(20, kFixed));
+  style_->SetMarginRight(Length::Fixed(20));
   EXPECT_EQ(LayoutUnit(180), ComputeInlineSizeForFragment());
 
-  style_->SetLogicalWidth(Length(100, kFixed));
-  style_->SetPaddingLeft(Length(50, kFixed));
+  style_->SetLogicalWidth(Length::Fixed(100));
+  style_->SetPaddingLeft(Length::Fixed(50));
   EXPECT_EQ(LayoutUnit(150), ComputeInlineSizeForFragment());
 
   style_->SetBoxSizing(EBoxSizing::kBorderBox);
@@ -313,46 +313,46 @@
 
   // Content size should never be below zero, even with box-sizing: border-box
   // and a large padding...
-  style_->SetPaddingLeft(Length(400, kFixed));
+  style_->SetPaddingLeft(Length::Fixed(400));
   EXPECT_EQ(LayoutUnit(400), ComputeInlineSizeForFragment());
   auto sizes_padding400 = sizes;
   sizes_padding400 += LayoutUnit(400);
 
   // ...and the same goes for fill-available with a large padding.
-  style_->SetLogicalWidth(Length(kFillAvailable));
+  style_->SetLogicalWidth(Length::FillAvailable());
   EXPECT_EQ(LayoutUnit(400), ComputeInlineSizeForFragment());
 
   constraint_space = ConstructConstraintSpace(120, 140);
-  style_->SetLogicalWidth(Length(kMinContent));
+  style_->SetLogicalWidth(Length::MinContent());
   EXPECT_EQ(LayoutUnit(430),
             ComputeInlineSizeForFragment(constraint_space, sizes_padding400));
-  style_->SetLogicalWidth(Length(100, kFixed));
-  style_->SetMaxWidth(Length(kMaxContent));
+  style_->SetLogicalWidth(Length::Fixed(100));
+  style_->SetMaxWidth(Length::MaxContent());
   // Due to padding and box-sizing, width computes to 400px and max-width to
   // 440px, so the result is 400.
   EXPECT_EQ(LayoutUnit(400),
             ComputeInlineSizeForFragment(constraint_space, sizes_padding400));
-  style_->SetPaddingLeft(Length(0, kFixed));
+  style_->SetPaddingLeft(Length::Fixed(0));
   EXPECT_EQ(LayoutUnit(40),
             ComputeInlineSizeForFragment(constraint_space, sizes));
 }
 
 TEST_F(NGLengthUtilsTest, testComputeBlockSizeForFragment) {
-  style_->SetLogicalHeight(Length(30, kPercent));
+  style_->SetLogicalHeight(Length::Percent(30));
   EXPECT_EQ(LayoutUnit(90), ComputeBlockSizeForFragment());
 
-  style_->SetLogicalHeight(Length(150, kFixed));
+  style_->SetLogicalHeight(Length::Fixed(150));
   EXPECT_EQ(LayoutUnit(150), ComputeBlockSizeForFragment());
 
-  style_->SetLogicalHeight(Length(kAuto));
+  style_->SetLogicalHeight(Length::Auto());
   EXPECT_EQ(LayoutUnit(0), ComputeBlockSizeForFragment());
 
   NGConstraintSpace constraint_space = ConstructConstraintSpace(200, 300);
-  style_->SetLogicalHeight(Length(kAuto));
+  style_->SetLogicalHeight(Length::Auto());
   EXPECT_EQ(LayoutUnit(120),
             ComputeBlockSizeForFragment(constraint_space, LayoutUnit(120)));
 
-  style_->SetLogicalHeight(Length(kFillAvailable));
+  style_->SetLogicalHeight(Length::FillAvailable());
   EXPECT_EQ(LayoutUnit(300), ComputeBlockSizeForFragment());
 
   style_->SetLogicalHeight(Length(CalculationValue::Create(
@@ -360,24 +360,24 @@
   EXPECT_EQ(LayoutUnit(70), ComputeBlockSizeForFragment());
 
   constraint_space = ConstructConstraintSpace(200, 200, true, true);
-  style_->SetLogicalHeight(Length(150, kFixed));
+  style_->SetLogicalHeight(Length::Fixed(150));
   EXPECT_EQ(LayoutUnit(200), ComputeBlockSizeForFragment(constraint_space));
 
-  style_->SetLogicalHeight(Length(300, kFixed));
-  style_->SetMaxHeight(Length(80, kPercent));
+  style_->SetLogicalHeight(Length::Fixed(300));
+  style_->SetMaxHeight(Length::Percent(80));
   EXPECT_EQ(LayoutUnit(240), ComputeBlockSizeForFragment());
 
-  style_->SetLogicalHeight(Length(100, kFixed));
-  style_->SetMinHeight(Length(80, kPercent));
+  style_->SetLogicalHeight(Length::Fixed(100));
+  style_->SetMinHeight(Length::Percent(80));
   EXPECT_EQ(LayoutUnit(240), ComputeBlockSizeForFragment());
 
   style_ = ComputedStyle::Create();
-  style_->SetMarginTop(Length(20, kFixed));
-  style_->SetLogicalHeight(Length(kFillAvailable));
+  style_->SetMarginTop(Length::Fixed(20));
+  style_->SetLogicalHeight(Length::FillAvailable());
   EXPECT_EQ(LayoutUnit(280), ComputeBlockSizeForFragment());
 
-  style_->SetLogicalHeight(Length(100, kFixed));
-  style_->SetPaddingBottom(Length(50, kFixed));
+  style_->SetLogicalHeight(Length::Fixed(100));
+  style_->SetPaddingBottom(Length::Fixed(50));
   EXPECT_EQ(LayoutUnit(150), ComputeBlockSizeForFragment());
 
   style_->SetBoxSizing(EBoxSizing::kBorderBox);
@@ -385,19 +385,19 @@
 
   // Content size should never be below zero, even with box-sizing: border-box
   // and a large padding...
-  style_->SetPaddingBottom(Length(400, kFixed));
+  style_->SetPaddingBottom(Length::Fixed(400));
   EXPECT_EQ(LayoutUnit(400), ComputeBlockSizeForFragment());
 
   // ...and the same goes for fill-available with a large padding.
-  style_->SetLogicalHeight(Length(kFillAvailable));
+  style_->SetLogicalHeight(Length::FillAvailable());
   EXPECT_EQ(LayoutUnit(400), ComputeBlockSizeForFragment());
 
   // TODO(layout-ng): test {min,max}-content on max-height.
 }
 
 TEST_F(NGLengthUtilsTest, testIndefinitePercentages) {
-  style_->SetMinHeight(Length(20, kFixed));
-  style_->SetHeight(Length(20, kPercent));
+  style_->SetMinHeight(Length::Fixed(20));
+  style_->SetHeight(Length::Percent(20));
 
   EXPECT_EQ(NGSizeIndefinite,
             ComputeBlockSizeForFragment(ConstructConstraintSpace(200, -1),
@@ -411,10 +411,10 @@
 }
 
 TEST_F(NGLengthUtilsTest, testMargins) {
-  style_->SetMarginTop(Length(10, kPercent));
-  style_->SetMarginRight(Length(52, kFixed));
-  style_->SetMarginBottom(Length(kAuto));
-  style_->SetMarginLeft(Length(11, kPercent));
+  style_->SetMarginTop(Length::Percent(10));
+  style_->SetMarginRight(Length::Fixed(52));
+  style_->SetMarginBottom(Length::Auto());
+  style_->SetMarginLeft(Length::Percent(11));
 
   NGConstraintSpace constraint_space = ConstructConstraintSpace(200, 300);
 
@@ -449,10 +449,10 @@
 }
 
 TEST_F(NGLengthUtilsTest, testPadding) {
-  style_->SetPaddingTop(Length(10, kPercent));
-  style_->SetPaddingRight(Length(52, kFixed));
-  style_->SetPaddingBottom(Length(kAuto));
-  style_->SetPaddingLeft(Length(11, kPercent));
+  style_->SetPaddingTop(Length::Percent(10));
+  style_->SetPaddingRight(Length::Fixed(52));
+  style_->SetPaddingBottom(Length::Auto());
+  style_->SetPaddingLeft(Length::Percent(11));
   style_->SetWritingMode(WritingMode::kVerticalRl);
 
   NGConstraintSpace constraint_space = ConstructConstraintSpace(
@@ -467,8 +467,8 @@
 }
 
 TEST_F(NGLengthUtilsTest, testAutoMargins) {
-  style_->SetMarginRight(Length(kAuto));
-  style_->SetMarginLeft(Length(kAuto));
+  style_->SetMarginRight(Length::Auto());
+  style_->SetMarginLeft(Length::Auto());
 
   LayoutUnit kInlineSize(150);
   LayoutUnit kAvailableInlineSize(200);
@@ -482,15 +482,15 @@
   EXPECT_EQ(LayoutUnit(25), margins.inline_start);
   EXPECT_EQ(LayoutUnit(25), margins.inline_end);
 
-  style_->SetMarginLeft(Length(0, kFixed));
+  style_->SetMarginLeft(Length::Fixed(0));
   margins = NGBoxStrut();
   ResolveInlineMargins(*style_, *style_, kAvailableInlineSize, kInlineSize,
                        &margins);
   EXPECT_EQ(LayoutUnit(0), margins.inline_start);
   EXPECT_EQ(LayoutUnit(50), margins.inline_end);
 
-  style_->SetMarginLeft(Length(kAuto));
-  style_->SetMarginRight(Length(0, kFixed));
+  style_->SetMarginLeft(Length::Auto());
+  style_->SetMarginRight(Length::Fixed(0));
   margins = NGBoxStrut();
   ResolveInlineMargins(*style_, *style_, kAvailableInlineSize, kInlineSize,
                        &margins);
@@ -499,8 +499,8 @@
 
   // Test that we don't end up with negative "auto" margins when the box is too
   // big.
-  style_->SetMarginLeft(Length(kAuto));
-  style_->SetMarginRight(Length(5000, kFixed));
+  style_->SetMarginLeft(Length::Auto());
+  style_->SetMarginRight(Length::Fixed(5000));
   margins = NGBoxStrut();
   margins.inline_end = LayoutUnit(5000);
   ResolveInlineMargins(*style_, *style_, kAvailableInlineSize, kInlineSize,
diff --git a/third_party/blink/renderer/core/layout/ng/ng_relative_utils_test.cc b/third_party/blink/renderer/core/layout/ng/ng_relative_utils_test.cc
index f6d93e5..216d0fa 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_relative_utils_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_relative_utils_test.cc
@@ -33,16 +33,13 @@
                LayoutUnit right,
                LayoutUnit bottom,
                LayoutUnit left) {
-    style_->SetTop(top == kAuto ? Length(LengthType::kAuto)
-                                : Length(top.ToInt(), LengthType::kFixed));
-    style_->SetRight(right == kAuto
-                         ? Length(LengthType::kAuto)
-                         : Length(right.ToInt(), LengthType::kFixed));
-    style_->SetBottom(bottom == kAuto
-                          ? Length(LengthType::kAuto)
-                          : Length(bottom.ToInt(), LengthType::kFixed));
-    style_->SetLeft(left == kAuto ? Length(LengthType::kAuto)
-                                  : Length(left.ToInt(), LengthType::kFixed));
+    style_->SetTop(top == kAuto ? Length::Auto() : Length::Fixed(top.ToInt()));
+    style_->SetRight(right == kAuto ? Length::Auto()
+                                    : Length::Fixed(right.ToInt()));
+    style_->SetBottom(bottom == kAuto ? Length::Auto()
+                                      : Length::Fixed(bottom.ToInt()));
+    style_->SetLeft(left == kAuto ? Length::Auto()
+                                  : Length::Fixed(left.ToInt()));
   }
 
   scoped_refptr<ComputedStyle> style_;
diff --git a/third_party/blink/renderer/core/layout/table_layout_algorithm_auto.cc b/third_party/blink/renderer/core/layout/table_layout_algorithm_auto.cc
index 9c08a935..102310bc 100644
--- a/third_party/blink/renderer/core/layout/table_layout_algorithm_auto.cc
+++ b/third_party/blink/renderer/core/layout/table_layout_algorithm_auto.cc
@@ -766,24 +766,28 @@
   // columns then empty columns.
   if (available > 0 && (num_auto || num_auto_empty_cells_only)) {
     available += alloc_auto;
-    if (num_auto)
+    if (num_auto) {
       DistributeWidthToColumns<float, kAuto, kNonEmptyCells, kInitialWidth,
                                kStartToEnd>(available, total_auto);
-    if (num_auto_empty_cells_only)
+    }
+    if (num_auto_empty_cells_only) {
       DistributeWidthToColumns<unsigned, kAuto, kEmptyCells, kInitialWidth,
                                kStartToEnd>(available,
                                             num_auto_empty_cells_only);
+    }
   }
 
   // Any remaining available width expands fixed width, percent width, and
   // non-empty auto width columns, in that order.
-  if (available > 0 && num_fixed)
+  if (available > 0 && num_fixed) {
     DistributeWidthToColumns<float, kFixed, kAllCells, kExtraWidth,
                              kStartToEnd>(available, total_fixed);
+  }
 
-  if (available > 0 && has_percent_ && total_percent < 100)
+  if (available > 0 && has_percent_ && total_percent < 100) {
     DistributeWidthToColumns<float, kPercent, kAllCells, kExtraWidth,
                              kStartToEnd>(available, total_percent);
+  }
 
   if (available > 0 && n_eff_cols > num_auto_empty_cells_only) {
     unsigned total = n_eff_cols - num_auto_empty_cells_only;
diff --git a/third_party/blink/renderer/core/layout/table_layout_algorithm_fixed.cc b/third_party/blink/renderer/core/layout/table_layout_algorithm_fixed.cc
index a29cd3e..ab6ccb2 100644
--- a/third_party/blink/renderer/core/layout/table_layout_algorithm_fixed.cc
+++ b/third_party/blink/renderer/core/layout/table_layout_algorithm_fixed.cc
@@ -82,7 +82,7 @@
   // iterate over all <col> elements
   unsigned n_eff_cols = table_->NumEffectiveColumns();
   width_.resize(n_eff_cols);
-  width_.Fill(Length(kAuto));
+  width_.Fill(Length::Auto());
 
   unsigned current_effective_column = 0;
   for (LayoutTableCol* col = table_->FirstColumn(); col;
diff --git a/third_party/blink/renderer/core/page/viewport_description.cc b/third_party/blink/renderer/core/page/viewport_description.cc
index 36832fb..6b3971df 100644
--- a/third_party/blink/renderer/core/page/viewport_description.cc
+++ b/third_party/blink/renderer/core/page/viewport_description.cc
@@ -65,7 +65,7 @@
   if (length.IsFixed())
     return length.GetFloatValue();
 
-  if (length.GetType() == kExtendToZoom)
+  if (length.IsExtendToZoom())
     return ViewportDescription::kValueExtendToZoom;
 
   if (length.IsPercent() && direction == kHorizontal)
@@ -74,10 +74,10 @@
   if (length.IsPercent() && direction == kVertical)
     return initial_viewport_size.Height() * length.GetFloatValue() / 100.0f;
 
-  if (length.GetType() == kDeviceWidth)
+  if (length.IsDeviceWidth())
     return initial_viewport_size.Width();
 
-  if (length.GetType() == kDeviceHeight)
+  if (length.IsDeviceHeight())
     return initial_viewport_size.Height();
 
   NOTREACHED();
@@ -97,11 +97,11 @@
     // setting the 'min' value to 'extend-to-zoom' and the 'max' value to the
     // intended length.  In case the UA-defines a min-width, use that as length.
     if (zoom == ViewportDescription::kValueAuto) {
-      copy_min_width = Length(kExtendToZoom);
+      copy_min_width = Length::ExtendToZoom();
       copy_max_width = legacy_fallback_width;
     } else if (max_height.IsAuto()) {
-      copy_min_width = Length(kExtendToZoom);
-      copy_max_width = Length(kExtendToZoom);
+      copy_min_width = Length::ExtendToZoom();
+      copy_max_width = Length::ExtendToZoom();
     }
   }
 
@@ -283,8 +283,7 @@
         overview_zoom_histogram.Sample(overview_zoom_percent);
       }
 
-    } else if (max_width.GetType() == blink::kDeviceWidth ||
-               max_width.GetType() == blink::kExtendToZoom) {
+    } else if (max_width.IsDeviceWidth() || max_width.IsExtendToZoom()) {
       meta_tag_type_histogram.Count(
           static_cast<int>(ViewportUMAType::kDeviceWidth));
     } else {
diff --git a/third_party/blink/renderer/core/page/viewport_test.cc b/third_party/blink/renderer/core/page/viewport_test.cc
index f5b7d91..da9ab8d 100644
--- a/third_party/blink/renderer/core/page/viewport_test.cc
+++ b/third_party/blink/renderer/core/page/viewport_test.cc
@@ -104,8 +104,8 @@
       ->View()
       ->SetFrameRect(IntRect(IntPoint::Zero(), initial_viewport_size));
   ViewportDescription description = page->GetViewportDescription();
-  PageScaleConstraints constraints = description.Resolve(
-      FloatSize(initial_viewport_size), Length(980, blink::kFixed));
+  PageScaleConstraints constraints =
+      description.Resolve(FloatSize(initial_viewport_size), Length::Fixed(980));
 
   constraints.FitToContentsWidth(constraints.layout_size.Width(),
                                  initial_width);
diff --git a/third_party/blink/renderer/core/paint/nine_piece_image_grid_test.cc b/third_party/blink/renderer/core/paint/nine_piece_image_grid_test.cc
index 4089594..2dd2fa1 100644
--- a/third_party/blink/renderer/core/paint/nine_piece_image_grid_test.cc
+++ b/third_party/blink/renderer/core/paint/nine_piece_image_grid_test.cc
@@ -159,7 +159,7 @@
   // where the resulting width in the non-overlapping dimension will round to a
   // larger width.
   BorderImageLength top_bottom(10);
-  BorderImageLength left_right(Length(11, kFixed));
+  BorderImageLength left_right(Length::Fixed(11));
   nine_piece.SetBorderSlices(
       BorderImageLengthBox(top_bottom, left_right, top_bottom, left_right));
   grid = NinePieceImageGrid(nine_piece, image_size, border_image_area,
@@ -202,8 +202,8 @@
        IntRect(0, 0, 100, 100),
        IntRectOutsets(0, 0, 0, 0),
        true,
-       LengthBox(Length(0, kFixed), Length(0, kFixed), Length(0, kFixed),
-                 Length(0, kFixed)),
+       LengthBox(Length::Fixed(0), Length::Fixed(0), Length::Fixed(0),
+                 Length::Fixed(0)),
        kStretchImageRule,
        kStretchImageRule,
        {
@@ -231,8 +231,8 @@
        IntRect(0, 0, 100, 100),
        IntRectOutsets(0, 0, 10, 0),
        true,
-       LengthBox(Length(20, kPercent), Length(20, kPercent),
-                 Length(20, kPercent), Length(20, kPercent)),
+       LengthBox(Length::Percent(20), Length::Percent(20), Length::Percent(20),
+                 Length::Percent(20)),
        kStretchImageRule,
        kStretchImageRule,
        {
@@ -260,8 +260,8 @@
        IntRect(0, 0, 100, 100),
        IntRectOutsets(10, 10, 10, 10),
        false,
-       LengthBox(Length(20, kPercent), Length(20, kPercent),
-                 Length(20, kPercent), Length(20, kPercent)),
+       LengthBox(Length::Percent(20), Length::Percent(20), Length::Percent(20),
+                 Length::Percent(20)),
        kStretchImageRule,
        kStretchImageRule,
        {
@@ -289,8 +289,8 @@
        IntRect(0, 0, 100, 100),
        IntRectOutsets(0, 0, 0, 10),
        false,
-       LengthBox(Length(20, kPercent), Length(20, kPercent),
-                 Length(20, kPercent), Length(20, kPercent)),
+       LengthBox(Length::Percent(20), Length::Percent(20), Length::Percent(20),
+                 Length::Percent(20)),
        kStretchImageRule,
        kRoundImageRule,
        {
@@ -319,8 +319,8 @@
        IntRect(0, 0, 100, 100),
        IntRectOutsets(10, 10, 10, 10),
        true,
-       LengthBox(Length(0, kFixed), Length(0, kFixed), Length(0, kFixed),
-                 Length(0, kFixed)),
+       LengthBox(Length::Fixed(0), Length::Fixed(0), Length::Fixed(0),
+                 Length::Fixed(0)),
        kStretchImageRule,
        kSpaceImageRule,
        {
diff --git a/third_party/blink/renderer/core/style/basic_shapes.h b/third_party/blink/renderer/core/style/basic_shapes.h
index 8fceef9..986af2c 100644
--- a/third_party/blink/renderer/core/style/basic_shapes.h
+++ b/third_party/blink/renderer/core/style/basic_shapes.h
@@ -84,7 +84,7 @@
   enum Direction { kTopLeft, kBottomRight };
 
   BasicShapeCenterCoordinate(Direction direction = kTopLeft,
-                             const Length& length = Length(0, kFixed))
+                             const Length& length = Length::Fixed(0))
       : direction_(direction),
         length_(length),
         computed_length_(direction == kTopLeft
diff --git a/third_party/blink/renderer/core/style/computed_style.cc b/third_party/blink/renderer/core/style/computed_style.cc
index aa7fe0c..44f00c3 100644
--- a/third_party/blink/renderer/core/style/computed_style.cc
+++ b/third_party/blink/renderer/core/style/computed_style.cc
@@ -1820,9 +1820,8 @@
   // too, though this involves messily poking into CalcExpressionLength.
   if (lh.IsFixed()) {
     float multiplier = TextAutosizingMultiplier();
-    return Length(TextAutosizer::ComputeAutosizedFontSize(
-                      lh.Value(), multiplier, EffectiveZoom()),
-                  kFixed);
+    return Length::Fixed(TextAutosizer::ComputeAutosizedFontSize(
+        lh.Value(), multiplier, EffectiveZoom()));
   }
 
   return lh;
diff --git a/third_party/blink/renderer/core/style/computed_style.h b/third_party/blink/renderer/core/style/computed_style.h
index 90ddc39..5b846a1 100644
--- a/third_party/blink/renderer/core/style/computed_style.h
+++ b/third_party/blink/renderer/core/style/computed_style.h
@@ -1491,10 +1491,10 @@
            !PaddingTop().IsZero() || !PaddingBottom().IsZero();
   }
   void ResetPadding() {
-    SetPaddingTop(Length(kFixed));
-    SetPaddingBottom(Length(kFixed));
-    SetPaddingLeft(Length(kFixed));
-    SetPaddingRight(Length(kFixed));
+    SetPaddingTop(Length::Fixed());
+    SetPaddingBottom(Length::Fixed());
+    SetPaddingLeft(Length::Fixed());
+    SetPaddingRight(Length::Fixed());
   }
   void SetPadding(const LengthBox& b) {
     SetPaddingTop(b.top_);
@@ -1786,7 +1786,7 @@
   }
   void SetBorderRadius(const IntSize& s) {
     SetBorderRadius(
-        LengthSize(Length(s.Width(), kFixed), Length(s.Height(), kFixed)));
+        LengthSize(Length::Fixed(s.Width()), Length::Fixed(s.Height())));
   }
 
   FloatRoundedRect GetRoundedBorderFor(
diff --git a/third_party/blink/renderer/core/style/fill_layer.h b/third_party/blink/renderer/core/style/fill_layer.h
index da0b2ce..9502f6e 100644
--- a/third_party/blink/renderer/core/style/fill_layer.h
+++ b/third_party/blink/renderer/core/style/fill_layer.h
@@ -283,10 +283,10 @@
     return FillSize(InitialFillSizeType(type), InitialFillSizeLength(type));
   }
   static Length InitialFillPositionX(EFillLayerType) {
-    return Length(0.0, kPercent);
+    return Length::Percent(0.0);
   }
   static Length InitialFillPositionY(EFillLayerType) {
-    return Length(0.0, kPercent);
+    return Length::Percent(0.0);
   }
   static StyleImage* InitialFillImage(EFillLayerType) { return nullptr; }
   static EMaskSourceType InitialFillMaskSourceType(EFillLayerType) {
diff --git a/third_party/blink/renderer/core/style/filter_operations_test.cc b/third_party/blink/renderer/core/style/filter_operations_test.cc
index 076a1e3a4..6682791 100644
--- a/third_party/blink/renderer/core/style/filter_operations_test.cc
+++ b/third_party/blink/renderer/core/style/filter_operations_test.cc
@@ -38,7 +38,7 @@
 
 TEST(FilterOperationsTest, mapRectBlur) {
   FilterOperations ops;
-  ops.Operations().push_back(BlurFilterOperation::Create(Length(20.0, kFixed)));
+  ops.Operations().push_back(BlurFilterOperation::Create(Length::Fixed(20.0)));
   EXPECT_TRUE(ops.HasFilterThatMovesPixels());
   EXPECT_EQ(IntRect(-57, -57, 124, 124),
             EnclosingIntRect(ops.MapRect(FloatRect(0, 0, 10, 10))));
diff --git a/third_party/blink/renderer/core/style/grid_track_size.h b/third_party/blink/renderer/core/style/grid_track_size.h
index 6c4821e..76298bf7 100644
--- a/third_party/blink/renderer/core/style/grid_track_size.h
+++ b/third_party/blink/renderer/core/style/grid_track_size.h
@@ -62,13 +62,15 @@
   GridTrackSize(const GridLength& length,
                 GridTrackSizeType track_size_type = kLengthTrackSizing)
       : type_(track_size_type),
-        min_track_breadth_(
-            track_size_type == kFitContentTrackSizing ? Length(kAuto) : length),
-        max_track_breadth_(
-            track_size_type == kFitContentTrackSizing ? Length(kAuto) : length),
+        min_track_breadth_(track_size_type == kFitContentTrackSizing
+                               ? Length::Auto()
+                               : length),
+        max_track_breadth_(track_size_type == kFitContentTrackSizing
+                               ? Length::Auto()
+                               : length),
         fit_content_track_breadth_(track_size_type == kFitContentTrackSizing
                                        ? length
-                                       : GridLength(Length(kFixed))) {
+                                       : GridLength(Length::Fixed())) {
     DCHECK(track_size_type == kLengthTrackSizing ||
            track_size_type == kFitContentTrackSizing);
     DCHECK(track_size_type != kFitContentTrackSizing || length.IsLength());
@@ -80,7 +82,7 @@
       : type_(kMinMaxTrackSizing),
         min_track_breadth_(min_track_breadth),
         max_track_breadth_(max_track_breadth),
-        fit_content_track_breadth_(GridLength(Length(kFixed))) {
+        fit_content_track_breadth_(GridLength(Length::Fixed())) {
     CacheMinMaxTrackBreadthTypes();
   }
 
diff --git a/third_party/blink/renderer/core/style/nine_piece_image.cc b/third_party/blink/renderer/core/style/nine_piece_image.cc
index c8915be..07c6317b 100644
--- a/third_party/blink/renderer/core/style/nine_piece_image.cc
+++ b/third_party/blink/renderer/core/style/nine_piece_image.cc
@@ -59,15 +59,15 @@
       horizontal_rule(kStretchImageRule),
       vertical_rule(kStretchImageRule),
       image(nullptr),
-      image_slices(Length(100, kPercent),
-                   Length(100, kPercent),
-                   Length(100, kPercent),
-                   Length(100, kPercent)),
+      image_slices(Length::Percent(100),
+                   Length::Percent(100),
+                   Length::Percent(100),
+                   Length::Percent(100)),
       border_slices(1.0, 1.0, 1.0, 1.0),
-      outset(Length(0, kFixed),
-             Length(0, kFixed),
-             Length(0, kFixed),
-             Length(0, kFixed)) {}
+      outset(Length::Fixed(0),
+             Length::Fixed(0),
+             Length::Fixed(0),
+             Length::Fixed(0)) {}
 
 bool NinePieceImageData::operator==(const NinePieceImageData& other) const {
   return DataEquivalent(image, other.image) &&
diff --git a/third_party/blink/renderer/core/style/nine_piece_image.h b/third_party/blink/renderer/core/style/nine_piece_image.h
index 564b2bd..d2a26d3 100644
--- a/third_party/blink/renderer/core/style/nine_piece_image.h
+++ b/third_party/blink/renderer/core/style/nine_piece_image.h
@@ -87,7 +87,7 @@
     NinePieceImage image;
     image.data_.Access()->image_slices = LengthBox(0);
     image.data_.Access()->fill = true;
-    image.data_.Access()->border_slices = BorderImageLengthBox(Length(kAuto));
+    image.data_.Access()->border_slices = BorderImageLengthBox(Length::Auto());
     return image;
   }
 
diff --git a/third_party/blink/renderer/core/style/svg_computed_style.h b/third_party/blink/renderer/core/style/svg_computed_style.h
index c0d4aac..7bb051e 100644
--- a/third_party/blink/renderer/core/style/svg_computed_style.h
+++ b/third_party/blink/renderer/core/style/svg_computed_style.h
@@ -64,7 +64,7 @@
   static EAlignmentBaseline InitialAlignmentBaseline() { return AB_AUTO; }
   static EDominantBaseline InitialDominantBaseline() { return DB_AUTO; }
   static EBaselineShift InitialBaselineShift() { return BS_LENGTH; }
-  static Length InitialBaselineShiftValue() { return Length(kFixed); }
+  static Length InitialBaselineShiftValue() { return Length::Fixed(); }
   static EVectorEffect InitialVectorEffect() { return VE_NONE; }
   static EBufferedRendering InitialBufferedRendering() { return BR_AUTO; }
   static LineCap InitialCapStyle() { return kButtCap; }
@@ -83,10 +83,10 @@
   static float InitialStrokeOpacity() { return 1; }
   static SVGPaint InitialStrokePaint() { return SVGPaint(); }
   static scoped_refptr<SVGDashArray> InitialStrokeDashArray();
-  static Length InitialStrokeDashOffset() { return Length(kFixed); }
+  static Length InitialStrokeDashOffset() { return Length::Fixed(); }
   static float InitialStrokeMiterLimit() { return 4; }
   static UnzoomedLength InitialStrokeWidth() {
-    return UnzoomedLength(Length(1, kFixed));
+    return UnzoomedLength(Length::Fixed(1));
   }
   static float InitialStopOpacity() { return 1; }
   static Color InitialStopColor() { return Color(0, 0, 0); }
@@ -100,13 +100,13 @@
   static EMaskType InitialMaskType() { return MT_LUMINANCE; }
   static EPaintOrder InitialPaintOrder() { return kPaintOrderNormal; }
   static StylePath* InitialD() { return nullptr; }
-  static Length InitialCx() { return Length(kFixed); }
-  static Length InitialCy() { return Length(kFixed); }
-  static Length InitialX() { return Length(kFixed); }
-  static Length InitialY() { return Length(kFixed); }
-  static Length InitialR() { return Length(kFixed); }
-  static Length InitialRx() { return Length(kAuto); }
-  static Length InitialRy() { return Length(kAuto); }
+  static Length InitialCx() { return Length::Fixed(); }
+  static Length InitialCy() { return Length::Fixed(); }
+  static Length InitialX() { return Length::Fixed(); }
+  static Length InitialY() { return Length::Fixed(); }
+  static Length InitialR() { return Length::Fixed(); }
+  static Length InitialRx() { return Length::Auto(); }
+  static Length InitialRy() { return Length::Auto(); }
 
   // SVG CSS Property setters
   void SetAlignmentBaseline(EAlignmentBaseline val) {
diff --git a/third_party/blink/renderer/platform/animation/animation_translation_util_test.cc b/third_party/blink/renderer/platform/animation/animation_translation_util_test.cc
index 2a15f39..e01115c 100644
--- a/third_party/blink/renderer/platform/animation/animation_translation_util_test.cc
+++ b/third_party/blink/renderer/platform/animation/animation_translation_util_test.cc
@@ -40,7 +40,7 @@
   CompositorTransformOperations out_ops;
 
   ops.Operations().push_back(TranslateTransformOperation::Create(
-      Length(2, kFixed), Length(0, kFixed), TransformOperation::kTranslateX));
+      Length::Fixed(2), Length::Fixed(0), TransformOperation::kTranslateX));
   ops.Operations().push_back(RotateTransformOperation::Create(
       0.1, 0.2, 0.3, 200000.4, TransformOperation::kRotate3D));
   ops.Operations().push_back(ScaleTransformOperation::Create(
diff --git a/third_party/blink/renderer/platform/geometry/length.cc b/third_party/blink/renderer/platform/geometry/length.cc
index da185538..daa3501f 100644
--- a/third_party/blink/renderer/platform/geometry/length.cc
+++ b/third_party/blink/renderer/platform/geometry/length.cc
@@ -140,14 +140,14 @@
   if (result.pixels && result.percent)
     return Length(CalculationValue::Create(result, kValueRangeAll));
   if (result.percent)
-    return Length(result.percent, kPercent);
-  return Length(result.pixels, kFixed);
+    return Length::Percent(result.percent);
+  return Length::Fixed(result.pixels);
 }
 
 Length Length::Zoom(double factor) const {
   switch (GetType()) {
     case kFixed:
-      return Length(GetFloatValue() * factor, kFixed);
+      return Length::Fixed(GetFloatValue() * factor);
     case kCalculated: {
       PixelsAndPercent result = GetPixelsAndPercent();
       result.pixels *= factor;
diff --git a/third_party/blink/renderer/platform/geometry/length.h b/third_party/blink/renderer/platform/geometry/length.h
index c8d5b02..56c9073 100644
--- a/third_party/blink/renderer/platform/geometry/length.h
+++ b/third_party/blink/renderer/platform/geometry/length.h
@@ -132,6 +132,25 @@
     return *this;
   }
 
+  template <typename NUMBER_TYPE>
+  static Length Fixed(NUMBER_TYPE number) {
+    return Length(number, kFixed);
+  }
+  static Length Fixed() { return Length(kFixed); }
+  static Length Auto() { return Length(kAuto); }
+  static Length FillAvailable() { return Length(kFillAvailable); }
+  static Length MinContent() { return Length(kMinContent); }
+  static Length MaxContent() { return Length(kMaxContent); }
+  static Length ExtendToZoom() { return Length(kExtendToZoom); }
+  static Length DeviceWidth() { return Length(kDeviceWidth); }
+  static Length DeviceHeight() { return Length(kDeviceHeight); }
+  static Length MaxSizeNone() { return Length(kMaxSizeNone); }
+  static Length FitContent() { return Length(kFitContent); }
+  template <typename NUMBER_TYPE>
+  static Length Percent(NUMBER_TYPE number) {
+    return Length(number, kPercent);
+  }
+
   // FIXME: Make this private (if possible) or at least rename it
   // (http://crbug.com/432707).
   inline float Value() const {
@@ -192,7 +211,7 @@
     is_float_ = true;
   }
 
-  void SetValue(float value) { *this = Length(value, kFixed); }
+  void SetValue(float value) { *this = Length::Fixed(value); }
 
   bool IsMaxSizeNone() const { return GetType() == kMaxSizeNone; }
 
@@ -244,6 +263,9 @@
   bool IsPercentOrCalc() const {
     return GetType() == kPercent || GetType() == kCalculated;
   }
+  bool IsExtendToZoom() const { return GetType() == kExtendToZoom; }
+  bool IsDeviceWidth() const { return GetType() == kDeviceWidth; }
+  bool IsDeviceHeight() const { return GetType() == kDeviceHeight; }
 
   Length Blend(const Length& from, double progress, ValueRange range) const {
     DCHECK(IsSpecified());
diff --git a/third_party/blink/renderer/platform/geometry/length_box.h b/third_party/blink/renderer/platform/geometry/length_box.h
index f8008943..b526a0a 100644
--- a/third_party/blink/renderer/platform/geometry/length_box.h
+++ b/third_party/blink/renderer/platform/geometry/length_box.h
@@ -37,19 +37,19 @@
   LengthBox(LengthType t) : left_(t), right_(t), top_(t), bottom_(t) {}
 
   LengthBox(int v)
-      : left_(Length(v, kFixed)),
-        right_(Length(v, kFixed)),
-        top_(Length(v, kFixed)),
-        bottom_(Length(v, kFixed)) {}
+      : left_(Length::Fixed(v)),
+        right_(Length::Fixed(v)),
+        top_(Length::Fixed(v)),
+        bottom_(Length::Fixed(v)) {}
 
   LengthBox(const Length& t, const Length& r, const Length& b, const Length& l)
       : left_(l), right_(r), top_(t), bottom_(b) {}
 
   LengthBox(int t, int r, int b, int l)
-      : left_(Length(l, kFixed)),
-        right_(Length(r, kFixed)),
-        top_(Length(t, kFixed)),
-        bottom_(Length(b, kFixed)) {}
+      : left_(Length::Fixed(l)),
+        right_(Length::Fixed(r)),
+        top_(Length::Fixed(t)),
+        bottom_(Length::Fixed(b)) {}
 
   const Length& Left() const { return left_; }
   const Length& Right() const { return right_; }
diff --git a/third_party/blink/renderer/platform/mac/theme_mac.mm b/third_party/blink/renderer/platform/mac/theme_mac.mm
index da06b3a..bb48e46 100644
--- a/third_party/blink/renderer/platform/mac/theme_mac.mm
+++ b/third_party/blink/renderer/platform/mac/theme_mac.mm
@@ -82,9 +82,9 @@
                            control_size.Height() * zoom_factor);
   LengthSize result = zoomed_size;
   if (zoomed_size.Width().IsIntrinsicOrAuto() && control_size.Width() > 0)
-    result.SetWidth(Length(control_size.Width(), kFixed));
+    result.SetWidth(Length::Fixed(control_size.Width()));
   if (zoomed_size.Height().IsIntrinsicOrAuto() && control_size.Height() > 0)
-    result.SetHeight(Length(control_size.Height(), kFixed));
+    result.SetHeight(Length::Fixed(control_size.Height()));
   return result;
 }
 
@@ -436,13 +436,13 @@
   switch (part) {
     case kSquareButtonPart:
     case kButtonPart:
-      return LengthSize(Length(0, kFixed),
-                        Length(static_cast<int>(15 * zoom_factor), kFixed));
+      return LengthSize(Length::Fixed(0),
+                        Length::Fixed(static_cast<int>(15 * zoom_factor)));
     case kInnerSpinButtonPart: {
       IntSize base = StepperSizes()[NSMiniControlSize];
       return LengthSize(
-          Length(static_cast<int>(base.Width() * zoom_factor), kFixed),
-          Length(static_cast<int>(base.Height() * zoom_factor), kFixed));
+          Length::Fixed(static_cast<int>(base.Width() * zoom_factor)),
+          Length::Fixed(static_cast<int>(base.Height() * zoom_factor)));
     }
     default:
       return Theme::MinimumControlSize(part, font_description, zoom_factor);
diff --git a/third_party/blink/renderer/platform/theme.h b/third_party/blink/renderer/platform/theme.h
index 9b017dc..8f64d95 100644
--- a/third_party/blink/renderer/platform/theme.h
+++ b/third_party/blink/renderer/platform/theme.h
@@ -112,7 +112,7 @@
   virtual LengthSize MinimumControlSize(ControlPart,
                                         const FontDescription&,
                                         float /*zoomFactor*/) const {
-    return LengthSize(Length(0, kFixed), Length(0, kFixed));
+    return LengthSize(Length::Fixed(0), Length::Fixed(0));
   }
 
   // Allows the theme to modify the existing padding/border.
diff --git a/third_party/blink/renderer/platform/transforms/transform_operations_test.cc b/third_party/blink/renderer/platform/transforms/transform_operations_test.cc
index 95c6800..45ac39a 100644
--- a/third_party/blink/renderer/platform/transforms/transform_operations_test.cc
+++ b/third_party/blink/renderer/platform/transforms/transform_operations_test.cc
@@ -77,10 +77,10 @@
   TransformOperations from_ops;
   TransformOperations to_ops;
   from_ops.Operations().push_back(TranslateTransformOperation::Create(
-      Length(-30, blink::kFixed), Length(20, blink::kFixed), 15,
+      Length::Fixed(-30), Length::Fixed(20), 15,
       TransformOperation::kTranslate3D));
   to_ops.Operations().push_back(TranslateTransformOperation::Create(
-      Length(10, blink::kFixed), Length(10, blink::kFixed), 200,
+      Length::Fixed(10), Length::Fixed(10), 200,
       TransformOperation::kTranslate3D));
   FloatBox box(0, 0, 0, 10, 10, 10);
   FloatBox bounds;
@@ -124,13 +124,13 @@
       TransformOperations from_ops;
       TransformOperations to_ops;
       from_ops.Operations().push_back(TranslateTransformOperation::Create(
-          Length(test_transforms[i][0][0], blink::kFixed),
-          Length(test_transforms[i][0][1], blink::kFixed),
-          test_transforms[i][0][2], TransformOperation::kTranslate3D));
+          Length::Fixed(test_transforms[i][0][0]),
+          Length::Fixed(test_transforms[i][0][1]), test_transforms[i][0][2],
+          TransformOperation::kTranslate3D));
       to_ops.Operations().push_back(TranslateTransformOperation::Create(
-          Length(test_transforms[i][1][0], blink::kFixed),
-          Length(test_transforms[i][1][1], blink::kFixed),
-          test_transforms[i][1][2], TransformOperation::kTranslate3D));
+          Length::Fixed(test_transforms[i][1][0]),
+          Length::Fixed(test_transforms[i][1][1]), test_transforms[i][1][2],
+          TransformOperation::kTranslate3D));
       EmpiricallyTestBounds(from_ops, to_ops, progress[j][0], progress[j][1]);
     }
   }
@@ -187,13 +187,13 @@
       TransformOperations from_ops;
       TransformOperations to_ops;
       from_ops.Operations().push_back(TranslateTransformOperation::Create(
-          Length(test_transforms[i][0][0], blink::kFixed),
-          Length(test_transforms[i][0][1], blink::kFixed),
-          test_transforms[i][0][2], TransformOperation::kTranslate3D));
+          Length::Fixed(test_transforms[i][0][0]),
+          Length::Fixed(test_transforms[i][0][1]), test_transforms[i][0][2],
+          TransformOperation::kTranslate3D));
       to_ops.Operations().push_back(TranslateTransformOperation::Create(
-          Length(test_transforms[i][1][0], blink::kFixed),
-          Length(test_transforms[i][1][1], blink::kFixed),
-          test_transforms[i][1][2], TransformOperation::kTranslate3D));
+          Length::Fixed(test_transforms[i][1][0]),
+          Length::Fixed(test_transforms[i][1][1]), test_transforms[i][1][2],
+          TransformOperation::kTranslate3D));
       EmpiricallyTestBounds(from_ops, to_ops, progress[j][0], progress[j][1]);
     }
   }
@@ -475,21 +475,21 @@
   TransformOperations to_ops;
 
   from_ops.Operations().push_back(
-      TranslateTransformOperation::Create(Length(1, kFixed), Length(-5, kFixed),
+      TranslateTransformOperation::Create(Length::Fixed(1), Length::Fixed(-5),
                                           1, TransformOperation::kTranslate3D));
   from_ops.Operations().push_back(
       ScaleTransformOperation::Create(-1, 2, 3, TransformOperation::kScale3D));
   from_ops.Operations().push_back(TranslateTransformOperation::Create(
-      Length(2, kFixed), Length(4, kFixed), -1,
+      Length::Fixed(2), Length::Fixed(4), -1,
       TransformOperation::kTranslate3D));
 
-  to_ops.Operations().push_back(TranslateTransformOperation::Create(
-      Length(13, kFixed), Length(-1, kFixed), 5,
-      TransformOperation::kTranslate3D));
+  to_ops.Operations().push_back(
+      TranslateTransformOperation::Create(Length::Fixed(13), Length::Fixed(-1),
+                                          5, TransformOperation::kTranslate3D));
   to_ops.Operations().push_back(
       ScaleTransformOperation::Create(-3, -2, 5, TransformOperation::kScale3D));
   to_ops.Operations().push_back(
-      TranslateTransformOperation::Create(Length(6, kFixed), Length(-2, kFixed),
+      TranslateTransformOperation::Create(Length::Fixed(6), Length::Fixed(-2),
                                           3, TransformOperation::kTranslate3D));
 
   FloatBox box(1, 2, 3, 4, 4, 4);
@@ -520,9 +520,8 @@
   FloatPoint3D original_point(2, 3, 4);
 
   TransformOperations ops;
-  ops.Operations().push_back(
-      TranslateTransformOperation::Create(Length(1, kFixed), Length(2, kFixed),
-                                          3, TransformOperation::kTranslate3D));
+  ops.Operations().push_back(TranslateTransformOperation::Create(
+      Length::Fixed(1), Length::Fixed(2), 3, TransformOperation::kTranslate3D));
   ops.Operations().push_back(PerspectiveTransformOperation::Create(1234));
   ops.Operations().push_back(
       Matrix3DTransformOperation::Create(TransformationMatrix(
diff --git a/third_party/blink/renderer/platform/transforms/translate_transform_operation.cc b/third_party/blink/renderer/platform/transforms/translate_transform_operation.cc
index aaf95cd..e7280ef 100644
--- a/third_party/blink/renderer/platform/transforms/translate_transform_operation.cc
+++ b/third_party/blink/renderer/platform/transforms/translate_transform_operation.cc
@@ -32,7 +32,7 @@
   if (from && !from->CanBlendWith(*this))
     return this;
 
-  const Length zero_length(0, kFixed);
+  const Length zero_length = Length::Fixed(0);
   if (blend_to_identity) {
     return TranslateTransformOperation::Create(
         zero_length.Blend(x_, progress, kValueRangeAll),