Bug 111815

Summary: REGRESSION (r145169): [Mac] [WebKit2] http/tests/security/cross-frame-access-put.html fails
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: WebKit2Assignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, kling, webkit-ews
Priority: P2 Keywords: LayoutTestFailure
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 71354    
Attachments:
Description Flags
Proposed patch
none
Proposed patch andersca: review+, eflews.bot: commit-queue-

Comment 1 Ryosuke Niwa 2013-03-07 20:34:35 PST
Added a test expectation in https://trac.webkit.org/r145177.
Comment 2 Andreas Kling 2013-03-09 14:04:44 PST
Created attachment 192352 [details]
Proposed patch

First stab at solving this. Add bundle API to control whether cached window frames can be used or not.
Comment 3 Simon Fraser (smfr) 2013-03-11 08:54:31 PDT
Comment on attachment 192352 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=192352&action=review

> Source/WebKit2/ChangeLog:11
> +        if there's a custom implementation of getWindowFrame() in place that returns something
> +        other than the "real" window frame.

Could this same information be passed back in the reply to the window creation message?
Comment 4 Andreas Kling 2013-03-11 09:23:04 PDT
Comment on attachment 192352 [details]
Proposed patch

After discussing this with Anders we agreed that it would be better if clients overriding getWindowFrame() on the UIProcess side can also get notified when a new window frame is received from the window server, and then optionally set an override frame.

This override would then be respected by WebChromeClient::windowRect().
Comment 5 Andreas Kling 2013-03-11 09:24:07 PDT
(In reply to comment #4)
> (From update of attachment 192352 [details])
> After discussing this with Anders we agreed that it would be better if clients overriding getWindowFrame() on the UIProcess side can also get notified when a new window frame is received from the window server, and then optionally set an override frame.
> 
> This override would then be respected by WebChromeClient::windowRect().

Oh, and this notification should happen on the WebProcess side, since that's where the cached frame is stored.
Comment 6 Andreas Kling 2013-03-14 17:06:44 PDT
Created attachment 193205 [details]
Proposed patch

Here's something way simpler.
Have WebPageProxy::windowAndViewFramesChanged() call getWindowFrame() before sending the frames over to the web process.
This lets the UI client override the window frame in its getWindowFrame() callback, fixing the issue.
Because WindowAndViewFramesChanged happens below the PlatformWebView constructor in WTR, we need a little hack there to ensure the UI client is initialized when the message is sent.
Comment 7 EFL EWS Bot 2013-03-14 17:10:57 PDT
Comment on attachment 193205 [details]
Proposed patch

Attachment 193205 [details] did not pass efl-ews (efl):
Output: http://webkit-commit-queue.appspot.com/results/17195054
Comment 8 Early Warning System Bot 2013-03-14 17:13:55 PDT
Comment on attachment 193205 [details]
Proposed patch

Attachment 193205 [details] did not pass qt-wk2-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17218082
Comment 9 Andreas Kling 2013-03-14 20:32:53 PDT
Committed r145869: <http://trac.webkit.org/changeset/145869>