WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
95752
Web Inspector: Fix inconsistencies in NetworkUISourceCodeProvider implementation.
https://bugs.webkit.org/show_bug.cgi?id=95752
Summary
Web Inspector: Fix inconsistencies in NetworkUISourceCodeProvider implementat...
Vsevolod Vlasov
Reported
2012-09-04 08:32:40 PDT
NetworkUISourceCodeProvider should not receive ResourceAdded event until resource was finished. StyleSourceMapping should listen for workspace event instead of being called directly by NetworkUISourceCodeProvider. ProjectDidReset event should be introduced instead of setTimeout hacks in mappings. Patch to follow.
Attachments
Patch
(28.15 KB, patch)
2012-09-04 09:39 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch
(28.11 KB, patch)
2012-09-05 23:55 PDT
,
Vsevolod Vlasov
apavlov
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Vsevolod Vlasov
Comment 1
2012-09-04 09:39:56 PDT
Created
attachment 162053
[details]
Patch
Alexander Pavlov (apavlov)
Comment 2
2012-09-05 23:45:28 PDT
Comment on
attachment 162053
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=162053&action=review
> Source/WebCore/ChangeLog:8 > + NetworkUISourceCodeProvider does not receive ResourceAdded event until resource was finished anymore.
was -> is (or "has been")
> Source/WebCore/ChangeLog:9 > + StyleSourceMapping now listens for workspace event instead of being called directly by NetworkUISourceCodeProvider.
StylesSourceMapping
> Source/WebCore/ChangeLog:10 > + StyleSourceMapping is now created from inspector.js.
ditto
> Source/WebCore/inspector/front-end/NetworkUISourceCodeProvider.js:72 > + var uiSourceCode = new WebInspector.StyleSource(resource);
Duplicate "var uiSourceCode" declaration
> Source/WebCore/inspector/front-end/NetworkUISourceCodeProvider.js:75 > + var uiSourceCode = new WebInspector.JavaScriptSource(resource.url, resource, resource, false);
ditto
> Source/WebCore/inspector/front-end/NetworkUISourceCodeProvider.js:78 > + var uiSourceCode = new WebInspector.JavaScriptSource(resource.url, resource, resource, true);
You can unify the two cases by using "resource.type === WebInspector.resourceTypes.Script" as the last argument
> LayoutTests/inspector/debugger/network-uisourcecode-provider.html:10 > + var lastResouceId = 0;
Let's fix the name while we are here - "lastResourceId".
> LayoutTests/inspector/debugger/script-snippet-model.html:8 > +setTimeout(InspectorTest.completeTest.bind(InspectorTest), 1000);
???
> LayoutTests/inspector/debugger/script-snippet-model.html:36 > + InspectorTest.assertEquals(workspace.uiSourceCodes().length, 1, "Only one snippet uiSourceCode should be present after project navigation.");
(expected, found, message)
Vsevolod Vlasov
Comment 3
2012-09-05 23:55:33 PDT
Created
attachment 162429
[details]
Patch
Vsevolod Vlasov
Comment 4
2012-09-06 00:40:38 PDT
Committed
r127705
: <
http://trac.webkit.org/changeset/127705
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug