Bug 81795 - Web Inspector: event listeners section is broken for about:blank page
Summary: Web Inspector: event listeners section is broken for about:blank page
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: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 09:54 PDT by Yury Semikhatsky
Modified: 2012-03-21 23:17 PDT (History)
10 users (show)

See Also:


Attachments
Patch (3.28 KB, patch)
2012-03-21 10:54 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (4.73 KB, patch)
2012-03-21 11:13 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (4.92 KB, patch)
2012-03-21 15:51 PDT, Yury Semikhatsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2012-03-21 09:54:25 PDT
Some web apps create popup windows with about:blank URL but non trivial content and some event listeners. Inspector should work well on such pages.
Comment 1 Yury Semikhatsky 2012-03-21 10:54:11 PDT
Created attachment 133075 [details]
Patch
Comment 2 Pavel Feldman 2012-03-21 10:56:17 PDT
Comment on attachment 133075 [details]
Patch

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

> Source/WebCore/inspector/front-end/ResourceUtils.js:63
> +    if (WebInspector.inspectedPageURL === "about:blank")

It sounds like we should instead parse about:blank as a valid URL.
Comment 3 Yury Semikhatsky 2012-03-21 11:13:04 PDT
Created attachment 133078 [details]
Patch
Comment 4 Yury Semikhatsky 2012-03-21 11:14:38 PDT
(In reply to comment #2)
> (From update of attachment 133075 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=133075&action=review
> 
> > Source/WebCore/inspector/front-end/ResourceUtils.js:63
> > +    if (WebInspector.inspectedPageURL === "about:blank")
> 
> It sounds like we should instead parse about:blank as a valid URL.

Done.
Comment 5 Pavel Feldman 2012-03-21 12:03:11 PDT
Comment on attachment 133078 [details]
Patch

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

> Source/WebCore/inspector/front-end/utilities.js:460
> +    var match = this.match(/^([^:]+):(?:\/\/)?([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i);

I would special case about:blank instead. Otherwise, non-urls can squeeze in.
Comment 6 Yury Semikhatsky 2012-03-21 15:51:23 PDT
Created attachment 133133 [details]
Patch
Comment 7 Yury Semikhatsky 2012-03-21 15:52:03 PDT
(In reply to comment #5)
> (From update of attachment 133078 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=133078&action=review
> 
> > Source/WebCore/inspector/front-end/utilities.js:460
> > +    var match = this.match(/^([^:]+):(?:\/\/)?([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i);
> 
> I would special case about:blank instead. Otherwise, non-urls can squeeze in.

Done.
Comment 8 Yury Semikhatsky 2012-03-21 23:17:43 PDT
Committed r111653: <http://trac.webkit.org/changeset/111653>