forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMoni…
…tor.cpp and nsCOMPtr.h. CLOSED TREE Backed out changeset 5b1644096477 (bug 1682030) Backed out changeset 35ae60eea3c7 (bug 1682030) Backed out changeset 3eca76a6d639 (bug 1682030) Backed out changeset 259c45447ad9 (bug 1682030) Backed out changeset de9222dc8c31 (bug 1682030) Backed out changeset 2986c7e14349 (bug 1682030) Backed out changeset 6af3410bdb93 (bug 1682030) Backed out changeset 42b0621c2927 (bug 1682030) Backed out changeset 366e3e371858 (bug 1682030) Backed out changeset 9adb2865adea (bug 1682030) Backed out changeset 6af6af3bc03a (bug 1682030) Backed out changeset da94a91b35ae (bug 1682030) Backed out changeset 9143da258d0e (bug 1682030) Backed out changeset 5e20d06952ba (bug 1682030) Backed out changeset 6253d7e1ce7d (bug 1682030) Backed out changeset 0e06ddeea3e2 (bug 1682030) Backed out changeset 9c58d57c9e44 (bug 1682030) Backed out changeset e90edd89430e (bug 1682030) Backed out changeset 5861b8166b10 (bug 1682030) Backed out changeset b4b88cdc7993 (bug 1682030) Backed out changeset b80054e9805c (bug 1682030) Backed out changeset 580d857674c0 (bug 1682030) Backed out changeset a9cdf93c2662 (bug 1682030) Backed out changeset 9c9c8b4998e2 (bug 1682030)
- Loading branch information
Showing
459 changed files
with
66,549 additions
and
763 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
/* 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/. */ | ||
|
||
#include "HTMLWin32ObjectAccessible.h" | ||
|
||
#include "Role.h" | ||
#include "States.h" | ||
|
||
using namespace mozilla::a11y; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// HTMLWin32ObjectOwnerAccessible | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
HTMLWin32ObjectOwnerAccessible::HTMLWin32ObjectOwnerAccessible( | ||
nsIContent* aContent, DocAccessible* aDoc, void* aHwnd) | ||
: AccessibleWrap(aContent, aDoc), mHwnd(aHwnd) { | ||
mStateFlags |= eNoKidsFromDOM; | ||
|
||
// Our only child is a HTMLWin32ObjectAccessible object. | ||
if (mHwnd) { | ||
mNativeAccessible = new HTMLWin32ObjectAccessible(mHwnd, aDoc); | ||
AppendChild(mNativeAccessible); | ||
} | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// HTMLWin32ObjectOwnerAccessible: LocalAccessible implementation | ||
|
||
void HTMLWin32ObjectOwnerAccessible::Shutdown() { | ||
AccessibleWrap::Shutdown(); | ||
mNativeAccessible = nullptr; | ||
} | ||
|
||
role HTMLWin32ObjectOwnerAccessible::NativeRole() const { | ||
return roles::EMBEDDED_OBJECT; | ||
} | ||
|
||
bool HTMLWin32ObjectOwnerAccessible::NativelyUnavailable() const { | ||
// XXX: No HWND means this is windowless plugin which is not accessible in | ||
// the meantime. | ||
return !mHwnd; | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
// HTMLWin32ObjectAccessible | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
HTMLWin32ObjectAccessible::HTMLWin32ObjectAccessible(void* aHwnd, | ||
DocAccessible* aDoc) | ||
: DummyAccessible(aDoc) { | ||
mHwnd = aHwnd; | ||
if (mHwnd) { | ||
#if defined(MOZ_SANDBOX) | ||
if (XRE_IsContentProcess()) { | ||
DocAccessibleChild* ipcDoc = aDoc->IPCDoc(); | ||
MOZ_ASSERT(ipcDoc); | ||
if (!ipcDoc) { | ||
return; | ||
} | ||
|
||
IAccessibleHolder proxyHolder; | ||
if (!ipcDoc->SendGetWindowedPluginIAccessible( | ||
reinterpret_cast<uintptr_t>(mHwnd), &proxyHolder)) { | ||
return; | ||
} | ||
|
||
mCOMProxy.reset(proxyHolder.Release()); | ||
return; | ||
} | ||
#endif | ||
|
||
// The plugin is not windowless. In this situation we use | ||
// use its inner child owned by the plugin so that we don't get | ||
// in an infinite loop, where the WM_GETOBJECT's get forwarded | ||
// back to us and create another HTMLWin32ObjectAccessible | ||
mHwnd = ::GetWindow((HWND)aHwnd, GW_CHILD); | ||
} | ||
} | ||
|
||
void HTMLWin32ObjectAccessible::GetNativeInterface(void** aNativeAccessible) { | ||
#if defined(MOZ_SANDBOX) | ||
if (XRE_IsContentProcess()) { | ||
RefPtr<IAccessible> addRefed = mCOMProxy.get(); | ||
addRefed.forget(aNativeAccessible); | ||
return; | ||
} | ||
#endif | ||
|
||
if (mHwnd) { | ||
::AccessibleObjectFromWindow(static_cast<HWND>(mHwnd), OBJID_WINDOW, | ||
IID_IAccessible, aNativeAccessible); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
/* 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/. */ | ||
|
||
#ifndef mozilla_a11y_HTMLWin32ObjectAccessible_h_ | ||
#define mozilla_a11y_HTMLWin32ObjectAccessible_h_ | ||
|
||
#include "BaseAccessibles.h" | ||
|
||
#if defined(MOZ_SANDBOX) | ||
# include "mozilla/mscom/Ptr.h" | ||
#endif | ||
|
||
struct IAccessible; | ||
|
||
namespace mozilla { | ||
namespace a11y { | ||
|
||
class HTMLWin32ObjectOwnerAccessible : public AccessibleWrap { | ||
public: | ||
// This will own the HTMLWin32ObjectAccessible. We create this where the | ||
// <object> or <embed> exists in the tree, so that get_accNextSibling() etc. | ||
// will still point to Gecko accessible sibling content. This is necessary | ||
// because the native plugin accessible doesn't know where it exists in the | ||
// Mozilla tree, and returns null for previous and next sibling. This would | ||
// have the effect of cutting off all content after the plugin. | ||
HTMLWin32ObjectOwnerAccessible(nsIContent* aContent, DocAccessible* aDoc, | ||
void* aHwnd); | ||
virtual ~HTMLWin32ObjectOwnerAccessible() {} | ||
|
||
// LocalAccessible | ||
virtual void Shutdown(); | ||
virtual mozilla::a11y::role NativeRole() const override; | ||
virtual bool NativelyUnavailable() const; | ||
|
||
protected: | ||
void* mHwnd; | ||
RefPtr<LocalAccessible> mNativeAccessible; | ||
}; | ||
|
||
/** | ||
* This class is used only internally, we never! send out an IAccessible linked | ||
* back to this object. This class is used to represent a plugin object when | ||
* referenced as a child or sibling of another Accessible node. We need | ||
* only a limited portion of the Accessible interface implemented here. The | ||
* in depth accessible information will be returned by the actual IAccessible | ||
* object returned by us in Accessible::NewAccessible() that gets the | ||
* IAccessible from the windows system from the window handle. | ||
*/ | ||
class HTMLWin32ObjectAccessible : public DummyAccessible { | ||
public: | ||
HTMLWin32ObjectAccessible(void* aHwnd, DocAccessible* aDoc); | ||
virtual ~HTMLWin32ObjectAccessible() {} | ||
|
||
virtual void GetNativeInterface(void** aNativeAccessible) override; | ||
|
||
protected: | ||
void* mHwnd; | ||
#if defined(MOZ_SANDBOX) | ||
mscom::ProxyUniquePtr<IAccessible> mCOMProxy; | ||
#endif | ||
}; | ||
|
||
} // namespace a11y | ||
} // namespace mozilla | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.