Title: [242344] trunk/Tools
- Revision
- 242344
- Author
- [email protected]
- Date
- 2019-03-04 00:32:18 -0800 (Mon, 04 Mar 2019)
Log Message
[WPE] Inline wl_array_for_each to workaround C++ compatibility issue
https://bugs.webkit.org/show_bug.cgi?id=194898
Reviewed by Žan Doberšek.
* wpe/backends/WindowViewBackend.cpp: wl_array_for_each relies on
a GCC extension that permits arithmetic on void* pointer. Inline
the macro until this issue is fixed upstream.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (242343 => 242344)
--- trunk/Tools/ChangeLog 2019-03-04 08:20:06 UTC (rev 242343)
+++ trunk/Tools/ChangeLog 2019-03-04 08:32:18 UTC (rev 242344)
@@ -1,3 +1,14 @@
+2019-03-04 Charlie Turner <[email protected]>
+
+ [WPE] Inline wl_array_for_each to workaround C++ compatibility issue
+ https://bugs.webkit.org/show_bug.cgi?id=194898
+
+ Reviewed by Žan Doberšek.
+
+ * wpe/backends/WindowViewBackend.cpp: wl_array_for_each relies on
+ a GCC extension that permits arithmetic on void* pointer. Inline
+ the macro until this issue is fixed upstream.
+
2019-03-03 Tim Horton <[email protected]>
Rid the world of WK_API_ENABLED
Modified: trunk/Tools/wpe/backends/WindowViewBackend.cpp (242343 => 242344)
--- trunk/Tools/wpe/backends/WindowViewBackend.cpp 2019-03-04 08:20:06 UTC (rev 242343)
+++ trunk/Tools/wpe/backends/WindowViewBackend.cpp 2019-03-04 08:32:18 UTC (rev 242344)
@@ -440,11 +440,16 @@
wpe_view_backend_dispatch_set_size(window.backend(), width, height);
bool isFocused = false;
- void* p;
- wl_array_for_each(p, states)
- {
- uint32_t state = *static_cast<uint32_t*>(p);
+ // FIXME: It would be nice if the following loop could use
+ // wl_array_for_each, but at the time of writing it relies on
+ // GCC specific extension to work properly:
+ // https://gitlab.freedesktop.org/wayland/wayland/issues/34
+ uint32_t* pos = static_cast<uint32_t*>(states->data);
+ uint32_t* end = static_cast<uint32_t*>(states->data) + states->size;
+ for (; pos < end; pos++) {
+ uint32_t state = *pos;
+
switch (state) {
case ZXDG_TOPLEVEL_V6_STATE_ACTIVATED:
isFocused = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes