mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 409473. New crash caused by bug 405248. r+sr=roc, a=blocking1.9
This commit is contained in:
parent
74b08cd788
commit
78b991a539
@ -273,11 +273,16 @@ BRFrame::PeekOffsetWord(PRBool aForward, PRBool aWordSelectEatSpace, PRBool aIsK
|
||||
#ifdef ACCESSIBILITY
|
||||
NS_IMETHODIMP BRFrame::GetAccessible(nsIAccessible** aAccessible)
|
||||
{
|
||||
NS_ENSURE_TRUE(mContent, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIAccessibilityService> accService = do_GetService("@mozilla.org/accessibilityService;1");
|
||||
if (accService) {
|
||||
return accService->CreateHTMLBRAccessible(static_cast<nsIFrame*>(this), aAccessible);
|
||||
NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIContent> parent = mContent->GetBindingParent();
|
||||
if (parent && parent->IsNativeAnonymous() && parent->GetChildCount() == 1) {
|
||||
// This <br> is the only node in a text control, therefore it is the hacky
|
||||
// "bogus node" used when there is no text in the control
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
return accService->CreateHTMLBRAccessible(static_cast<nsIFrame*>(this), aAccessible);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user