michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "RootAccessibleWrap.h" michael@0: michael@0: #include "Compatibility.h" michael@0: #include "nsCoreUtils.h" michael@0: #include "nsWinUtils.h" michael@0: michael@0: using namespace mozilla::a11y; michael@0: michael@0: //////////////////////////////////////////////////////////////////////////////// michael@0: // Constructor/desctructor michael@0: michael@0: RootAccessibleWrap:: michael@0: RootAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent, michael@0: nsIPresShell* aPresShell) : michael@0: RootAccessible(aDocument, aRootContent, aPresShell) michael@0: { michael@0: } michael@0: michael@0: RootAccessibleWrap::~RootAccessibleWrap() michael@0: { michael@0: } michael@0: michael@0: //////////////////////////////////////////////////////////////////////////////// michael@0: // RootAccessible michael@0: michael@0: void michael@0: RootAccessibleWrap::DocumentActivated(DocAccessible* aDocument) michael@0: { michael@0: if (Compatibility::IsDolphin() && michael@0: nsCoreUtils::IsTabDocument(aDocument->DocumentNode())) { michael@0: uint32_t count = mChildDocuments.Length(); michael@0: for (uint32_t idx = 0; idx < count; idx++) { michael@0: DocAccessible* childDoc = mChildDocuments[idx]; michael@0: HWND childDocHWND = static_cast(childDoc->GetNativeWindow()); michael@0: if (childDoc != aDocument) michael@0: nsWinUtils::HideNativeWindow(childDocHWND); michael@0: else michael@0: nsWinUtils::ShowNativeWindow(childDocHWND); michael@0: } michael@0: } michael@0: }