Bug 74523 - [GTK] Page size should be 0,0 when view widget is not realized
Summary: [GTK] Page size should be 0,0 when view widget is not realized
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-12-14 11:01 PST by Carlos Garcia Campos
Modified: 2011-12-14 11:38 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.41 KB, patch)
2011-12-14 11:04 PST, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-12-14 11:01:39 PST
For consistency with WebCore that uses 0,0 as empty size. GTK+ initializes the widget allocation as -1, -1, 1, 1.
Comment 1 Carlos Garcia Campos 2011-12-14 11:04:37 PST
Created attachment 119254 [details]
Patch
Comment 2 Martin Robinson 2011-12-14 11:08:17 PST
Comment on attachment 119254 [details]
Patch

How did you notice this? Did it cause a bug somewhere?
Comment 3 WebKit Review Bot 2011-12-14 11:12:42 PST
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
Comment 4 Carlos Garcia Campos 2011-12-14 11:24:22 PST
(In reply to comment #2)
> (From update of attachment 119254 [details])
> How did you notice this? Did it cause a bug somewhere?

Writing the unit test for the window properties patch. 

I do someting like window.open('', '', 'left=10,top=20,width=800,height=600');

and I get 10, 20, 799, 599 from WindowFeatures, because in FrameLoader::createWindow() the window size is adjusted for the difference between the window size and the page size:

if (features.widthSet)
        windowRect.setWidth(features.width + (windowRect.width() - pageSize.width()));
if (features.heightSet)
        windowRect.setHeight(features.height + (windowRect.height() - pageSize.height()));

initially the window rect is 0, 0 and page size is 1, 1
Comment 5 Carlos Garcia Campos 2011-12-14 11:38:30 PST
Committed r102804: <http://trac.webkit.org/changeset/102804>