Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug

Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
This commit is contained in:
Emilio Cobos Álvarez
2019-01-02 14:05:23 +01:00
parent 870c153fbd
commit dc336a73ba
954 changed files with 5076 additions and 5120 deletions

View File

@@ -12,7 +12,7 @@
#include "nsAttrValueInlines.h"
#include "nsGkAtoms.h"
#include "nsError.h"
#include "nsIDocument.h"
#include "mozilla/dom/Document.h"
#include "nsIPluginDocument.h"
#include "nsIObjectFrame.h"
#include "nsNPAPIPluginInstance.h"
@@ -195,8 +195,7 @@ HTMLObjectElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
#endif // #ifdef XP_MACOSX
nsresult HTMLObjectElement::BindToTree(nsIDocument* aDocument,
nsIContent* aParent,
nsresult HTMLObjectElement::BindToTree(Document* aDocument, nsIContent* aParent,
nsIContent* aBindingParent) {
nsresult rv =
nsGenericHTMLFormElement::BindToTree(aDocument, aParent, aBindingParent);
@@ -222,7 +221,7 @@ nsresult HTMLObjectElement::BindToTree(nsIDocument* aDocument,
void HTMLObjectElement::UnbindFromTree(bool aDeep, bool aNullParent) {
#ifdef XP_MACOSX
// When a page is reloaded (when an nsIDocument's content is removed), the
// When a page is reloaded (when an Document's content is removed), the
// focused element isn't necessarily sent an eBlur event. See
// nsFocusManager::ContentRemoved(). This means that a widget may think it
// still contains a focused plugin when it doesn't -- which in turn can
@@ -275,7 +274,7 @@ nsresult HTMLObjectElement::AfterMaybeChangeAttr(int32_t aNamespaceID,
}
bool HTMLObjectElement::IsFocusableForTabIndex() {
nsIDocument* doc = GetComposedDoc();
Document* doc = GetComposedDoc();
if (!doc || doc->HasFlag(NODE_IS_EDITABLE)) {
return false;
}
@@ -289,7 +288,7 @@ bool HTMLObjectElement::IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
int32_t* aTabIndex) {
// TODO: this should probably be managed directly by IsHTMLFocusable.
// See bug 597242.
nsIDocument* doc = GetComposedDoc();
Document* doc = GetComposedDoc();
if (!doc || doc->HasFlag(NODE_IS_EDITABLE)) {
if (aTabIndex) {
*aTabIndex = TabIndex();
@@ -376,7 +375,7 @@ int32_t HTMLObjectElement::TabIndexDefault() {
Nullable<WindowProxyHolder> HTMLObjectElement::GetContentWindow(
nsIPrincipal& aSubjectPrincipal) {
nsIDocument* doc = GetContentDocument(aSubjectPrincipal);
Document* doc = GetContentDocument(aSubjectPrincipal);
if (doc) {
nsPIDOMWindowOuter* win = doc->GetWindow();
if (win) {