diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index 7ae065b735c..ddde4afa440 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -718,6 +718,10 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame *aFrame, nsIFrame *frame; GetInfo(NS_STATIC_CAST(nsIFrame*, aFrame), &frame, getter_AddRefs(weakShell), getter_AddRefs(node)); + *aAccessible = nsnull; + if (!frame || frame->GetRect().IsEmpty()) { + return NS_ERROR_FAILURE; + } // 1) for object elements containing either HTML or TXT documents nsCOMPtr domDoc; nsCOMPtr obj(do_QueryInterface(node)); diff --git a/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp b/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp index 4f6d924d6fb..c023bfcff6f 100755 --- a/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp +++ b/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp @@ -85,7 +85,7 @@ NS_IMETHODIMP nsHTMLWin32ObjectOwnerAccessible::GetChildCount(PRInt32 *aChildCou } nsHTMLWin32ObjectAccessible::nsHTMLWin32ObjectAccessible(void* aHwnd): -nsAccessibleWrap(nsnull, nsnull) +nsLeafAccessible(nsnull, nsnull) { mHwnd = aHwnd; if (mHwnd) { diff --git a/accessible/src/msaa/nsHTMLWin32ObjectAccessible.h b/accessible/src/msaa/nsHTMLWin32ObjectAccessible.h index 7b6a895c51b..50d3fb9f0a1 100755 --- a/accessible/src/msaa/nsHTMLWin32ObjectAccessible.h +++ b/accessible/src/msaa/nsHTMLWin32ObjectAccessible.h @@ -40,7 +40,7 @@ #define _nsHTMLWin32ObjectAccessible_H_ #include "nsIAccessibleWin32Object.h" -#include "nsAccessibleWrap.h" +#include "nsBaseWidgetAccessible.h" struct IAccessible; @@ -74,7 +74,7 @@ protected: * object returned by us in Accessible::NewAccessible() that gets the IAccessible * from the windows system from the window handle. */ -class nsHTMLWin32ObjectAccessible : public nsAccessibleWrap, +class nsHTMLWin32ObjectAccessible : public nsLeafAccessible, public nsIAccessibleWin32Object { public: