Bug 33025 - Web Inspector: Provide contentDocument URL for frame owner elements
Summary: Web Inspector: Provide contentDocument URL for frame owner elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-29 10:52 PST by Alexander Pavlov (apavlov)
Modified: 2010-01-05 15:53 PST (History)
10 users (show)

See Also:


Attachments
patch (3.40 KB, patch)
2009-12-29 11:00 PST, Alexander Pavlov (apavlov)
timothy: review-
Details | Formatted Diff | Diff
patch (property name fixed) (3.46 KB, patch)
2009-12-29 14:27 PST, Alexander Pavlov (apavlov)
pfeldman: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff
patch (null document handled properly) (4.44 KB, patch)
2009-12-30 07:25 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2009-12-29 10:52:16 PST
Currently, there is no way to determine the URL of the document a node belongs in (be it the top-level document or a nested frame document). The ownerDocument for all nodes is the top-level document and that is the only source of information.

This issue blocks https://bugs.webkit.org/show_bug.cgi?id=33024.
Comment 1 Alexander Pavlov (apavlov) 2009-12-29 11:00:13 PST
Created attachment 45616 [details]
patch
Comment 2 WebKit Review Bot 2009-12-29 11:04:15 PST
style-queue ran check-webkit-style on attachment 45616 [details] without any errors.
Comment 3 Timothy Hatcher 2009-12-29 11:47:21 PST
Comment on attachment 45616 [details]
patch

Should be _url and url, per our style guide.
Comment 4 Pavel Feldman 2009-12-29 11:53:55 PST
Comment on attachment 45616 [details]
patch

> +                value.set("URL", frameOwner->contentDocument()->url().string());

As mentioned, should be "url".

> +        if (payload.URL)
> +            this._URL = payload.URL;

I think you are going to access it from outside the agent class, so should be public ("url", not "_url").
Comment 5 Alexander Pavlov (apavlov) 2009-12-29 14:27:20 PST
Created attachment 45621 [details]
patch (property name fixed)
Comment 6 WebKit Review Bot 2009-12-29 14:33:49 PST
style-queue ran check-webkit-style on attachment 45621 [details] without any errors.
Comment 7 Pavel Feldman 2009-12-29 14:37:40 PST
Comment on attachment 45621 [details]
patch (property name fixed)

> +        if (payload.documentURL)
> +            this.documentURL = payload.documentURL;

Note that this has a side effect that converts "" to undefined.
Comment 8 Alexander Pavlov (apavlov) 2009-12-29 14:42:06 PST
(In reply to comment #7)
> (From update of attachment 45621 [details])
> > +        if (payload.documentURL)
> > +            this.documentURL = payload.documentURL;
> 
> Note that this has a side effect that converts "" to undefined.

That's fine, since URLs are typically not empty strings, and in our case "" makes as much sense as <undefined>...
Comment 9 WebKit Commit Bot 2009-12-29 14:58:57 PST
Comment on attachment 45621 [details]
patch (property name fixed)

Rejecting patch 45621 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--quiet']" exit_code: 1
Running build-dumprendertree
Running tests from /Users/eseidel/Projects/CommitQueueSVN/LayoutTests
Testing 11853 test cases.
inspector/timeline-script-tag-1.html -> crashed

Exiting early after 1 failures. 9509 tests run.
398.62s total testing time

9508 test cases (99%) succeeded
1 test case (<1%) crashed
6 test cases (<1%) had stderr output

Full output: http://webkit-commit-queue.appspot.com/results/150884
Comment 10 Alexander Pavlov (apavlov) 2009-12-30 07:25:03 PST
Created attachment 45664 [details]
patch (null document handled properly)
Comment 11 WebKit Review Bot 2009-12-30 07:27:34 PST
style-queue ran check-webkit-style on attachment 45664 [details] without any errors.
Comment 12 Eric Seidel (no email) 2010-01-05 13:31:24 PST
Would be best if pfeldman would like to review again.
Comment 13 WebKit Commit Bot 2010-01-05 15:53:10 PST
Comment on attachment 45664 [details]
patch (null document handled properly)

Clearing flags on attachment: 45664

Committed r52836: <http://trac.webkit.org/changeset/52836>
Comment 14 WebKit Commit Bot 2010-01-05 15:53:16 PST
All reviewed patches have been landed.  Closing bug.