Title: [235942] trunk/Source
Revision
235942
Author
[email protected]
Date
2018-09-12 09:47:19 -0700 (Wed, 12 Sep 2018)

Log Message

[Win][Clang] error: non-constant-_expression_ cannot be narrowed from type 'int' to 'SHORT'
https://bugs.webkit.org/show_bug.cgi?id=189542

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No behavior change).

* platform/graphics/win/IntPointWin.cpp:
(WebCore::IntPoint::operator POINTS const): Narrowed m_x and m_y by using static_cast.

Source/WebKit:

* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformCreateFrontendPage): Narrowed initialWindowWidth and initialWindowHeight by using static_cast.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (235941 => 235942)


--- trunk/Source/WebCore/ChangeLog	2018-09-12 16:37:55 UTC (rev 235941)
+++ trunk/Source/WebCore/ChangeLog	2018-09-12 16:47:19 UTC (rev 235942)
@@ -1,3 +1,15 @@
+2018-09-12  Fujii Hironori  <[email protected]>
+
+        [Win][Clang] error: non-constant-_expression_ cannot be narrowed from type 'int' to 'SHORT'
+        https://bugs.webkit.org/show_bug.cgi?id=189542
+
+        Reviewed by Alex Christensen.
+
+        No new tests (No behavior change).
+
+        * platform/graphics/win/IntPointWin.cpp:
+        (WebCore::IntPoint::operator POINTS const): Narrowed m_x and m_y by using static_cast.
+
 2018-09-12  Guillaume Emont  <[email protected]>
 
         Add IGNORE_WARNING_.* macros

Modified: trunk/Source/WebCore/platform/graphics/win/IntPointWin.cpp (235941 => 235942)


--- trunk/Source/WebCore/platform/graphics/win/IntPointWin.cpp	2018-09-12 16:37:55 UTC (rev 235941)
+++ trunk/Source/WebCore/platform/graphics/win/IntPointWin.cpp	2018-09-12 16:47:19 UTC (rev 235942)
@@ -53,7 +53,7 @@
 
 IntPoint::operator POINTS() const
 {
-    POINTS p = {m_x, m_y};
+    POINTS p = { static_cast<SHORT>(m_x), static_cast<SHORT>(m_y) };
     return p;
 }
 

Modified: trunk/Source/WebKit/ChangeLog (235941 => 235942)


--- trunk/Source/WebKit/ChangeLog	2018-09-12 16:37:55 UTC (rev 235941)
+++ trunk/Source/WebKit/ChangeLog	2018-09-12 16:47:19 UTC (rev 235942)
@@ -1,3 +1,13 @@
+2018-09-12  Fujii Hironori  <[email protected]>
+
+        [Win][Clang] error: non-constant-_expression_ cannot be narrowed from type 'int' to 'SHORT'
+        https://bugs.webkit.org/show_bug.cgi?id=189542
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/win/WebInspectorProxyWin.cpp:
+        (WebKit::WebInspectorProxy::platformCreateFrontendPage): Narrowed initialWindowWidth and initialWindowHeight by using static_cast.
+
 2018-09-12  Chris Dumez  <[email protected]>
 
         Clean up SuspendedPageProxy

Modified: trunk/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp (235941 => 235942)


--- trunk/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp	2018-09-12 16:37:55 UTC (rev 235941)
+++ trunk/Source/WebKit/UIProcess/win/WebInspectorProxyWin.cpp	2018-09-12 16:47:19 UTC (rev 235942)
@@ -231,7 +231,7 @@
         nullptr, // didRemoveNavigationGestureSnapshot
     };
 
-    RECT r = { 0, 0, initialWindowWidth, initialWindowHeight };
+    RECT r = { 0, 0, static_cast<LONG>(initialWindowWidth), static_cast<LONG>(initialWindowHeight) };
     auto page = inspectedPage();
     m_inspectedViewWindow = page->viewWidget();
     m_inspectedViewParentWindow = ::GetParent(m_inspectedViewWindow);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to