Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug

It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr
This commit is contained in:
Hiroyuki Ikezoe
2018-02-21 07:00:10 +09:00
parent ce3e2391a3
commit b1da8534e8
52 changed files with 198 additions and 416 deletions

View File

@@ -175,13 +175,10 @@ HTMLAnchorElement::IsHTMLFocusable(bool aWithMouse,
// cannot focus links if there is no link handler
nsIDocument* doc = GetComposedDoc();
if (doc) {
nsIPresShell* presShell = doc->GetShell();
if (presShell) {
nsPresContext* presContext = presShell->GetPresContext();
if (presContext && !presContext->GetLinkHandler()) {
*aIsFocusable = false;
return false;
}
nsPresContext* presContext = doc->GetPresContext();
if (presContext && !presContext->GetLinkHandler()) {
*aIsFocusable = false;
return false;
}
}