We are always creating the redirected window at 1x1 and then resizing it if we are in AC mode. When the view is realized and AC mode is already enabled, which happens for example when AC mode is forced, or when the threaded compositor is enabled, we could just pass the initial size to the redirected window constructor to create the XWindow at the right size.
Created attachment 282881 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Attachment 282881 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.h:48: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.h:56: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 282881 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282881&action=review > Source/WebKit2/ChangeLog:18 > + WebPageProxy the redirected window has access to the devide scale factor and view widget to get the parent device > Source/WebKit2/ChangeLog:26 > + (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow): Deleted. prepare-ChangeLog bug > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:140 > + return std::unique_ptr<RedirectedXCompositeWindow>(new RedirectedXCompositeWindow(webPage, initialSize, WTFMove(damageNotify))); Since you modified this line anyway, change it to use std::make_unique while you're at it, please. Using new outside of a create function is not OK anymore.
(In reply to comment #4) > Comment on attachment 282881 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=282881&action=review > > > Source/WebKit2/ChangeLog:18 > > + WebPageProxy the redirected window has access to the devide scale factor and view widget to get the parent > > device > > > Source/WebKit2/ChangeLog:26 > > + (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow): Deleted. > > prepare-ChangeLog bug > > > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:140 > > + return std::unique_ptr<RedirectedXCompositeWindow>(new RedirectedXCompositeWindow(webPage, initialSize, WTFMove(damageNotify))); > > Since you modified this line anyway, change it to use std::make_unique while > you're at it, please. Using new outside of a create function is not OK > anymore. This is the create() function and the constructor is private.
Committed r203495: <http://trac.webkit.org/changeset/203495>