Closed Bug 326706 Opened 15 years ago Closed 15 years ago
Refactor docshell load type constants
nsIDocShell allows access to the loadType for the current load, which is a combination of the docshell load command and the webnavigation flags. There's no good way to access the enum definition though, without pulling in nsDocShell.h. I propose moving the enum definition into nsDocShellLoadFlags.h, and exporting that from docshell.
Comment on attachment 211410 [details] [diff] [review] patch Make the new stuff #ifdef MOZILLA_INTERNAL_API and r+sr=me. I really don't want to expose the docshell load type to all comers, because it's so not a part of our api to the docshell. A separate getter to get the webnavigation flags (as a separate bug or something) would be great too.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #211410 - Flags: approval-branch-1.8.1?(bzbarsky)
Attachment #211410 - Flags: approval-branch-1.8.1?(bzbarsky) → approval-branch-1.8.1+
Hrm.. that's an unfortunate use of MOZILLA_INTERNAL_API. It means that in order to use that header, I have to define MOZILLA_INTERNAL_API. But, that also causes me to use internal linkage. This means that I have to copy these enums. Since nsIDocShell is accessible without defining MOZILLA_INTERNAL_API, I don't see why the enums should require MOZILLA_INTERNAL_API.
Yeah, I find it distressing that we're overloading the MOZILLA_INTERNAL_API define. It should be limited to determining linkage.
You need to log in before you can comment on or make changes to this bug.