Bug 81795

Summary: Web Inspector: event listeners section is broken for about:blank page
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch pfeldman: review+

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>