Add a new class to handle platform toplevels. This will allow us to support multiple views in the same toplevel, but for now only one is supported.
Pull request: https://github.com/WebKit/WebKit/pull/30105
Committed 280412@main (af3cd7645c2f): <https://commits.webkit.org/280412@main> Reviewed commits have been landed. Closing PR #30105 and removing active labels.
Can I comment here to get help? I got 2 errors for Qt6 build: ## 'wpe_view_resize' was not declared ``` Source/WebKit/UIProcess/API/wpe/qt6/WPEQtView.cpp:87:5: error: 'wpe_view_resize' was not declared in this scope; did you mean 'wpe_view_resized'? | 87 | wpe_view_resize(wpeView, d->m_size.width(), d->m_size.height()); | | ^~~~~~~~~~~~~~~ | | wpe_view_resized ``` ## 'wpe_toplevel_qtquick' has not been declared ``` | Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp:35:46: error: 'wpe_toplevel_qtquick' has not been declared | 35 | WEBKIT_DEFINE_FINAL_TYPE(WPEToplevelQtQuick, wpe_toplevel_qtquick, WPE_TYPE_TOPLEVEL, WPEToplevel) | | ^~~~~~~~~~~~~~~~~~~~ | In file included from Source/WebKit/WPEPlatform/wpe/WPEView.h:36, | from Source/WebKit/WPEPlatform/wpe/WPEEvent.h:35, | from Source/WebKit/WPEPlatform/wpe/wpe-platform.h:31, | from Source/WebKit/UIProcess/API/wpe/qt6/WPEDisplayQtQuick.h:30, | from Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.h:29, | from Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp:27: | Source/WebKit/WPEPlatform/wpe/WPEToplevel.h:38:27: error: expected identifier before '(' token | 38 | #define WPE_TYPE_TOPLEVEL (wpe_toplevel_get_type()) | | ^ | Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp:35:68: note: in expansion of macro 'WPE_TYPE_TOPLEVEL' | 35 | WEBKIT_DEFINE_FINAL_TYPE(WPEToplevelQtQuick, wpe_toplevel_qtquick, WPE_TYPE_TOPLEVEL, WPEToplevel) | | ^~~~~~~~~~~~~~~~~ | Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp:37:1: error: expected constructor, destructor, or type conversion before 'static' | 37 | static gboolean wpeToplevelQtQuickResize(WPEToplevel* toplevel, int width, int height) | | ^~~~~~ | Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp: In function 'void wpe_toplevel_qtquick_class_init(WPEToplevelQtQuickClass*)': | Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp:52:29: error: 'wpeToplevelQtQuickResize' was not declared in this scope; did you mean 'WPEToplevelQtQuickClass'? | 52 | toplevelClass->resize = wpeToplevelQtQuickResize; | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | WPEToplevelQtQuickClass | Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp: At global scope: | Source/WebKit/UIProcess/API/wpe/qt6/WPEToplevelQtQuick.cpp:49:13: warning: 'void wpe_toplevel_qtquick_class_init(WPEToplevelQtQuickClass*)' defined but not used [-Wunused-function] | 49 | static void wpe_toplevel_qtquick_class_init(WPEToplevelQtQuickClass* toplevelQtQuickClass) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
For 'wpe_view_resize' was not declared, change to wpe_view_resized fixed but for 'wpe_toplevel_qtquick' has not been declared, how to fix?