зеркало из https://github.com/mozilla/gecko-dev.git
Bug 310921. AccessibleObjectFromPoint wrong when a span ends the previous line within the same block. In fact the next text object after that wasn't even exposed. r=ginn.chen, sr=roc
This commit is contained in:
Родитель
1c926e77d7
Коммит
6077887e84
|
@ -713,8 +713,11 @@ PRBool nsAccessible::IsPartiallyVisible(PRBool *aIsOffscreen)
|
|||
NS_STATIC_CAST(PRUint16, (kMinPixels * p2t)),
|
||||
&rectVisibility);
|
||||
|
||||
if (rectVisibility == nsRectVisibility_kVisible) {
|
||||
if (rectVisibility == nsRectVisibility_kVisible ||
|
||||
(rectVisibility == nsRectVisibility_kZeroAreaRect && frame->GetNextInFlow())) {
|
||||
// This view says it is visible, but we need to check the parent view chain :(
|
||||
// Note: zero area rects can occur in the first frame of a multi-frame text flow,
|
||||
// in which case the next frame exists because the text flow is visible
|
||||
while ((containingView = containingView->GetParent()) != nsnull) {
|
||||
if (containingView->GetVisibility() == nsViewVisibility_kHide) {
|
||||
return PR_FALSE;
|
||||
|
|
|
@ -1385,7 +1385,7 @@ nsTextPaintStyle::GetResolvedForeColor(nscolor aColor,
|
|||
#ifdef ACCESSIBILITY
|
||||
NS_IMETHODIMP nsTextFrame::GetAccessible(nsIAccessible** aAccessible)
|
||||
{
|
||||
if (mRect.width > 0 || mRect.height > 0) {
|
||||
if (mRect.width > 0 || mRect.height > 0 || GetNextInFlow()) {
|
||||
|
||||
nsCOMPtr<nsIAccessibilityService> accService = do_GetService("@mozilla.org/accessibilityService;1");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче