Bug 48035 - WebWindowFeatures has a faulty constructor for WebCore::WindowFeatures
Summary: WebWindowFeatures has a faulty constructor for WebCore::WindowFeatures
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-20 18:45 PDT by usaini
Modified: 2010-11-24 06:15 PST (History)
4 users (show)

See Also:


Attachments
Fix for implicit constructor that translates between WebKit::WebWindowFeature and WebCore::WindowFeature (6.95 KB, patch)
2010-10-20 18:46 PDT, usaini
no flags Details | Formatted Diff | Diff
patch created via svn-create-patch. (650 bytes, patch)
2010-10-21 11:40 PDT, usaini
no flags Details | Formatted Diff | Diff
Review for patch to WebWindowFeatures.h that fixes a constructor call to keep WebWindowFeatures always in a valid state. (650 bytes, patch)
2010-10-21 12:24 PDT, usaini
ossy: review-
Details | Formatted Diff | Diff
patch created via svn-create-patch. (1.46 KB, patch)
2010-10-25 10:53 PDT, usaini
tonikitoo: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff
patch run on trunk. (1.61 KB, patch)
2010-10-28 15:51 PDT, usaini
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description usaini 2010-10-20 18:45:05 PDT
In WebWindowFeatures.h, in the constructor of WebWindowFeatures that takes in a WebCore::WindowFeatures, we set the xSet/ySet/widthSet/heightSet variables to the same as the values of the passed in object. However, we do not set the corresponding x,y,width, and height variables, and hence if one of those "Set" boolean variables are true, the corresponding underlying variables will not be initialized. This leads to broken code, especially since I know when an underlying popup is created, this implicit constructor is called to transform objects of type WebCore::WindowFeatures into a WebKit::WebWindowFeature.
Comment 1 usaini 2010-10-20 18:46:29 PDT
Created attachment 71380 [details]
Fix for implicit constructor that translates between WebKit::WebWindowFeature and WebCore::WindowFeature
Comment 2 usaini 2010-10-21 11:40:58 PDT
Created attachment 71464 [details]
patch created via svn-create-patch.

I couldn't run the diff from the root directory strangely.
Also, couldn't find where or if the prepare-ChangeLog script sent the file to disk as I couldn't find it. There were no obvious errors there.
Comment 3 usaini 2010-10-21 12:24:49 PDT
Created attachment 71470 [details]
Review for patch to WebWindowFeatures.h that fixes a constructor call to keep WebWindowFeatures always in a valid state.

Updated the patch to contain the ChangeLog after getting that to work properly.
Comment 4 Csaba Osztrogonác 2010-10-23 00:02:39 PDT
Comment on attachment 71470 [details]
Review for patch to WebWindowFeatures.h that fixes a constructor call to keep WebWindowFeatures always in a valid state.

Please add a changelog entry with WebKitTools/Scripts/prepare-changelog,
and then add a comment to the changelog why this change is needed.

Additionally run svn-create-patch from the root of the WebKit directory
and not from WebKit/chromium. It will make EWS bots happier. :)
Comment 5 usaini 2010-10-25 10:53:09 PDT
Created attachment 71770 [details]
patch created via svn-create-patch.

Sorry, had uploaded the wrong file.
Comment 6 Antonio Gomes 2010-10-25 13:32:02 PDT
Comment on attachment 71770 [details]
patch created via svn-create-patch.

Looks sane to me.
Comment 7 usaini 2010-10-27 13:06:05 PDT
Hi Csaba,

Could you look at this for commit? (Either thumbs up or down?)

Thanks,
Udam
Comment 8 WebKit Commit Bot 2010-10-27 14:06:23 PDT
Comment on attachment 71770 [details]
patch created via svn-create-patch.

Rejecting patch 71770 from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'apply-attachment', '--force-clean', '--non-interactive', 71770]" exit_code: 2
Last 500 characters of output:
 or --strip option?
The text leading up to this was:
--------------------------
|Index: public/WebWindowFeatures.h
|===================================================================
|--- public/WebWindowFeatures.h	(revision 69808)
|+++ public/WebWindowFeatures.h	(working copy)
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored

Failed to run "[u'/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Antonio Gomes', u'--force']" exit_code: 1

Full output: http://queues.webkit.org/results/4755049
Comment 9 Antonio Gomes 2010-10-27 21:20:33 PDT
> The text leading up to this was:
> --------------------------
> |Index: public/WebWindowFeatures.h
> |===================================================================
> |--- public/WebWindowFeatures.h    (revision 69808)
> |+++ public/WebWindowFeatures.h    (working copy)

please submit patch generated against WebKit trunk.
Comment 10 usaini 2010-10-28 15:51:31 PDT
Created attachment 72251 [details]
patch run on trunk.

I believe this should be right directory on the WebKit trunk.
Comment 11 usaini 2010-11-04 13:32:24 PDT
Hi Csaba,

Could you look at this for commit again?

Thanks,
Udam
Comment 12 WebKit Commit Bot 2010-11-04 21:47:57 PDT
Comment on attachment 72251 [details]
patch run on trunk.

Clearing flags on attachment: 72251

Committed r71391: <http://trac.webkit.org/changeset/71391>
Comment 13 Csaba Osztrogonác 2010-11-24 06:15:04 PST
Close, because the patch was landed.