2011-04-27 13:42:27 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2011-05-27 22:37:24 +00:00
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-04-17 23:06:38 +00:00
|
|
|
|
2012-05-27 09:01:40 +00:00
|
|
|
#include "DocAccessibleWrap.h"
|
2019-04-13 12:13:15 +00:00
|
|
|
#include "mozilla/PresShell.h"
|
2022-05-31 10:06:54 +00:00
|
|
|
#include "nsIWidgetListener.h"
|
|
|
|
#include "nsTArray.h"
|
2021-08-12 21:12:32 +00:00
|
|
|
#include "nsWindow.h"
|
2007-01-28 03:58:18 +00:00
|
|
|
|
2019-04-13 12:13:15 +00:00
|
|
|
using namespace mozilla;
|
2012-11-18 02:01:44 +00:00
|
|
|
using namespace mozilla::a11y;
|
|
|
|
|
2010-06-11 08:23:18 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2012-05-27 09:01:40 +00:00
|
|
|
// DocAccessibleWrap
|
2010-06-11 08:23:18 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2001-04-17 23:06:38 +00:00
|
|
|
|
2019-01-02 13:05:23 +00:00
|
|
|
DocAccessibleWrap::DocAccessibleWrap(dom::Document* aDocument,
|
2019-04-13 12:13:15 +00:00
|
|
|
PresShell* aPresShell)
|
2021-08-12 21:12:32 +00:00
|
|
|
: DocAccessible(aDocument, aPresShell) {}
|
2007-07-02 11:18:07 +00:00
|
|
|
|
2012-05-27 09:01:40 +00:00
|
|
|
DocAccessibleWrap::~DocAccessibleWrap() {}
|
2021-08-12 21:12:32 +00:00
|
|
|
|
|
|
|
bool DocAccessibleWrap::IsActivated() {
|
|
|
|
if (nsWindow* window = nsWindow::GetFocusedWindow()) {
|
|
|
|
if (nsIWidgetListener* listener = window->GetWidgetListener()) {
|
|
|
|
if (PresShell* presShell = listener->GetPresShell()) {
|
|
|
|
return presShell == PresShellPtr();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|