WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 69351
Web Inspector: make ResourceView(s) compile
https://bugs.webkit.org/show_bug.cgi?id=69351
Summary
Web Inspector: make ResourceView(s) compile
Pavel Feldman
Reported
2011-10-04 10:40:54 PDT
Patch to follow.
Attachments
Patch
(11.68 KB, patch)
2011-10-04 10:44 PDT
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] More ResourceViews.
(27.10 KB, patch)
2011-10-04 11:14 PDT
,
Pavel Feldman
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2011-10-04 10:44:25 PDT
Created
attachment 109645
[details]
Patch
Pavel Feldman
Comment 2
2011-10-04 11:14:17 PDT
Created
attachment 109655
[details]
[Patch] More ResourceViews.
Yury Semikhatsky
Comment 3
2011-10-05 01:56:18 PDT
Comment on
attachment 109655
[details]
[Patch] More ResourceViews. View in context:
https://bugs.webkit.org/attachment.cgi?id=109655&action=review
> Source/WebCore/inspector/front-end/ResourceHeadersView.js:328 > + if (typeof headersLength === "number") {
Extract all this block into a separate method and call it explicitly where needed instead of doing this odd check here.
Pavel Feldman
Comment 4
2011-10-05 02:20:01 PDT
Comment on
attachment 109655
[details]
[Patch] More ResourceViews. View in context:
https://bugs.webkit.org/attachment.cgi?id=109655&action=review
>> Source/WebCore/inspector/front-end/ResourceHeadersView.js:328
> > Extract all this block into a separate method and call it explicitly where needed instead of doing this odd check here.
This method has 6 fields and 6 refresh methods that update corresponding fields. I would not want to split one of them into two parts for the following reasons: - Call site might get confused on whether it should call both methods of only one - This is a classical render(title, opt_subtitle). Not sure why call site should have two methods for this case - Imagine title owning subtitle element, how would you allow title to position (define location of) subtitle element
Pavel Feldman
Comment 5
2011-10-05 03:00:17 PDT
> Extract all this block into a separate method and call it explicitly where needed instead of doing this odd check here.
Does this mean that the change suggested in required in order to let this patch in?
Yury Semikhatsky
Comment 6
2011-10-05 03:01:12 PDT
(In reply to
comment #4
)
> (From update of
attachment 109655
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=109655&action=review
> > >> Source/WebCore/inspector/front-end/ResourceHeadersView.js:328 > > > > > Extract all this block into a separate method and call it explicitly where needed instead of doing this odd check here. > > This method has 6 fields and 6 refresh methods that update corresponding fields. I would not want to split one of them into two parts for the following reasons: > - Call site might get confused on whether it should call both methods of only one
Method name should eliminate such confusion.
> - This is a classical render(title, opt_subtitle). Not sure why call site should have two methods for this case
Because it is a different than a public method on TreeElement or such in that it is a private method which is called from two places: at first with 3 params, at second 2 params and because of that you have to an id block to the method which could well be avoided.
> - Imagine title owning subtitle element, how would you allow title to position (define location of) subtitle element
Extract title creation into a separate method that would return a container where to insert the subtitle?
Yury Semikhatsky
Comment 7
2011-10-05 03:06:01 PDT
(In reply to
comment #5
)
> > Extract all this block into a separate method and call it explicitly where needed instead of doing this odd check here. > > Does this mean that the change suggested in required in order to let this patch in?
Although it would make the inspector code more clear, I wouldn't block this patch if you have a principal disagreement on this change.
Pavel Feldman
Comment 8
2011-10-05 04:59:47 PDT
Landed as
http://svn.webkit.org/repository/webkit/trunk@96695
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