WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
51738
Web Inspector: refactoring: encapsulate lazy initialization of SourceFrame
https://bugs.webkit.org/show_bug.cgi?id=51738
Summary
Web Inspector: refactoring: encapsulate lazy initialization of SourceFrame
Pavel Podivilov
Reported
2010-12-30 02:38:02 PST
Web Inspector: refactoring: encapsulate lazy initialization of SourceFrame
Attachments
Patch.
(25.15 KB, patch)
2010-12-30 02:38 PST
,
Pavel Podivilov
pfeldman
: review-
Details
Formatted Diff
Diff
Patch.
(18.06 KB, patch)
2010-12-30 09:13 PST
,
Pavel Podivilov
pfeldman
: review-
Details
Formatted Diff
Diff
Comments addressed.
(17.73 KB, patch)
2010-12-31 05:19 PST
,
Pavel Podivilov
no flags
Details
Formatted Diff
Diff
Rebase.
(18.89 KB, patch)
2011-01-11 06:52 PST
,
Pavel Podivilov
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Podivilov
Comment 1
2010-12-30 02:38:45 PST
Created
attachment 77667
[details]
Patch.
Pavel Podivilov
Comment 2
2010-12-30 02:39:17 PST
Comment on
attachment 77667
[details]
Patch. Extract content loading logic from SourceView and ScriptView to ContentProvider implementations. Pass ContentProvider in SourceFrame constructor to allow SourceFrame manage it's lazy initialization.
Pavel Feldman
Comment 3
2010-12-30 06:09:50 PST
Comment on
attachment 77667
[details]
Patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=77667&action=review
Could you please split this into smaller patches? It is really hard to follow the changes here and I feel there are bugs introduced.
> WebCore/inspector/front-end/ScriptView.js:34 > + this.sourceFrame.addScript(script.sourceID, script.startingLine);
I did not know SourceFrame is sourceID aware. It probably should not be.
> WebCore/inspector/front-end/SourceFrame.js:869 > +WebInspector.ContentProvider = function()
SourceFrameContentProvider ?
> WebCore/inspector/front-end/SourceFrame.js:914 > +WebInspector.ResourceContentProvider = function(resource)
I thought the whole point of content provider was to isolate SourceFrame from Script / Resource. Now I see explicit resource usage in SourceFrame.js. This seems wrong.
Pavel Podivilov
Comment 4
2010-12-30 09:13:41 PST
Created
attachment 77685
[details]
Patch.
Pavel Podivilov
Comment 5
2010-12-30 09:13:56 PST
Comment on
attachment 77685
[details]
Patch. All comments addressed.
Pavel Feldman
Comment 6
2010-12-31 04:13:09 PST
Comment on
attachment 77685
[details]
Patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=77685&action=review
> WebCore/inspector/front-end/SourceFrame.js:835 > + var sourceIDToStartingLineMap = this._contentProvider.sourceIDToStartingLineMap();
You will be able to use short for syntax if you make properties on Array's prototype non-enumerable: Object.defineProperty(Array.prototype, "remove", { value: function() { ... }}); By default it'll create non-writable, non-enumerable, non-configurable property.
> WebCore/inspector/front-end/SourceFrame.js:874 > + sourceIDToStartingLineMap: function()
This is a very strange content provider. I'd suggest to provide Scripts array here: you can then get both ids and starting lines from the scripts.
Pavel Podivilov
Comment 7
2010-12-31 05:19:09 PST
Created
attachment 77716
[details]
Comments addressed.
Pavel Podivilov
Comment 8
2011-01-11 06:52:36 PST
Created
attachment 78525
[details]
Rebase.
Pavel Podivilov
Comment 9
2011-01-17 06:14:16 PST
Committed
r75937
: <
http://trac.webkit.org/changeset/75937
>
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