Title: [288241] trunk/Source/WebKit
Revision
288241
Author
[email protected]
Date
2022-01-19 14:20:36 -0800 (Wed, 19 Jan 2022)

Log Message

WebKit::nsTextAlignmentFromTextAlignment() falls through ASSERT_NOT_REACHED()
https://bugs.webkit.org/show_bug.cgi?id=234989
<rdar://problem/87273264>

Reviewed by Darin Adler.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::nsTextAlignmentFromTextAlignment):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (288240 => 288241)


--- trunk/Source/WebKit/ChangeLog	2022-01-19 21:38:24 UTC (rev 288240)
+++ trunk/Source/WebKit/ChangeLog	2022-01-19 22:20:36 UTC (rev 288241)
@@ -1,3 +1,14 @@
+2022-01-19  Chris Dumez  <[email protected]>
+
+        WebKit::nsTextAlignmentFromTextAlignment() falls through ASSERT_NOT_REACHED()
+        https://bugs.webkit.org/show_bug.cgi?id=234989
+        <rdar://problem/87273264>
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::nsTextAlignmentFromTextAlignment):
+
 2022-01-19  Said Abou-Hallawa  <[email protected]>
 
         [GPU Process] ImageBuffer::convertToLuminanceMask() and transformToColorSpace() should not access the backend in WebProcess

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (288240 => 288241)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2022-01-19 21:38:24 UTC (rev 288240)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2022-01-19 22:20:36 UTC (rev 288241)
@@ -1237,28 +1237,20 @@
 
 static NSTextAlignment nsTextAlignmentFromTextAlignment(TextAlignment textAlignment)
 {
-    NSTextAlignment nsTextAlignment;
     switch (textAlignment) {
     case NoAlignment:
-        nsTextAlignment = NSTextAlignmentNatural;
-        break;
+        return NSTextAlignmentNatural;
     case LeftAlignment:
-        nsTextAlignment = NSTextAlignmentLeft;
-        break;
+        return NSTextAlignmentLeft;
     case RightAlignment:
-        nsTextAlignment = NSTextAlignmentRight;
-        break;
+        return NSTextAlignmentRight;
     case CenterAlignment:
-        nsTextAlignment = NSTextAlignmentCenter;
-        break;
+        return NSTextAlignmentCenter;
     case JustifiedAlignment:
-        nsTextAlignment = NSTextAlignmentJustified;
-        break;
-    default:
-        ASSERT_NOT_REACHED();
+        return NSTextAlignmentJustified;
     }
-
-    return nsTextAlignment;
+    ASSERT_NOT_REACHED();
+    return NSTextAlignmentNatural;
 }
 
 void WebViewImpl::updateTextTouchBar()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to