Bug 103927 - [Resource Timing] Expose timing information for iframes
Summary: [Resource Timing] Expose timing information for iframes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: James Simonsen
URL:
Keywords:
Depends on: 49246
Blocks: 84883
  Show dependency treegraph
 
Reported: 2012-12-03 14:26 PST by James Simonsen
Modified: 2013-04-02 05:42 PDT (History)
6 users (show)

See Also:


Attachments
Patch (12.21 KB, patch)
2013-03-29 15:59 PDT, James Simonsen
no flags Details | Formatted Diff | Diff
Patch (13.06 KB, patch)
2013-03-29 16:14 PDT, James Simonsen
no flags Details | Formatted Diff | Diff
Patch for landing (14.53 KB, patch)
2013-04-01 16:39 PDT, James Simonsen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Simonsen 2012-12-03 14:26:57 PST
Since Resource Timing hooks into CachedResourceLoader, we need to wait for main documents to go through it before they'll appear in the Resource Timing buffer.
Comment 1 James Simonsen 2013-03-29 15:59:24 PDT
Created attachment 195812 [details]
Patch
Comment 2 Tony Gentilcore 2013-03-29 16:04:50 PDT
Comment on attachment 195812 [details]
Patch

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

> LayoutTests/http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_iframe_self_navigation.html:1
> +<!DOCTYPE html>

Where are the expectations for this new test?
Comment 3 James Simonsen 2013-03-29 16:14:34 PDT
Created attachment 195815 [details]
Patch
Comment 4 James Simonsen 2013-03-29 16:15:05 PDT
(In reply to comment #2)
> (From update of attachment 195812 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=195812&action=review
> 
> > LayoutTests/http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_iframe_self_navigation.html:1
> > +<!DOCTYPE html>
> 
> Where are the expectations for this new test?

Oops. Forgot to 'git add'. Fixed now.
Comment 5 Tony Gentilcore 2013-03-29 17:14:36 PDT
Comment on attachment 195815 [details]
Patch

lgtm but Nate should review the CachedResourceLoader changes
Comment 6 Nate Chapin 2013-04-01 09:46:47 PDT
Comment on attachment 195815 [details]
Patch

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

> Source/WebCore/loader/cache/CachedResourceLoader.cpp:535
> +        if (frame()->ownerElement() && m_documentLoader->frameLoader()->stateMachine()->committingFirstRealLoad()) {
> +            InitiatorInfo info = { frame()->ownerElement()->localName(), monotonicallyIncreasingTime() };
> +            m_initiatorMap.add(newResource.get(), info);
> +        }

This probably needs a comment, maybe a link to the spec?
Comment 7 James Simonsen 2013-04-01 16:39:12 PDT
Created attachment 196037 [details]
Patch for landing
Comment 8 James Simonsen 2013-04-01 16:40:04 PDT
(In reply to comment #6)
> (From update of attachment 195815 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=195815&action=review
> 
> > Source/WebCore/loader/cache/CachedResourceLoader.cpp:535
> > +        if (frame()->ownerElement() && m_documentLoader->frameLoader()->stateMachine()->committingFirstRealLoad()) {
> > +            InitiatorInfo info = { frame()->ownerElement()->localName(), monotonicallyIncreasingTime() };
> > +            m_initiatorMap.add(newResource.get(), info);
> > +        }
> 
> This probably needs a comment, maybe a link to the spec?

Done.
Comment 9 WebKit Review Bot 2013-04-01 22:50:06 PDT
Comment on attachment 196037 [details]
Patch for landing

Clearing flags on attachment: 196037

Committed r147387: <http://trac.webkit.org/changeset/147387>
Comment 10 WebKit Review Bot 2013-04-01 22:50:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Zan Dobersek 2013-04-02 05:42:52 PDT
After the patch landed the following test started failing persistently on Chromium bots:
http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_cached.html

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20-%20webkit.org&tests=http%2Ftests%2Fw3c%2Fwebperf%2Fsubmission%2FGoogle%2Fresource-timing%2Fhtml%2Ftest_resource_cached.html

It is also failing on the GTK port (with another test), covered in bug #113772.