Bug 48368 - Update ProgressTracker when moving a frame between documents
Summary: Update ProgressTracker when moving a frame between documents
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Jenn Braithwaite
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 12:54 PDT by Jenn Braithwaite
Modified: 2010-11-09 05:01 PST (History)
3 users (show)

See Also:


Attachments
patch (6.55 KB, patch)
2010-11-02 16:54 PDT, Jenn Braithwaite
no flags Details | Formatted Diff | Diff
updated patch - fix compile error (6.56 KB, patch)
2010-11-03 11:54 PDT, Jenn Braithwaite
dimich: review-
Details | Formatted Diff | Diff
updated patch - added assert (6.60 KB, patch)
2010-11-04 15:08 PDT, Jenn Braithwaite
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jenn Braithwaite 2010-10-26 12:54:03 PDT
When a live iframe is moved to a different document via adoptNode, the frame's resources are still being tracked by the former page's ProgressTracker.

When a resource load is transferred to a different document/page, the ProgressTracker should treat that item as being completed.  (Decrementing the progress of bytes received seems wrong.)

Need more study to determine how the new page's ProgressTracker is affected by the resource load being transferred to the new page.
Comment 1 Jenn Braithwaite 2010-11-02 16:54:14 PDT
Created attachment 72769 [details]
patch
Comment 2 Early Warning System Bot 2010-11-02 17:09:40 PDT
Attachment 72769 [details] did not build on qt:
Build output: http://queues.webkit.org/results/5047005
Comment 3 Jenn Braithwaite 2010-11-03 11:54:44 PDT
Created attachment 72848 [details]
updated patch - fix compile error

If someone knows of a way to test this from JS, I'm all ears.
Comment 4 Dmitry Titov 2010-11-03 18:14:50 PDT
Comment on attachment 72848 [details]
updated patch - fix compile error

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

Looks good!
One small iteration...

> WebCore/loader/ResourceLoadNotifier.cpp:167
> +    oldPage->progress()->completeProgress(identifier);

Could we add ASSERT documenting that new page and old page are guaranteed different here? This code actually uses this assumptions (because otherwise it immediately deletes the just-transfered 'identifier' from the progress tracker).
Comment 5 Jenn Braithwaite 2010-11-04 15:08:39 PDT
Created attachment 72987 [details]
updated patch - added assert
Comment 6 Dmitry Titov 2010-11-08 17:40:20 PST
Comment on attachment 72987 [details]
updated patch - added assert

r=me
Comment 7 WebKit Commit Bot 2010-11-08 21:48:29 PST
The commit-queue encountered the following flaky tests while processing attachment 72987 [details]:

animations/suspend-resume-animation.html
compositing/video/video-background-color.html

Please file bugs against the tests.  These tests were authored by cmarrin@apple.com and simon.fraser@apple.com.  The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2010-11-09 05:01:30 PST
Comment on attachment 72987 [details]
updated patch - added assert

Clearing flags on attachment: 72987

Committed r71625: <http://trac.webkit.org/changeset/71625>
Comment 9 WebKit Commit Bot 2010-11-09 05:01:35 PST
All reviewed patches have been landed.  Closing bug.