WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
30379
Factor ResourceLoadNotifier out of FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=30379
Summary
Factor ResourceLoadNotifier out of FrameLoader
Adam Barth
Reported
2009-10-14 22:59:56 PDT
As discussed on webkit-dev.
Attachments
Patch v1
(40.99 KB, patch)
2009-10-14 23:01 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Patch v1
(38.13 KB, patch)
2009-10-14 23:04 PDT
,
Adam Barth
darin
: review+
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2009-10-14 23:01:36 PDT
Created
attachment 41210
[details]
Patch v1
Adam Barth
Comment 2
2009-10-14 23:04:07 PDT
Created
attachment 41211
[details]
Patch v1
Darin Adler
Comment 3
2009-10-15 09:23:51 PDT
Comment on
attachment 41211
[details]
Patch v1
> void FrameLoader::sendRemainingDelegateMessages(unsigned long identifier, const ResourceResponse& response, int length, const ResourceError& error)
I'm surprised you left this function in FrameLoader. Seems to me it belongs in ResourceLoadNotifier, although you might have to add a document loader argument.
> @@ -3526,11 +3487,11 @@ void FrameLoader::requestFromDelegate(ResourceRequest& request, unsigned long& i
This function also seems to belong in ResourceLoadNotifier. I didn't look closely at other functions outside the patch.
> +void ResourceLoadNotifier::assignIdentifierToInitialRequest(unsigned long identifier, const ResourceRequest& clientRequest) > +{ > + dispatchAssignIdentifierToInitialRequest(identifier, activeDocumentLoader(), clientRequest); > +}
We may want to consider passing the document loader here instead of having the notifier get the active document loader.
> +void ResourceLoadNotifier::didReceiveResponse(ResourceLoader* loader, const ResourceResponse& r) > +{ > + activeDocumentLoader()->addResponse(r); > + > + if (Page* page = m_frame->page()) > + page->progress()->incrementProgress(loader->identifier(), r); > + > + dispatchDidReceiveResponse(loader->documentLoader(), loader->identifier(), r); > +}
Here too, and then we could eliminate the activeDocumentLoader() function. r=me
Adam Barth
Comment 4
2009-10-15 22:05:38 PDT
Those are all good points. If you don't mind, I'd like to handle them in a follow-up patch though.
WebKit Commit Bot
Comment 5
2009-10-15 22:20:13 PDT
Comment on
attachment 41211
[details]
Patch v1 Rejecting patch 41211 from commit-queue. Patch
https://bugs.webkit.org/attachment.cgi?id=41211
from
bug 30379
failed to download and apply.
Adam Barth
Comment 6
2009-10-15 22:32:34 PDT
Committed
r49671
: <
http://trac.webkit.org/changeset/49671
>
Sam Weinig
Comment 7
2009-10-15 23:03:10 PDT
Please note for the future, that the style guidelines where recently updated and the contents inside a namespace in a header should no longer be indented.
Adam Barth
Comment 8
2009-10-15 23:09:17 PDT
(In reply to
comment #7
)
> Please note for the future, that the style guidelines where recently updated > and the contents inside a namespace in a header should no longer be indented.
Praise be to the style guide!
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