Move CSSReflectionDirection into RenderStyleConstants as ReflectionDirection
https://bugs.webkit.org/show_bug.cgi?id=202886

Reviewed by Sam Weinig.

Make CSSReflectionDirection an enum class ReflectionDirection, and fix the usage sites.

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForReflection):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ReflectionDirection const):
(WebCore::CSSPrimitiveValue::operator CSSReflectionDirection const): Deleted.
* css/CSSReflectionDirection.h: Removed.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::reflectionOffset const):
(WebCore::RenderBox::reflectedRect const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleReflection.h:
(WebCore::StyleReflection::direction const):
(WebCore::StyleReflection::setDirection):
(WebCore::StyleReflection::StyleReflection):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 9d82fb8..0e985aa 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,36 @@
 2019-10-12  Simon Fraser  <simon.fraser@apple.com>
 
+        Move CSSReflectionDirection into RenderStyleConstants as ReflectionDirection
+        https://bugs.webkit.org/show_bug.cgi?id=202886
+
+        Reviewed by Sam Weinig.
+
+        Make CSSReflectionDirection an enum class ReflectionDirection, and fix the usage sites.
+
+        * Headers.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForReflection):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator ReflectionDirection const):
+        (WebCore::CSSPrimitiveValue::operator CSSReflectionDirection const): Deleted.
+        * css/CSSReflectionDirection.h: Removed.
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::reflectionOffset const):
+        (WebCore::RenderBox::reflectedRect const):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects const):
+        * rendering/style/RenderStyleConstants.cpp:
+        (WebCore::operator<<):
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleReflection.h:
+        (WebCore::StyleReflection::direction const):
+        (WebCore::StyleReflection::setDirection):
+        (WebCore::StyleReflection::StyleReflection):
+
+2019-10-12  Simon Fraser  <simon.fraser@apple.com>
+
         Fix the spelling of ThreeDDarkDhasowColor and unwrap the ThemeType enums
         https://bugs.webkit.org/show_bug.cgi?id=202887
 
diff --git a/Source/WebCore/Headers.cmake b/Source/WebCore/Headers.cmake
index 078a566..ae81fb5 100644
--- a/Source/WebCore/Headers.cmake
+++ b/Source/WebCore/Headers.cmake
@@ -306,7 +306,6 @@
     css/CSSPrimitiveValue.h
     css/CSSPrimitiveValueMappings.h
     css/CSSProperty.h
