1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #include "DocAccessibleWrap.h"
9 #include "mozilla/PresShell.h"
12 using namespace mozilla
;
13 using namespace mozilla::a11y
;
15 ////////////////////////////////////////////////////////////////////////////////
17 ////////////////////////////////////////////////////////////////////////////////
19 DocAccessibleWrap::DocAccessibleWrap(dom::Document
* aDocument
,
20 PresShell
* aPresShell
)
21 : DocAccessible(aDocument
, aPresShell
) {}
23 DocAccessibleWrap::~DocAccessibleWrap() {}
25 bool DocAccessibleWrap::IsActivated() {
26 if (nsWindow
* window
= nsWindow::GetFocusedWindow()) {
27 if (nsIWidgetListener
* listener
= window
->GetWidgetListener()) {
28 if (PresShell
* presShell
= listener
->GetPresShell()) {
29 return presShell
== PresShellPtr();