Title: [290437] trunk/Source/WebCore
Revision
290437
Author
za...@apple.com
Date
2022-02-24 09:19:25 -0800 (Thu, 24 Feb 2022)

Log Message

[IFC][Integration] verticalLogicalMargin returns incorrect values for vertical-rl
https://bugs.webkit.org/show_bug.cgi?id=237138

Reviewed by Antti Koivisto.

This was caused by an accidental copy/paste.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::verticalLogicalMargin): also switch over to "switch".

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (290436 => 290437)


--- trunk/Source/WebCore/ChangeLog	2022-02-24 16:46:20 UTC (rev 290436)
+++ trunk/Source/WebCore/ChangeLog	2022-02-24 17:19:25 UTC (rev 290437)
@@ -1,3 +1,15 @@
+2022-02-24  Alan Bujtas  <za...@apple.com>
+
+        [IFC][Integration] verticalLogicalMargin returns incorrect values for vertical-rl
+        https://bugs.webkit.org/show_bug.cgi?id=237138
+
+        Reviewed by Antti Koivisto.
+
+        This was caused by an accidental copy/paste.
+
+        * layout/integration/LayoutIntegrationLineLayout.cpp:
+        (WebCore::LayoutIntegration::verticalLogicalMargin): also switch over to "switch".
+
 2022-02-24  Devin Rousso  <drou...@apple.com>
 
         [Apple Pay] switch from `PassKit/*` to `PassKit[Core,UI]/*`

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (290436 => 290437)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2022-02-24 16:46:20 UTC (rev 290436)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2022-02-24 17:19:25 UTC (rev 290437)
@@ -177,14 +177,16 @@
 
 static inline Layout::BoxGeometry::VerticalMargin verticalLogicalMargin(const RenderBoxModelObject& renderer, WritingMode writingMode)
 {
-    if (writingMode == WritingMode::TopToBottom)
+    switch (writingMode) {
+    case WritingMode::TopToBottom:
         return { renderer.marginTop(), renderer.marginBottom() };
-    if (writingMode == WritingMode::LeftToRight)
+    case WritingMode::LeftToRight:
+    case WritingMode::RightToLeft:
         return { renderer.marginRight(), renderer.marginLeft() };
-    if (writingMode == WritingMode::RightToLeft)
-        return { renderer.marginLeft(), renderer.marginRight() };
-    ASSERT_NOT_REACHED();
-    return  { };
+    default:
+        ASSERT_NOT_REACHED();
+        return { renderer.marginTop(), renderer.marginBottom() };
+    }
 }
 
 static inline Layout::Edges logicalBorder(const RenderBoxModelObject& renderer, bool isLeftToRightInlineDirection, WritingMode writingMode, bool retainBorderStart = true, bool retainBorderEnd = true)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to