Backed out changeset c780a165dca1 (bug 1098131) for bc7 failures, at least on Linux. r=backout

browser_backButtonFitts.js | uncaught exception - TypeError: this.mCurrentBrowser.docShell is null at chrome://browser/content/tabbrowser.xml:4004
This commit is contained in:
Sebastian Hengst 2015-11-04 20:41:16 +01:00
Родитель 560a121a57
Коммит 7397339686
7 изменённых файлов: 21 добавлений и 53 удалений

Просмотреть файл

@ -4001,7 +4001,7 @@
break;
case "sizemodechange":
if (aEvent.target == window) {
this.mCurrentBrowser.docShell.isActiveAndForeground =
this.mCurrentBrowser.docShellIsActive =
(window.windowState != window.STATE_MINIMIZED);
}
break;

Просмотреть файл

@ -5975,20 +5975,8 @@ nsDocShell::GetIsOffScreenBrowser(bool* aIsOffScreen)
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::SetIsActiveAndForeground(bool aIsActive)
{
return SetIsActiveInternal(aIsActive, false);
}
NS_IMETHODIMP
nsDocShell::SetIsActive(bool aIsActive)
{
return SetIsActiveInternal(aIsActive, true);
}
nsresult
nsDocShell::SetIsActiveInternal(bool aIsActive, bool aIsHidden)
{
// We disallow setting active on chrome docshells.
if (mItemType == nsIDocShellTreeItem::typeChrome) {
@ -6001,7 +5989,7 @@ nsDocShell::SetIsActiveInternal(bool aIsActive, bool aIsHidden)
// Tell the PresShell about it.
nsCOMPtr<nsIPresShell> pshell = GetPresShell();
if (pshell) {
pshell->SetIsActive(aIsActive, aIsHidden);
pshell->SetIsActive(aIsActive);
}
// Tell the window about it
@ -6035,11 +6023,7 @@ nsDocShell::SetIsActiveInternal(bool aIsActive, bool aIsHidden)
}
if (!docshell->GetIsBrowserOrApp()) {
if (aIsHidden) {
docshell->SetIsActive(aIsActive);
} else {
docshell->SetIsActiveAndForeground(aIsActive);
}
docshell->SetIsActive(aIsActive);
}
}
@ -6053,13 +6037,6 @@ nsDocShell::GetIsActive(bool* aIsActive)
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetIsActiveAndForeground(bool* aIsActive)
{
*aIsActive = mIsActive;
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::SetIsPrerendered(bool aPrerendered)
{

Просмотреть файл

@ -485,8 +485,6 @@ protected:
uint32_t aRedirectFlags,
uint32_t aStateFlags) override;
nsresult SetIsActiveInternal(bool aIsActive, bool aIsHidden);
/**
* Helper function that determines if channel is an HTTP POST.
*

Просмотреть файл

@ -43,7 +43,7 @@ interface nsITabParent;
typedef unsigned long nsLoadFlags;
[scriptable, builtinclass, uuid(41b1cf17-b37b-4a62-9df8-5f67cfecab3f)]
[scriptable, builtinclass, uuid(539bce70-8261-462f-bbd0-40ee90b7d636)]
interface nsIDocShell : nsIDocShellTreeItem
{
/**
@ -625,12 +625,6 @@ interface nsIDocShell : nsIDocShellTreeItem
*/
attribute boolean isActive;
/**
* Sets whether a docshell is active, as above, but ensuring it does
* not discard its layers
*/
attribute boolean isActiveAndForeground;
/**
* Puts the docshell in prerendering mode. noscript because we want only
* native code to be able to put a docshell in prerendering.

Просмотреть файл

@ -140,10 +140,10 @@ typedef struct CapturingContentInfo {
mozilla::StaticRefPtr<nsIContent> mContent;
} CapturingContentInfo;
// ae50e013-b2f1-4d4e-94c7-77cbcdab1c23
// b07c5323-3061-4ca9-95ed-84cccbffadac
#define NS_IPRESSHELL_IID \
{ 0xae50e013, 0xb2f1, 0x4d4e, \
{ 0x94, 0xc7, 0x77, 0xcb, 0xcd, 0xab, 0x1c, 0x23 } }
{ 0xb07c5323, 0x3061, 0x4ca9, \
{ 0x95, 0xed, 0x84, 0xcc, 0xcb, 0xff, 0xad, 0xac } }
// debug VerifyReflow flags
#define VERIFY_REFLOW_ON 0x01
@ -1258,7 +1258,7 @@ public:
return mObservesMutationsForPrint;
}
virtual nsresult SetIsActive(bool aIsActive, bool aIsHidden = true) = 0;
virtual nsresult SetIsActive(bool aIsActive) = 0;
bool IsActive()
{

Просмотреть файл

@ -10623,7 +10623,7 @@ SetPluginIsActive(nsISupports* aSupports, void* aClosure)
}
nsresult
PresShell::SetIsActive(bool aIsActive, bool aIsHidden)
PresShell::SetIsActive(bool aIsActive)
{
NS_PRECONDITION(mDocument, "should only be called with a document");
@ -10667,22 +10667,21 @@ PresShell::SetIsActive(bool aIsActive, bool aIsHidden)
// and (ii) has easy access to the TabChild. So we use this
// notification to signal the TabChild to drop its layer tree and
// stop trying to repaint.
if (aIsHidden) {
if (TabChild* tab = TabChild::GetFrom(this)) {
if (aIsActive) {
tab->MakeVisible();
if (!mIsZombie) {
if (nsIFrame* root = mFrameConstructor->GetRootFrame()) {
FrameLayerBuilder::InvalidateAllLayersForFrame(
nsLayoutUtils::GetDisplayRootFrame(root));
root->SchedulePaint();
}
if (TabChild* tab = TabChild::GetFrom(this)) {
if (aIsActive) {
tab->MakeVisible();
if (!mIsZombie) {
if (nsIFrame* root = mFrameConstructor->GetRootFrame()) {
FrameLayerBuilder::InvalidateAllLayersForFrame(
nsLayoutUtils::GetDisplayRootFrame(root));
root->SchedulePaint();
}
} else {
tab->MakeHidden();
}
} else {
tab->MakeHidden();
}
}
return rv;
}

Просмотреть файл

@ -355,7 +355,7 @@ public:
virtual nscolor ComputeBackstopColor(nsView* aDisplayRoot) override;
virtual nsresult SetIsActive(bool aIsActive, bool aIsHidden = true) override;
virtual nsresult SetIsActive(bool aIsActive) override;
virtual bool GetIsViewportOverridden() override {
return (mMobileViewportManager != nullptr);