Title: [260829] trunk/Source/WebKit
- Revision
- 260829
- Author
- [email protected]
- Date
- 2020-04-28 09:15:41 -0700 (Tue, 28 Apr 2020)
Log Message
[GTK] Unreviewed build fix for Clang 10
* UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp:
(webkitInputMethodContextImplGtkGetPreedit): Use the "f" suffix to make constants float to
prevent a narrowing double-to-float narrowing issue which Clang 10 considers an error. This
only happens with GTK4 because GdkRGBA now has float members. Using float constants is fine
with GTK3, because promoting floats to doubles never loses precision.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (260828 => 260829)
--- trunk/Source/WebKit/ChangeLog 2020-04-28 16:05:36 UTC (rev 260828)
+++ trunk/Source/WebKit/ChangeLog 2020-04-28 16:15:41 UTC (rev 260829)
@@ -1,3 +1,13 @@
+2020-04-28 Adrian Perez de Castro <[email protected]>
+
+ [GTK] Unreviewed build fix for Clang 10
+
+ * UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp:
+ (webkitInputMethodContextImplGtkGetPreedit): Use the "f" suffix to make constants float to
+ prevent a narrowing double-to-float narrowing issue which Clang 10 considers an error. This
+ only happens with GTK4 because GdkRGBA now has float members. Using float constants is fine
+ with GTK3, because promoting floats to doubles never loses precision.
+
2020-04-28 Daniel Bates <[email protected]>
[iOS] Marked text editor state only needs to be set when layout is up-to-date
Modified: trunk/Source/WebKit/UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp (260828 => 260829)
--- trunk/Source/WebKit/UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp 2020-04-28 16:05:36 UTC (rev 260828)
+++ trunk/Source/WebKit/UIProcess/API/gtk/WebKitInputMethodContextImplGtk.cpp 2020-04-28 16:15:41 UTC (rev 260829)
@@ -155,7 +155,7 @@
auto* underline = webkit_input_method_underline_new(clampTo<unsigned>(start), clampTo<unsigned>(end));
if (auto* colorAttribute = pango_attr_iterator_get(iter, PANGO_ATTR_UNDERLINE_COLOR)) {
PangoColor* color = &(reinterpret_cast<PangoAttrColor*>(colorAttribute))->color;
- GdkRGBA rgba = { color->red / 65535., color->green / 65535., color->blue / 65535., 1. };
+ GdkRGBA rgba = { color->red / 65535.f, color->green / 65535.f, color->blue / 65535.f, 1.f };
webkit_input_method_underline_set_color(underline, &rgba);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes