Closed Bug 775408 Opened 12 years ago Closed 12 years ago

nsIDocShell Browser/App attributes bikeshedding party

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 802366
blocking-basecamp -

People

(Reporter: mounir, Unassigned)

References

Details

(Whiteboard: [leave open])

Attachments

(1 file)

Follow-up from bug 774957.

We should discuss the naming of the attributes/methods here... if we want to.
The only thing I really care about is that the two properties that map to the security model have sane names that we can refer to in all security model docs. That way code is easier to understand for people that are implementing and using the security model.

Hence I would like there to be a property .appId which returns the app we are currently "under", and a .inBrowser or .inBrowserElement or .browserContent which returns true iif we are inside a non-app <iframe mozbrowser>.

I'll leave all other names up to the docShell peers.
Attached patch First bloodSplinter Review
Attachment #644505 - Flags: review?(justin.lebar+bug)
>diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
>--- a/docshell/base/nsDocShell.cpp
>+++ b/docshell/base/nsDocShell.cpp
>@@ -12021,17 +12021,17 @@ nsDocShell::GetCanExecuteScripts(bool *a
> #endif // DEBUG
>       } while (treeItem && docshell);
>   }
> 
>   return NS_OK;
> }
> 
> NS_IMETHODIMP
>-nsDocShell::SetIsBrowser()
>+nsDocShell::SetIsBrowserElement()
> {
>     if (mIsBrowserFrame) {
>         NS_ERROR("You should not call SetIsBrowser() more than once.");

Fix this.
Attachment #644505 - Flags: review?(justin.lebar+bug) → review+
(In reply to Justin Lebar [:jlebar] from comment #3)
> >diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
> >--- a/docshell/base/nsDocShell.cpp
> >+++ b/docshell/base/nsDocShell.cpp
> >@@ -12021,17 +12021,17 @@ nsDocShell::GetCanExecuteScripts(bool *a
> > #endif // DEBUG
> >       } while (treeItem && docshell);
> >   }
> > 
> >   return NS_OK;
> > }
> > 
> > NS_IMETHODIMP
> >-nsDocShell::SetIsBrowser()
> >+nsDocShell::SetIsBrowserElement()
> > {
> >     if (mIsBrowserFrame) {
> >         NS_ERROR("You should not call SetIsBrowser() more than once.");
> 
> Fix this.

Bug 776195
Whiteboard: [leave open]
Attachment #644505 - Flags: checkin+
> > >     if (mIsBrowserFrame) {
> > >         NS_ERROR("You should not call SetIsBrowser() more than once.");
> > 
> > Fix this.
> >
> Bug 776195

Sorry, I just meant that it should say /SetIsBrowserElement/.
(In reply to Justin Lebar [:jlebar] from comment #5)
> > > >     if (mIsBrowserFrame) {
> > > >         NS_ERROR("You should not call SetIsBrowser() more than once.");
> > > 
> > > Fix this.
> > >
> > Bug 776195
> 
> Sorry, I just meant that it should say /SetIsBrowserElement/.

Just pushed something to fix that.
This is basically subsumed by bug 802366.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: