Bug 47772

Summary: Web Inspector: brush up URL parsing on the front-end.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
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] Proposed change.
none
[PATCH] Same with layout tests not using old regex. yurys: review+

Pavel Feldman
Reported 2010-10-16 08:23:26 PDT
1. We should not be doing match[2] all over the code to extract the domain 2. We currently rely on backend to calculate host, port, lastPathComponent and such, but they can areally be cracked on the front-end side.
Attachments
[PATCH] Proposed change. (19.15 KB, patch)
2010-10-16 09:16 PDT, Pavel Feldman
no flags
[PATCH] Same with layout tests not using old regex. (20.09 KB, patch)
2010-10-16 09:31 PDT, Pavel Feldman
yurys: review+
Pavel Feldman
Comment 1 2010-10-16 09:16:32 PDT
Created attachment 70958 [details] [PATCH] Proposed change.
Pavel Feldman
Comment 2 2010-10-16 09:31:41 PDT
Created attachment 70959 [details] [PATCH] Same with layout tests not using old regex.
Yury Semikhatsky
Comment 3 2010-10-18 02:00:51 PDT
Comment on attachment 70959 [details] [PATCH] Same with layout tests not using old regex. View in context: https://bugs.webkit.org/attachment.cgi?id=70959&action=review > WebCore/inspector/front-end/utilities.js:396 > +String.prototype.asParsedURL = function() I'd rather make it a function, not a method. > WebCore/inspector/front-end/utilities.js:413 > + return result; You may want to cache result on the String object.
Pavel Feldman
Comment 4 2010-10-18 02:19:29 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/inspector/elements-panel-rewrite-href.html M WebCore/ChangeLog M WebCore/inspector/InspectorResource.cpp M WebCore/inspector/front-end/AuditRules.js M WebCore/inspector/front-end/CookieItemsView.js M WebCore/inspector/front-end/DOMAgent.js M WebCore/inspector/front-end/Resource.js M WebCore/inspector/front-end/ResourceCategory.js M WebCore/inspector/front-end/ResourceView.js M WebCore/inspector/front-end/inspector.js M WebCore/inspector/front-end/utilities.js Committed r69947
Note You need to log in before you can comment on or make changes to this bug.