Title: [234657] trunk/Tools
Revision
234657
Author
wenson_hs...@apple.com
Date
2018-08-07 10:21:04 -0700 (Tue, 07 Aug 2018)

Log Message

Post-review feedback after r234614.
https://bugs.webkit.org/show_bug.cgi?id=188322
<rdar://problem/42455270>

Reviewed by Sam Weinig.

Use std::round instead of roundl — there's no reason to go from double to long double precision when rounding.

* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(rounded):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (234656 => 234657)


--- trunk/Tools/ChangeLog	2018-08-07 17:16:23 UTC (rev 234656)
+++ trunk/Tools/ChangeLog	2018-08-07 17:21:04 UTC (rev 234657)
@@ -1,3 +1,16 @@
+2018-08-07  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Post-review feedback after r234614.
+        https://bugs.webkit.org/show_bug.cgi?id=188322
+        <rdar://problem/42455270>
+
+        Reviewed by Sam Weinig.
+
+        Use std::round instead of roundl — there's no reason to go from double to long double precision when rounding.
+
+        * TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
+        (rounded):
+
 2018-08-07  Don Olmstead  <don.olmst...@sony.com>
 
         [MiniBrowser][Win] Allow selection of recent user agents

Modified: trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm (234656 => 234657)


--- trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm	2018-08-07 17:16:23 UTC (rev 234656)
+++ trunk/Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm	2018-08-07 17:21:04 UTC (rev 234657)
@@ -33,12 +33,13 @@
 #import "UIKitSPI.h"
 #import <WebKit/WKWebViewPrivate.h>
 #import <WebKitLegacy/WebEvent.h>
+#import <cmath>
 
 @implementation TestWKWebView (KeyboardInputTests)
 
 static CGRect rounded(CGRect rect)
 {
-    return CGRectMake(roundl(rect.origin.x), roundl(rect.origin.y), roundl(rect.size.width), roundl(rect.size.height));
+    return CGRectMake(std::round(rect.origin.x), std::round(rect.origin.y), std::round(rect.size.width), std::round(rect.size.height));
 }
 
 - (void)waitForCaretViewFrameToBecome:(CGRect)frame
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to