Closed Bug 326706 Opened 19 years ago Closed 19 years ago

Refactor docshell load type constants

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

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.
Blocks: 326707
Attached patch patchSplinter Review
Attachment #211410 - Flags: superreview?(bzbarsky)
Attachment #211410 - Flags: review?(bzbarsky)
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.
Attachment #211410 - Flags: superreview?(bzbarsky)
Attachment #211410 - Flags: superreview+
Attachment #211410 - Flags: review?(bzbarsky)
Attachment #211410 - Flags: review+
checked in.
Status: NEW → RESOLVED
Closed: 19 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+
Keywords: fixed1.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.

Attachment

General

Created:
Updated:
Size: