зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1730541, remove nsCoreUtils::IsContentDocument, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D125462
This commit is contained in:
Родитель
b0d6525aca
Коммит
a6ae4c4cf1
|
@ -136,7 +136,7 @@ nsresult AccessibleWrap::HandleAccEvent(AccEvent* aEvent) {
|
|||
}
|
||||
|
||||
if (doc) {
|
||||
if (!nsCoreUtils::IsContentDocument(doc->DocumentNode())) {
|
||||
if (!doc->DocumentNode()->IsContentDocument()) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ DocManager::OnStateChange(nsIWebProgress* aWebProgress, nsIRequest* aRequest,
|
|||
// Some XUL documents get start state and then stop state with failure
|
||||
// status when everything is ok. Fire document load complete event in this
|
||||
// case.
|
||||
if (NS_SUCCEEDED(aStatus) || !nsCoreUtils::IsContentDocument(document)) {
|
||||
if (NS_SUCCEEDED(aStatus) || !document->IsContentDocument()) {
|
||||
eventType = nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ static void LogDocShellState(dom::Document* aDocumentNode) {
|
|||
|
||||
static void LogDocType(dom::Document* aDocumentNode) {
|
||||
if (aDocumentNode->IsActive()) {
|
||||
bool isContent = nsCoreUtils::IsContentDocument(aDocumentNode);
|
||||
bool isContent = aDocumentNode->IsContentDocument();
|
||||
printf("%s document", (isContent ? "content" : "chrome"));
|
||||
} else {
|
||||
printf("document type: [failed]");
|
||||
|
|
|
@ -356,13 +356,6 @@ bool nsCoreUtils::IsRootDocument(Document* aDocument) {
|
|||
return !parentTreeItem;
|
||||
}
|
||||
|
||||
bool nsCoreUtils::IsContentDocument(Document* aDocument) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem = aDocument->GetDocShell();
|
||||
NS_ASSERTION(docShellTreeItem, "No document shell tree item for document!");
|
||||
|
||||
return (docShellTreeItem->ItemType() == nsIDocShellTreeItem::typeContent);
|
||||
}
|
||||
|
||||
bool nsCoreUtils::IsTopLevelContentDocInProcess(Document* aDocumentNode) {
|
||||
mozilla::dom::BrowsingContext* bc = aDocumentNode->GetBrowsingContext();
|
||||
return bc->IsContent() && (
|
||||
|
|
|
@ -198,11 +198,6 @@ class nsCoreUtils {
|
|||
*/
|
||||
static bool IsRootDocument(Document* aDocument);
|
||||
|
||||
/**
|
||||
* Return true if the given document is content document (not chrome).
|
||||
*/
|
||||
static bool IsContentDocument(Document* aDocument);
|
||||
|
||||
/**
|
||||
* Return true if the given document is a top level content document in this
|
||||
* process.
|
||||
|
|
|
@ -2454,8 +2454,7 @@ void DocAccessible::SetRoleMapEntryForDoc(dom::Element* aElement) {
|
|||
entry->role == roles::DIALOG ||
|
||||
// Role alert isn't valid on the body element according to the ARIA spec,
|
||||
// but it's useful for our UI; e.g. the WebRTC sharing indicator.
|
||||
(entry->role == roles::ALERT &&
|
||||
!nsCoreUtils::IsContentDocument(mDocumentNode))) {
|
||||
(entry->role == roles::ALERT && !mDocumentNode->IsContentDocument())) {
|
||||
SetRoleMapEntry(entry);
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче