WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
102122
[EFL][WK2] New window size should consult the window attributes
https://bugs.webkit.org/show_bug.cgi?id=102122
Summary
[EFL][WK2] New window size should consult the window attributes
Yael
Reported
2012-11-13 12:55:18 PST
Currently, new window is always sized to 800x600, and only later resized to the desired size. This can lead to ugly flashing. Patch is coming.
Attachments
Patch
(9.70 KB, patch)
2012-11-13 13:09 PST
,
Yael
no flags
Details
Formatted Diff
Diff
Patch
(9.80 KB, patch)
2012-11-13 14:50 PST
,
Yael
kenneth
: review+
Details
Formatted Diff
Diff
Patch for landing.
(9.87 KB, patch)
2012-11-13 16:06 PST
,
Yael
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Yael
Comment 1
2012-11-13 13:09:27 PST
Created
attachment 173962
[details]
Patch
Kenneth Rohde Christiansen
Comment 2
2012-11-13 13:35:59 PST
Comment on
attachment 173962
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173962&action=review
Nice!
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:841 > + WKRetainPtr<WKStringRef> widthStr(AdoptWK, WKStringCreateWithUTF8CString("width")); > + WKRetainPtr<WKStringRef> heightStr(AdoptWK, WKStringCreateWithUTF8CString("height")); > +
Maybe a comment that we don't do everything here? for showModalDialog are they also called width and height or dialogWidth etc?
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:842 > + int width = 0;
unsigned?
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:846 > + if (ref) > + width = WKDoubleGetValue(static_cast<WKDoubleRef>(ref));
unsigned width = ref ? WKDoubleGetValue(static_cast<WKDoubleRef>(ref)) : 0 ?
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:852 > + width = std::max(width, 0); > + height = std::max(height, 0);
WebKit makes sure these are always bigger than 100px. You could assert
Yael
Comment 3
2012-11-13 14:04:55 PST
(In reply to
comment #2
)
> (From update of
attachment 173962
[details]
)
Thanks for the review :)
> View in context:
https://bugs.webkit.org/attachment.cgi?id=173962&action=review
> > Nice! > > > Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:841 > > + WKRetainPtr<WKStringRef> widthStr(AdoptWK, WKStringCreateWithUTF8CString("width")); > > + WKRetainPtr<WKStringRef> heightStr(AdoptWK, WKStringCreateWithUTF8CString("height")); > > + > > Maybe a comment that we don't do everything here? for showModalDialog are they also called width and height or dialogWidth etc? >
The dictionary is created in WebUIClient::createNewPage(), and always uses "width" and "height".
> > Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:842 > > + int width = 0; > > unsigned? >
ok
> > Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:846 > > + if (ref) > > + width = WKDoubleGetValue(static_cast<WKDoubleRef>(ref)); > > unsigned width = ref ? WKDoubleGetValue(static_cast<WKDoubleRef>(ref)) : 0 ? > > > Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:852 > > + width = std::max(width, 0); > > + height = std::max(height, 0); > > WebKit makes sure these are always bigger than 100px. You could assert
WebKit does that only if a value was specified. But you are right, I will never get a negative value here.
Yael
Comment 4
2012-11-13 14:50:21 PST
Created
attachment 173996
[details]
Patch Address
comment #2
.
Kenneth Rohde Christiansen
Comment 5
2012-11-13 14:59:22 PST
Comment on
attachment 173996
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173996&action=review
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp:844 > + unsigned int width = ref ? WKDoubleGetValue(static_cast<WKDoubleRef>(ref)) : 0;
style says to just use "unsigned" ie. no int
> Tools/MiniBrowser/efl/main.c:187 > - Browser_Window *window = window_create(DEFAULT_URL); > + Browser_Window *window = window_create(DEFAULT_URL, 0, 0);
// 0 equals default.
Yael
Comment 6
2012-11-13 16:06:30 PST
Created
attachment 174019
[details]
Patch for landing.
WebKit Review Bot
Comment 7
2012-11-13 21:06:14 PST
Comment on
attachment 174019
[details]
Patch for landing. Clearing flags on attachment: 174019 Committed
r134534
: <
http://trac.webkit.org/changeset/134534
>
WebKit Review Bot
Comment 8
2012-11-13 21:06:20 PST
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 9
2012-11-13 22:02:53 PST
Shouldn't this patch take into consideration the window position as well? Or is it OK to move the window later on?
Jinwoo Song
Comment 10
2012-11-13 22:22:36 PST
Actually, I'm working on window features and will upload the patch for review soon.
https://bugs.webkit.org/show_bug.cgi?id=99114
Yael
Comment 11
2012-11-14 05:07:01 PST
(In reply to
comment #9
)
> Shouldn't this patch take into consideration the window position as well? Or is it OK to move the window later on?
Could be done in a separate patch, it seems that someone else is already working on it.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug