Closed Bug 350747 Opened 19 years ago Closed 19 years ago

change nsIContent so it can be used by extensions

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronr, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

nsIContent.h currently has most of its methods inside ifdef MOZILLA_INTERNAL_API which will not be available to extensions once --enable-libxul is turned on by default and extensions no longer allowed to build with MOZILLA_INTERNAL_API. Talking to bz and bsmedberg, they don't see that this restriction in nsIContent.h as required and that extensions should be able to use nsIContent. For example, XForms really needs access to nsIContent->IntrinsicState and nsIContent->GetBaseURI. So this bug is to remove the ifdef MOZILLA_INTERNAL_API's inside nsIContent.h and nsINode.h.
Do you mean C++-based extensions only, or all XPCOM-based extensions? (That is, would nsIContent be exposed to JavaScript-based components and to chrome?)
Attached patch patch (obsolete) — Splinter Review
Blocks: 348391
c++ extensions
Comment on attachment 236111 [details] [diff] [review] patch Looks reasonable.
Attachment #236111 - Flags: superreview+
Attachment #236111 - Flags: review+
I checked this into trunk and had to back it out. Broke non MOZILLA_INTERNAL_API compiled testcases (in mozilla/extensions/xmlextras/tests) on Linux due to nsIDocument.h. I'll make a new patch that changes nsIDocument.h, but I have to wait until after Labor Day to test it on a Linux machine with tests enabled.
Attached patch patch 2 (obsolete) — Splinter Review
updated previous patch to include change to nsIDocument.h. As far as I can tell, this should prevent any similar build breaks. No one else seems to override nsINode w/o this one-parameter constructor.
Attachment #236111 - Attachment is obsolete: true
Why don't you leave both constructors ifdefed, since there's no possible way to use them from frozen-linkage code?
patch using bsmedberg's most excellent suggestion
Attachment #236320 - Attachment is obsolete: true
Attachment #237238 - Flags: review?(bzbarsky)
Comment on attachment 237238 [details] [diff] [review] patch w/o constructor change >Index: content/base/public/nsIContent.h >+#endif ... >-#endif // MOZILLA_INTERNAL_API You lost the comment. Please put it back. r+sr=bzbarsky with the comment there.
Attachment #237238 - Flags: superreview+
Attachment #237238 - Flags: review?(bzbarsky)
Attachment #237238 - Flags: review+
Status: NEW → ASSIGNED
checked into the trunk yesterday afternoon.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: