Skip to content

Commit

Permalink
Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Browse files Browse the repository at this point in the history
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
  • Loading branch information
dgluca committed Mar 29, 2019
1 parent 93b8582 commit 5a0fa68
Show file tree
Hide file tree
Showing 134 changed files with 634 additions and 803 deletions.
7 changes: 2 additions & 5 deletions accessible/base/DocManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "mozilla/Components.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/PresShell.h"
#include "mozilla/dom/Event.h" // for Event
#include "nsContentUtils.h"
#include "nsDocShellLoadTypes.h"
Expand Down Expand Up @@ -438,10 +437,8 @@ DocAccessible* DocManager::CreateDocOrRootAccessible(Document* aDocument) {
}

// Ignore documents without presshell and not having root frame.
PresShell* presShell = aDocument->GetPresShell();
if (!presShell || presShell->IsDestroying()) {
return nullptr;
}
nsIPresShell* presShell = aDocument->GetShell();
if (!presShell || presShell->IsDestroying()) return nullptr;

bool isRootDoc = nsCoreUtils::IsRootDocument(aDocument);

Expand Down
5 changes: 2 additions & 3 deletions accessible/base/DocManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define mozilla_a11_DocManager_h_

#include "mozilla/ClearOnShutdown.h"
#include "mozilla/PresShell.h"
#include "mozilla/dom/Document.h"
#include "nsIDOMEventListener.h"
#include "nsRefPtrHashtable.h"
Expand Down Expand Up @@ -184,8 +183,8 @@ class DocManager : public nsIWebProgressListener,
* more than one.
*/
inline DocAccessible* GetExistingDocAccessible(const dom::Document* aDocument) {
PresShell* presShell = aDocument->GetPresShell();
return presShell ? presShell->GetDocAccessible() : nullptr;
nsIPresShell* ps = aDocument->GetShell();
return ps ? ps->GetDocAccessible() : nullptr;
}

} // namespace a11y
Expand Down
11 changes: 5 additions & 6 deletions accessible/base/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "prenv.h"
#include "nsIDocShellTreeItem.h"
#include "nsIURI.h"
#include "mozilla/PresShell.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLBodyElement.h"
#include "mozilla/dom/Selection.h"
Expand Down Expand Up @@ -165,13 +164,13 @@ static void LogDocState(dom::Document* aDocumentNode) {
}

static void LogPresShell(dom::Document* aDocumentNode) {
PresShell* presShell = aDocumentNode->GetPresShell();
printf("presshell: %p", static_cast<void*>(presShell));
nsIPresShell* ps = aDocumentNode->GetShell();
printf("presshell: %p", static_cast<void*>(ps));

nsIScrollableFrame* sf = nullptr;
if (presShell) {
printf(", is %s destroying", (presShell->IsDestroying() ? "" : "not"));
sf = presShell->GetRootScrollFrameAsScrollable();
if (ps) {
printf(", is %s destroying", (ps->IsDestroying() ? "" : "not"));
sf = ps->GetRootScrollFrameAsScrollable();
}
printf(", root scroll frame: %p", static_cast<void*>(sf));
}
Expand Down
7 changes: 3 additions & 4 deletions accessible/base/nsAccessibilityService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
#include "mozilla/dom/EventTarget.h"
#include "mozilla/dom/HTMLTableElement.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/Services.h"
#include "nsDeckFrame.h"

Expand Down Expand Up @@ -373,9 +372,9 @@ class PluginTimerCallBack final : public nsITimerCallback, public nsINamed {
NS_IMETHOD Notify(nsITimer* aTimer) final {
if (!mContent->IsInUncomposedDoc()) return NS_OK;

PresShell* presShell = mContent->OwnerDoc()->GetPresShell();
if (presShell) {
DocAccessible* doc = presShell->GetDocAccessible();
nsIPresShell* ps = mContent->OwnerDoc()->GetShell();
if (ps) {
DocAccessible* doc = ps->GetDocAccessible();
if (doc) {
// Make sure that if we created an accessible for the plugin that wasn't
// a plugin accessible we remove it before creating the right
Expand Down
8 changes: 3 additions & 5 deletions accessible/base/nsCoreUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "nsXULElement.h"
#include "nsIDocShell.h"
#include "nsIObserverService.h"
#include "nsIPresShell.h"
#include "nsPresContext.h"
#include "nsIScrollableFrame.h"
#include "nsISelectionController.h"
Expand All @@ -23,7 +24,6 @@
#include "mozilla/EventListenerManager.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/PresShell.h"
#include "mozilla/TouchEvents.h"
#include "nsView.h"
#include "nsGkAtoms.h"
Expand Down Expand Up @@ -70,10 +70,8 @@ void nsCoreUtils::DispatchClickEvent(XULTreeElement *aTree, int32_t aRowIndex,
Document *document = tcElm->GetUncomposedDoc();
if (!document) return;

RefPtr<PresShell> presShell = document->GetPresShell();
if (!presShell) {
return;
}
nsCOMPtr<nsIPresShell> presShell = document->GetShell();
if (!presShell) return;

// Ensure row is visible.
aTree->EnsureRowIsVisible(aRowIndex);
Expand Down
6 changes: 3 additions & 3 deletions accessible/base/nsCoreUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#define nsCoreUtils_h_

#include "mozilla/EventForwards.h"
#include "mozilla/PresShell.h"
#include "mozilla/dom/Element.h"
#include "nsIAccessibleEvent.h"
#include "nsIContent.h"
#include "mozilla/dom/Document.h" // for GetPresShell()
#include "mozilla/dom/Document.h" // for GetShell()
#include "nsIPresShell.h"

#include "nsPoint.h"
#include "nsTArray.h"
Expand Down Expand Up @@ -213,7 +213,7 @@ class nsCoreUtils {
* Return presShell for the document containing the given DOM node.
*/
static nsIPresShell *GetPresShellFor(nsINode *aNode) {
return aNode->OwnerDoc()->GetPresShell();
return aNode->OwnerDoc()->GetShell();
}

/**
Expand Down
8 changes: 3 additions & 5 deletions accessible/generic/DocAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "nsIInterfaceRequestorUtils.h"
#include "nsImageFrame.h"
#include "nsIPersistentProperties2.h"
#include "nsIPresShell.h"
#include "nsIServiceManager.h"
#include "nsViewManager.h"
#include "nsIScrollableFrame.h"
Expand All @@ -42,7 +43,6 @@
#include "mozilla/EventStateManager.h"
#include "mozilla/EventStates.h"
#include "mozilla/HTMLEditor.h"
#include "mozilla/PresShell.h"
#include "mozilla/TextEditor.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/DocumentType.h"
Expand Down Expand Up @@ -466,10 +466,8 @@ nsRect DocAccessible::RelativeBounds(nsIFrame** aRelativeFrame) const {

nsRect bounds;
while (document) {
mozilla::PresShell* presShell = document->GetPresShell();
if (!presShell) {
return nsRect();
}
nsIPresShell* presShell = document->GetShell();
if (!presShell) return nsRect();

nsRect scrollPort;
nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollable();
Expand Down
11 changes: 5 additions & 6 deletions chrome/nsChromeRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
#include "mozilla/dom/Document.h"
#include "nsIDOMWindow.h"
#include "nsIObserverService.h"
#include "nsIPresShell.h"
#include "nsIScriptError.h"
#include "nsIWindowMediator.h"
#include "nsIPrefService.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/Printf.h"
#include "mozilla/StyleSheet.h"
#include "mozilla/StyleSheetInlines.h"
Expand All @@ -38,7 +38,6 @@ nsChromeRegistry* nsChromeRegistry::gChromeRegistry;

// DO NOT use namespace mozilla; it'll break due to a naming conflict between
// mozilla::TextRange and a TextRange in OSX headers.
using mozilla::PresShell;
using mozilla::StyleSheet;
using mozilla::dom::Document;
using mozilla::dom::IsChromeURI;
Expand Down Expand Up @@ -345,11 +344,11 @@ nsresult nsChromeRegistry::RefreshWindow(nsPIDOMWindowOuter* aWindow) {
if (!document) return NS_OK;

// Deal with the agent sheets first. Have to do all the style sets by hand.
RefPtr<PresShell> presShell = document->GetPresShell();
if (presShell) {
nsCOMPtr<nsIPresShell> shell = document->GetShell();
if (shell) {
// Reload only the chrome URL agent style sheets.
nsTArray<RefPtr<StyleSheet>> agentSheets;
rv = presShell->GetAgentStyleSheets(agentSheets);
rv = shell->GetAgentStyleSheets(agentSheets);
NS_ENSURE_SUCCESS(rv, rv);

nsTArray<RefPtr<StyleSheet>> newAgentSheets;
Expand All @@ -371,7 +370,7 @@ nsresult nsChromeRegistry::RefreshWindow(nsPIDOMWindowOuter* aWindow) {
}
}

rv = presShell->SetAgentStyleSheets(newAgentSheets);
rv = shell->SetAgentStyleSheets(newAgentSheets);
NS_ENSURE_SUCCESS(rv, rv);
}

Expand Down
6 changes: 2 additions & 4 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "mozilla/Logging.h"
#include "mozilla/MediaFeatureChange.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/ResultExtensions.h"
#include "mozilla/ScrollTypes.h"
#include "mozilla/Services.h"
Expand Down Expand Up @@ -7879,9 +7878,8 @@ nsresult nsDocShell::RestoreFromHistory() {
} else {
rootViewParent = nullptr;
}
if (sibling && sibling->GetPresShell() &&
sibling->GetPresShell()->GetViewManager()) {
rootViewSibling = sibling->GetPresShell()->GetViewManager()->GetRootView();
if (sibling && sibling->GetShell() && sibling->GetShell()->GetViewManager()) {
rootViewSibling = sibling->GetShell()->GetViewManager()->GetRootView();
} else {
rootViewSibling = nullptr;
}
Expand Down
1 change: 0 additions & 1 deletion dom/animation/Animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "mozilla/dom/AnimationBinding.h"
#include "mozilla/dom/AnimationPlaybackEvent.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/DocumentInlines.h"
#include "mozilla/dom/DocumentTimeline.h"
#include "mozilla/AnimationEventDispatcher.h"
#include "mozilla/AnimationTarget.h"
Expand Down
1 change: 0 additions & 1 deletion dom/animation/AnimationUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ struct JSContext;

namespace mozilla {

enum class PseudoStyleType : uint8_t;
class ComputedTimingFunction;
class EffectSet;

Expand Down
9 changes: 4 additions & 5 deletions dom/animation/KeyframeEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mozilla/LayerAnimationInfo.h"
#include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt
#include "mozilla/KeyframeUtils.h"
#include "mozilla/PresShell.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/TypeTraits.h"
Expand All @@ -32,8 +31,8 @@
#include "nsCSSPseudoElements.h" // For PseudoStyleType
#include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch
#include "nsIFrame.h"
#include "nsIPresShell.h"
#include "nsIScriptError.h"
#include "nsPresContextInlines.h"
#include "nsRefreshDriver.h"

namespace mozilla {
Expand Down Expand Up @@ -1207,7 +1206,7 @@ bool KeyframeEffect::CanThrottleIfNotVisible(nsIFrame& aFrame) const {
return false;
}

PresShell* presShell = GetPresShell();
nsIPresShell* presShell = GetPresShell();
if (presShell && !presShell->IsActive()) {
return true;
}
Expand Down Expand Up @@ -1409,12 +1408,12 @@ Document* KeyframeEffect::GetRenderedDocument() const {
return mTarget->mElement->GetComposedDoc();
}

PresShell* KeyframeEffect::GetPresShell() const {
nsIPresShell* KeyframeEffect::GetPresShell() const {
Document* doc = GetRenderedDocument();
if (!doc) {
return nullptr;
}
return doc->GetPresShell();
return doc->GetShell();
}

/* static */
Expand Down
4 changes: 2 additions & 2 deletions dom/animation/KeyframeEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct JSContext;
class JSObject;
class nsIContent;
class nsIFrame;
class nsIPresShell;

namespace mozilla {

Expand All @@ -44,7 +45,6 @@ struct AnimationRule;
struct TimingParams;
class EffectSet;
class ComputedStyle;
class PresShell;

namespace dom {
class ElementOrCSSPseudoElement;
Expand Down Expand Up @@ -283,7 +283,7 @@ class KeyframeEffect : public AnimationEffect {
}

Document* GetRenderedDocument() const;
PresShell* GetPresShell() const;
nsIPresShell* GetPresShell() const;

// Associates a warning with the animated property set on the specified frame
// indicating why, for example, the property could not be animated on the
Expand Down
1 change: 0 additions & 1 deletion dom/animation/KeyframeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "nsCSSProps.h"
#include "nsCSSPseudoElements.h" // For PseudoStyleType
#include "nsIScriptError.h"
#include "nsPresContextInlines.h"
#include "nsTArray.h"
#include <algorithm> // For std::stable_sort, std::min

Expand Down
4 changes: 2 additions & 2 deletions dom/animation/PendingAnimationTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

#include "PendingAnimationTracker.h"

#include "mozilla/PresShell.h"
#include "mozilla/dom/AnimationTimeline.h"
#include "mozilla/dom/Nullable.h"
#include "nsIFrame.h"
#include "nsIPresShell.h"
#include "nsTransitionManager.h" // For CSSTransition

using mozilla::dom::Nullable;
Expand Down Expand Up @@ -173,7 +173,7 @@ void PendingAnimationTracker::EnsurePaintIsScheduled() {
return;
}

PresShell* presShell = mDocument->GetPresShell();
nsIPresShell* presShell = mDocument->GetShell();
if (!presShell) {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions dom/base/AnonymousContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "AnonymousContent.h"
#include "mozilla/PresShell.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/AnonymousContentBinding.h"
#include "nsComputedDOMStyle.h"
#include "nsCycleCollectionParticipant.h"
#include "mozilla/dom/Document.h"
#include "nsIFrame.h"
#include "nsStyledElement.h"
#include "HTMLCanvasElement.h"
Expand Down Expand Up @@ -186,7 +185,8 @@ void AnonymousContent::GetComputedStylePropertyValue(
return;
}

if (!element->OwnerDoc()->GetPresShell()) {
nsIPresShell* shell = element->OwnerDoc()->GetShell();
if (!shell) {
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
return;
}
Expand Down
3 changes: 1 addition & 2 deletions dom/base/DOMIntersectionObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "nsIFrame.h"
#include "nsContentUtils.h"
#include "nsLayoutUtils.h"
#include "mozilla/PresShell.h"
#include "mozilla/ServoBindings.h"

namespace mozilla {
Expand Down Expand Up @@ -253,7 +252,7 @@ void DOMIntersectionObserver::Update(Document* aDocument,
rootFrame, rootRectRelativeToRootFrame, containingBlock);
}
} else {
RefPtr<PresShell> presShell = aDocument->GetPresShell();
nsCOMPtr<nsIPresShell> presShell = aDocument->GetShell();
if (presShell) {
rootFrame = presShell->GetRootScrollFrame();
if (rootFrame) {
Expand Down
Loading

0 comments on commit 5a0fa68

Please sign in to comment.