1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/src/windows/msaa/RootAccessibleWrap.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "RootAccessibleWrap.h" 1.10 + 1.11 +#include "Compatibility.h" 1.12 +#include "nsCoreUtils.h" 1.13 +#include "nsWinUtils.h" 1.14 + 1.15 +using namespace mozilla::a11y; 1.16 + 1.17 +//////////////////////////////////////////////////////////////////////////////// 1.18 +// Constructor/desctructor 1.19 + 1.20 +RootAccessibleWrap:: 1.21 + RootAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent, 1.22 + nsIPresShell* aPresShell) : 1.23 + RootAccessible(aDocument, aRootContent, aPresShell) 1.24 +{ 1.25 +} 1.26 + 1.27 +RootAccessibleWrap::~RootAccessibleWrap() 1.28 +{ 1.29 +} 1.30 + 1.31 +//////////////////////////////////////////////////////////////////////////////// 1.32 +// RootAccessible 1.33 + 1.34 +void 1.35 +RootAccessibleWrap::DocumentActivated(DocAccessible* aDocument) 1.36 +{ 1.37 + if (Compatibility::IsDolphin() && 1.38 + nsCoreUtils::IsTabDocument(aDocument->DocumentNode())) { 1.39 + uint32_t count = mChildDocuments.Length(); 1.40 + for (uint32_t idx = 0; idx < count; idx++) { 1.41 + DocAccessible* childDoc = mChildDocuments[idx]; 1.42 + HWND childDocHWND = static_cast<HWND>(childDoc->GetNativeWindow()); 1.43 + if (childDoc != aDocument) 1.44 + nsWinUtils::HideNativeWindow(childDocHWND); 1.45 + else 1.46 + nsWinUtils::ShowNativeWindow(childDocHWND); 1.47 + } 1.48 + } 1.49 +}