Bug 757137, part 1: Force mozbrowser frames to be typeContent (whether or not any other mozbrowser features are enabled). r=bz

This commit is contained in:
Chris Jones 2012-06-20 12:25:22 -07:00
parent c8d1f2b3b2
commit 9cff6d2611

View File

@ -15,6 +15,7 @@
#include "nsIDOMHTMLIFrameElement.h"
#include "nsIDOMHTMLFrameElement.h"
#include "nsIDOMMozBrowserFrame.h"
#include "nsIDOMWindow.h"
#include "nsIPresShell.h"
#include "nsIContent.h"
@ -652,6 +653,16 @@ AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem, nsIContent* aOwningContent,
StringBeginsWith(value, NS_LITERAL_STRING("content-"),
nsCaseInsensitiveStringComparator());
// Force mozbrowser frames to always be typeContent, even if the
// mozbrowser interfaces are disabled.
nsCOMPtr<nsIDOMMozBrowserFrame> mozbrowser =
do_QueryInterface(aOwningContent);
if (mozbrowser) {
bool isMozbrowser = false;
mozbrowser->GetMozbrowser(&isMozbrowser);
isContent |= isMozbrowser;
}
if (isContent) {
// The web shell's type is content.