-    css/CSSReflectionDirection.h
     css/CSSRegisteredCustomProperty.h
     css/CSSRule.h
     css/CSSRuleList.h
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index 5c935db..545ad58 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2613,7 +2613,6 @@
 		935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 935F45410F7C3B5F00D7C1FB /* JSLazyEventListener.h */; };
 		935FBC4509BA00B900E230B1 /* EventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 935FBC4409BA00B900E230B1 /* EventListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		935FBCF209BA143B00E230B1 /* ExceptionCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 935FBCF109BA143B00E230B1 /* ExceptionCode.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		9362640B0DE1137D009D5A00 /* CSSReflectionDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9362640A0DE1137D009D5A00 /* CSSReflectionDirection.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		9370918D1416D86B00477333 /* textAreaResizeCorner@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9370918C1416D86B00477333 /* textAreaResizeCorner@2x.png */; };
 		9377ABA015DEFEEF0031FD04 /* Pagination.h in Headers */ = {isa = PBXBuildFile; fileRef = 9377AB9F15DEFEEF0031FD04 /* Pagination.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		937FF3D51A1012D6008EBA31 /* DictionaryLookup.h in Headers */ = {isa = PBXBuildFile; fileRef = 937FF3D41A1012D6008EBA31 /* DictionaryLookup.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -10584,7 +10583,6 @@
 		935F45410F7C3B5F00D7C1FB /* JSLazyEventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSLazyEventListener.h; sourceTree = "<group>"; };
 		935FBC4409BA00B900E230B1 /* EventListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventListener.h; sourceTree = "<group>"; };
 		935FBCF109BA143B00E230B1 /* ExceptionCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionCode.h; sourceTree = "<group>"; };
-		9362640A0DE1137D009D5A00 /* CSSReflectionDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSReflectionDirection.h; sourceTree = "<group>"; };
 		936B21F41DBBF8300052E117 /* CanvasPath.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = CanvasPath.idl; sourceTree = "<group>"; };
 		936DD03A09CEAC270056AE8C /* Range.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Range.idl; sourceTree = "<group>"; };
 		9370918C1416D86B00477333 /* textAreaResizeCorner@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "textAreaResizeCorner@2x.png"; sourceTree = "<group>"; };
@@ -26989,7 +26987,6 @@
 				A80E6CD50A1989CA007FB8C5 /* CSSProperty.h */,
 				82E3D8DC122EA0D1003AE5BC /* CSSPropertySourceData.cpp */,
 				82E3D8DD122EA0D1003AE5BC /* CSSPropertySourceData.h */,
-				9362640A0DE1137D009D5A00 /* CSSReflectionDirection.h */,
 				BC5A12DD0DC0414800C9AFAD /* CSSReflectValue.cpp */,
 				BC5A12DE0DC0414800C9AFAD /* CSSReflectValue.h */,
 				4B1706642162B42F00E578BB /* CSSRegisteredCustomProperty.cpp */,
@@ -29069,7 +29066,6 @@
 				949C77051D6E39EA00C0DE4F /* CSSPropertyParserHelpers.h in Headers */,
 				82E3D8DF122EA0D1003AE5BC /* CSSPropertySourceData.h in Headers */,
 				FE271F672082DBE500A952D4 /* CSSPtrTag.h in Headers */,
-				9362640B0DE1137D009D5A00 /* CSSReflectionDirection.h in Headers */,
 				BC5A12E00DC0414800C9AFAD /* CSSReflectValue.h in Headers */,
 				4BDA40012151B6F500FD6604 /* CSSRegisteredCustomProperty.h in Headers */,
 				BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */,
diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
index b2c2b41..721b1c3 100644
--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -659,16 +659,16 @@
 
     RefPtr<CSSPrimitiveValue> direction;
     switch (reflection->direction()) {
-    case ReflectionBelow:
+    case ReflectionDirection::Below:
         direction = CSSValuePool::singleton().createIdentifierValue(CSSValueBelow);
         break;
-    case ReflectionAbove:
+    case ReflectionDirection::Above:
         direction = CSSValuePool::singleton().createIdentifierValue(CSSValueAbove);
         break;
-    case ReflectionLeft:
+    case ReflectionDirection::Left:
         direction = CSSValuePool::singleton().createIdentifierValue(CSSValueLeft);
         break;
-    case ReflectionRight:
+    case ReflectionDirection::Right:
         direction = CSSValuePool::singleton().createIdentifierValue(CSSValueRight);
         break;
     }
diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h
index 8f63e0a..53cbd96 100644
--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h
@@ -32,7 +32,6 @@
 #include "CSSCalculationValue.h"
 #include "CSSFontFamily.h"
 #include "CSSPrimitiveValue.h"
-#include "CSSReflectionDirection.h"
 #include "CSSToLengthConversionData.h"
 #include "CSSValueKeywords.h"
 #include "GraphicsTypes.h"
@@ -140,44 +139,44 @@
     return LineClampValue();
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSReflectionDirection e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ReflectionDirection direction)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
-    switch (e) {
-    case ReflectionAbove:
+    switch (direction) {
+    case ReflectionDirection::Above:
         m_value.valueID = CSSValueAbove;
         break;
-    case ReflectionBelow:
+    case ReflectionDirection::Below:
         m_value.valueID = CSSValueBelow;
         break;
-    case ReflectionLeft:
+    case ReflectionDirection::Left:
         m_value.valueID = CSSValueLeft;
         break;
-    case ReflectionRight:
+    case ReflectionDirection::Right:
         m_value.valueID = CSSValueRight;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator CSSReflectionDirection() const
+template<> inline CSSPrimitiveValue::operator ReflectionDirection() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueAbove:
-        return ReflectionAbove;
+        return ReflectionDirection::Above;
     case CSSValueBelow:
-        return ReflectionBelow;
+        return ReflectionDirection::Below;
     case CSSValueLeft:
-        return ReflectionLeft;
+        return ReflectionDirection::Left;
     case CSSValueRight:
-        return ReflectionRight;
+        return ReflectionDirection::Right;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return ReflectionBelow;
+    return ReflectionDirection::Below;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnFill columnFill)
diff --git a/Source/WebCore/css/CSSReflectionDirection.h b/Source/WebCore/css/CSSReflectionDirection.h
deleted file mode 100644
index 17c1245..0000000
--- a/Source/WebCore/css/CSSReflectionDirection.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-namespace WebCore {
-
-enum CSSReflectionDirection { ReflectionBelow, ReflectionAbove, ReflectionLeft, ReflectionRight };
-
-} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp
index a5a453e..3bc0c62 100644
--- a/Source/WebCore/rendering/RenderBox.cpp
+++ b/Source/WebCore/rendering/RenderBox.cpp
@@ -726,7 +726,7 @@
 {
     if (!style().boxReflect())
         return 0;
-    if (style().boxReflect()->direction() == ReflectionLeft || style().boxReflect()->direction() == ReflectionRight)
+    if (style().boxReflect()->direction() == ReflectionDirection::Left || style().boxReflect()->direction() == ReflectionDirection::Right)
         return valueForLength(style().boxReflect()->offset(), borderBoxRect().width());
     return valueForLength(style().boxReflect()->offset(), borderBoxRect().height());
 }
@@ -739,18 +739,18 @@
     LayoutRect box = borderBoxRect();
     LayoutRect result = r;
     switch (style().boxReflect()->direction()) {
-        case ReflectionBelow:
-            result.setY(box.maxY() + reflectionOffset() + (box.maxY() - r.maxY()));
-            break;
-        case ReflectionAbove:
-            result.setY(box.y() - reflectionOffset() - box.height() + (box.maxY() - r.maxY()));
-            break;
-        case ReflectionLeft:
-            result.setX(box.x() - reflectionOffset() - box.width() + (box.maxX() - r.maxX()));
-            break;
-        case ReflectionRight:
-            result.setX(box.maxX() + reflectionOffset() + (box.maxX() - r.maxX()));
-            break;
+    case ReflectionDirection::Below:
+        result.setY(box.maxY() + reflectionOffset() + (box.maxY() - r.maxY()));
+        break;
+    case ReflectionDirection::Above:
+        result.setY(box.y() - reflectionOffset() - box.height() + (box.maxY() - r.maxY()));
+        break;
+    case ReflectionDirection::Left:
+        result.setX(box.x() - reflectionOffset() - box.width() + (box.maxX() - r.maxX()));
+        break;
+    case ReflectionDirection::Right:
+        result.setX(box.maxX() + reflectionOffset() + (box.maxX() - r.maxX()));
+        break;
     }
     return result;
 }
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index 9c44912..65b3f33 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -6744,26 +6744,26 @@
     // Map in our transform.
     TransformOperations transform;
     switch (renderer().style().boxReflect()->direction()) {
-        case ReflectionBelow:
-            transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), Length(100., Percent), TransformOperation::TRANSLATE));
-            transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), renderer().style().boxReflect()->offset(), TransformOperation::TRANSLATE));
-            transform.operations().append(ScaleTransformOperation::create(1.0, -1.0, ScaleTransformOperation::SCALE));
-            break;
-        case ReflectionAbove:
-            transform.operations().append(ScaleTransformOperation::create(1.0, -1.0, ScaleTransformOperation::SCALE));
-            transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), Length(100., Percent), TransformOperation::TRANSLATE));
-            transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), renderer().style().boxReflect()->offset(), TransformOperation::TRANSLATE));
-            break;
-        case ReflectionRight:
-            transform.operations().append(TranslateTransformOperation::create(Length(100., Percent), Length(0, Fixed), TransformOperation::TRANSLATE));
-            transform.operations().append(TranslateTransformOperation::create(renderer().style().boxReflect()->offset(), Length(0, Fixed), TransformOperation::TRANSLATE));
-            transform.operations().append(ScaleTransformOperation::create(-1.0, 1.0, ScaleTransformOperation::SCALE));
-            break;
-        case ReflectionLeft:
-            transform.operations().append(ScaleTransformOperation::create(-1.0, 1.0, ScaleTransformOperation::SCALE));
-            transform.operations().append(TranslateTransformOperation::create(Length(100., Percent), Length(0, Fixed), TransformOperation::TRANSLATE));
-            transform.operations().append(TranslateTransformOperation::create(renderer().style().boxReflect()->offset(), Length(0, Fixed), TransformOperation::TRANSLATE));
-            break;
+    case ReflectionDirection::Below:
+        transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), Length(100., Percent), TransformOperation::TRANSLATE));
+        transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), renderer().style().boxReflect()->offset(), TransformOperation::TRANSLATE));
+        transform.operations().append(ScaleTransformOperation::create(1.0, -1.0, ScaleTransformOperation::SCALE));
+        break;
+    case ReflectionDirection::Above:
+        transform.operations().append(ScaleTransformOperation::create(1.0, -1.0, ScaleTransformOperation::SCALE));
+        transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), Length(100., Percent), TransformOperation::TRANSLATE));
+        transform.operations().append(TranslateTransformOperation::create(Length(0, Fixed), renderer().style().boxReflect()->offset(), TransformOperation::TRANSLATE));
+        break;
+    case ReflectionDirection::Right:
+        transform.operations().append(TranslateTransformOperation::create(Length(100., Percent), Length(0, Fixed), TransformOperation::TRANSLATE));
+        transform.operations().append(TranslateTransformOperation::create(renderer().style().boxReflect()->offset(), Length(0, Fixed), TransformOperation::TRANSLATE));
+        transform.operations().append(ScaleTransformOperation::create(-1.0, 1.0, ScaleTransformOperation::SCALE));
+        break;
+    case ReflectionDirection::Left:
+        transform.operations().append(ScaleTransformOperation::create(-1.0, 1.0, ScaleTransformOperation::SCALE));
+        transform.operations().append(TranslateTransformOperation::create(Length(100., Percent), Length(0, Fixed), TransformOperation::TRANSLATE));
+        transform.operations().append(TranslateTransformOperation::create(renderer().style().boxReflect()->offset(), Length(0, Fixed), TransformOperation::TRANSLATE));
+        break;
     }
     newStyle.setTransform(transform);
 
diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.cpp b/Source/WebCore/rendering/style/RenderStyleConstants.cpp
index 9d4b5a1..d0c7873 100644
--- a/Source/WebCore/rendering/style/RenderStyleConstants.cpp
+++ b/Source/WebCore/rendering/style/RenderStyleConstants.cpp
@@ -256,17 +256,6 @@
     return ts;
 }
 
-TextStream& operator<<(TextStream& ts, CSSReflectionDirection direction)
-{
-    switch (direction) {
-    case ReflectionBelow: ts << "below"; break;
-    case ReflectionAbove: ts << "above"; break;
-    case ReflectionLeft: ts << "left"; break;
-    case ReflectionRight: ts << "right"; break;
-    }
-    return ts;
-}
-
 TextStream& operator<<(TextStream& ts, CaptionSide side)
 {
     switch (side) {
@@ -967,6 +956,17 @@
     return ts;
 }
 
+TextStream& operator<<(TextStream& ts, ReflectionDirection direction)
+{
+    switch (direction) {
+    case ReflectionDirection::Below: ts << "below"; break;
+    case ReflectionDirection::Above: ts << "above"; break;
+    case ReflectionDirection::Left: ts << "left"; break;
+    case ReflectionDirection::Right: ts << "right"; break;
+    }
+    return ts;
+}
+
 TextStream& operator<<(TextStream& ts, Resize resize)
 {
     switch (resize) {
diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h
index 3d55eab..9b6cfeb 100644
--- a/Source/WebCore/rendering/style/RenderStyleConstants.h
+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h
@@ -25,7 +25,6 @@
 
 #pragma once
 
-#include "CSSReflectionDirection.h" // FIXME: CSSReflectionDirection should just move here.
 #include <initializer_list>
 
 namespace WTF {
@@ -664,6 +663,13 @@
     BreakSpaces
 };
 
+enum class ReflectionDirection : uint8_t {
+    Below,
+    Above,
+    Left,
+    Right
+};
+
 // The order of this enum must match the order of the text align values in CSSValueKeywords.in.
 enum class TextAlignMode : uint8_t {
     Left,
@@ -1184,7 +1190,6 @@
 WTF::TextStream& operator<<(WTF::TextStream&, BreakBetween);
 WTF::TextStream& operator<<(WTF::TextStream&, BreakInside);
 WTF::TextStream& operator<<(WTF::TextStream&, CSSBoxType);
-WTF::TextStream& operator<<(WTF::TextStream&, CSSReflectionDirection);
 WTF::TextStream& operator<<(WTF::TextStream&, CaptionSide);
 WTF::TextStream& operator<<(WTF::TextStream&, Clear);
 #if ENABLE(DARK_MODE_CSS)
@@ -1239,6 +1244,7 @@
 WTF::TextStream& operator<<(WTF::TextStream&, PrintColorAdjust);
 WTF::TextStream& operator<<(WTF::TextStream&, PseudoId);
 WTF::TextStream& operator<<(WTF::TextStream&, QuoteType);
+WTF::TextStream& operator<<(WTF::TextStream&, ReflectionDirection);
 WTF::TextStream& operator<<(WTF::TextStream&, Resize);
 WTF::TextStream& operator<<(WTF::TextStream&, RubyPosition);
 #if ENABLE(CSS_SCROLL_SNAP)
diff --git a/Source/WebCore/rendering/style/StyleReflection.h b/Source/WebCore/rendering/style/StyleReflection.h
index c82f84e..1b88ca4 100644
--- a/Source/WebCore/rendering/style/StyleReflection.h
+++ b/Source/WebCore/rendering/style/StyleReflection.h
@@ -24,9 +24,9 @@
 
 #pragma once
 
-#include "CSSReflectionDirection.h"
 #include "Length.h"
 #include "NinePieceImage.h"
+#include "RenderStyleConstants.h"
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -44,23 +44,22 @@
     }
     bool operator!=(const StyleReflection& o) const { return !(*this == o); }
 
-    CSSReflectionDirection direction() const { return m_direction; }
+    ReflectionDirection direction() const { return m_direction; }
     const Length& offset() const { return m_offset; }
     const NinePieceImage& mask() const { return m_mask; }
 
-    void setDirection(CSSReflectionDirection dir) { m_direction = dir; }
+    void setDirection(ReflectionDirection dir) { m_direction = dir; }
     void setOffset(Length offset) { m_offset = WTFMove(offset); }
     void setMask(const NinePieceImage& image) { m_mask = image; }
 
 private:
     StyleReflection()
-        : m_direction(ReflectionBelow)
-        , m_offset(0, Fixed)
+        : m_offset(0, Fixed)
     {
          m_mask.setMaskDefaults();
     }
     
-    CSSReflectionDirection m_direction;
+    ReflectionDirection m_direction { ReflectionDirection::Below };
     Length m_offset;
     NinePieceImage m_mask;
 };