Closed
Bug 202391
Opened 22 years ago
Closed 22 years ago
.contentView is unnecessary
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: neil, Assigned: janv)
References
()
Details
Attachments
(2 files)
24.50 KB,
patch
|
janv
:
review+
|
Details | Diff | Splinter Review |
874 bytes,
patch
|
janv
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
Since before trees were renamed from outliners tree content views have had DOM
class info and therefore the interface was always automatically flattened. Any
users of tree.contentView can convert to tree.view without functional loss.
Reporter | ||
Comment 1•22 years ago
|
||
Note: I've only tested a few of the easier call sites.
Reporter | ||
Updated•22 years ago
|
Attachment #120814 -
Flags: superreview?(jaggernaut)
Attachment #120814 -
Flags: review?(varga)
Assignee | ||
Comment 2•22 years ago
|
||
Comment on attachment 120814 [details] [diff] [review]
Proposed patch
I think we shouldn't remove .contentView at the moment, mark it as deprecated
for now.
Assignee | ||
Comment 3•22 years ago
|
||
Comment on attachment 120814 [details] [diff] [review]
Proposed patch
r=varga with the change
Attachment #120814 -
Flags: review?(varga) → review+
Reporter | ||
Comment 4•22 years ago
|
||
Index: xpfe/global/resources/content/bindings/tree.xml
===================================================================
RCS file: /cvsroot/mozilla/xpfe/global/resources/content/bindings/tree.xml,v
retrieving revision 1.30
diff -u -r1.30 tree.xml
--- xpfe/global/resources/content/bindings/tree.xml 12 Mar 2003 09:00:28 -0000 1.30
+++ xpfe/global/resources/content/bindings/tree.xml 17 Apr 2003 11:41:05 -0000
@@ -43,7 +43,7 @@
onget="return this.treeBoxObject.view;"
onset="return this.treeBoxObject.view=val;"/>
<property name="contentView"
- onget="return
this.view.QueryInterface(Components.interfaces.nsITreeContentView);"
+ onget="return this.treeBoxObject.view;"
readonly="true"/>
<property name="builderView"
onget="return
this.view.QueryInterface(Components.interfaces.nsIXULTreeBuilder);"
Assignee | ||
Comment 5•22 years ago
|
||
ok
Comment 6•22 years ago
|
||
Comment on attachment 120814 [details] [diff] [review]
Proposed patch
What's the advantage of this change?
Use of |contentView|, and its implementation, help as documentation of which
interface these methods & attributes are on.
What about just
<property name="contentView"
onget="return this.treeBoxObject.view; /*.QI(nsIContentView)*/"
readonly="true"/>
That should give you the performance gain while keeping the self documenting
code aspect.
Assignee | ||
Comment 7•22 years ago
|
||
Well, there are not many methods on content and builder view:
contentView.getItemAtIndex()
contentView.getIndexOfItem()
builderView.getResourceAtIndex()
builderView.getIndexOfResource()
I think that's self explanatory enough, but I agree that we shouldn't remove
them, just remove the unnecessary QI.
Only one question, you think we shouldn't s/contentView/view ?
Reporter | ||
Comment 8•22 years ago
|
||
Comment 9•22 years ago
|
||
Comment on attachment 121266 [details] [diff] [review]
Only remove the QI
I like this.
Attachment #121266 -
Flags: superreview+
Assignee | ||
Updated•22 years ago
|
Attachment #121266 -
Flags: review+
Reporter | ||
Comment 10•22 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•22 years ago
|
Attachment #120814 -
Flags: superreview?(jaggernaut)
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•