Bug 120092 - [Windows] Refactor WebFrame to compose with WebFrameLoaderClient (rather than subclass)
Summary: [Windows] Refactor WebFrame to compose with WebFrameLoaderClient (rather than...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
Keywords: InRadar
Depends on:
Blocks: 119964 120323
  Show dependency treegraph
Reported: 2013-08-20 14:50 PDT by Brent Fulgham
Modified: 2013-08-26 12:23 PDT (History)
4 users (show)

See Also:

Patch (70.60 KB, patch)
2013-08-23 11:43 PDT, Brent Fulgham
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2013-08-20 14:50:35 PDT
Implementing the changes for Bug 119964 under Windows is difficult, because the WebFrame class is a subclass of WebFrameloaderClient. This makes it difficult to move the creation of the WebFrame to a separate step in the loading process, because Windows expects this object to already exist at the time the loading operations are done.

To make this a little easier, this first patch will refactor WebFrame to be more like the other ports by moving the WebFrameLoaderClient logic out of WebFrame, and simply having WebFrame use a loader object to do the work.
Comment 1 Brent Fulgham 2013-08-23 11:43:39 PDT
Created attachment 209481 [details]
Comment 2 Radar WebKit Bug Importer 2013-08-23 11:44:58 PDT
Comment 3 Anders Carlsson 2013-08-23 11:50:55 PDT
Comment on attachment 209481 [details]

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

> Source/WebKit/win/WebFramePolicyListener.cpp:125
> +        static_cast<WebFrameLoaderClient*>(&frame->loader().client())->receivedPolicyDecision(action);

I think you can just cast to WebFrameLoaderClient& here.

> Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h:205
> +    WebFramePolicyListenerPrivate* m_policyListenerPrivate;

I think this can be an OwnPtr.
Comment 4 Brent Fulgham 2013-08-23 12:30:26 PDT
Committed r154508: <http://trac.webkit.org/changeset/154508>