mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 658005. Part 3. Make accessibility use the new frame visibility API and remove code is obsoletes. r=roc,surkov
This commit is contained in:
parent
09778341dc
commit
d6d9f5d4ac
@ -654,7 +654,7 @@ nsAccessible::IsVisible(bool* aIsOffscreen)
|
||||
}
|
||||
|
||||
// The frame intersects the viewport, but we need to check the parent view chain :(
|
||||
bool isVisible = nsCoreUtils::CheckVisibilityInParentChain(frame);
|
||||
bool isVisible = frame->IsVisibleConsideringAncestors(nsIFrame::VISIBILITY_CROSS_CHROME_CONTENT_BOUNDARY);
|
||||
if (isVisible && rectVisibility == nsRectVisibility_kVisible) {
|
||||
*aIsOffscreen = false;
|
||||
}
|
||||
|
@ -758,31 +758,6 @@ nsCoreUtils::IsColumnHidden(nsITreeColumn *aColumn)
|
||||
nsGkAtoms::_true, eCaseMatters);
|
||||
}
|
||||
|
||||
bool
|
||||
nsCoreUtils::CheckVisibilityInParentChain(nsIFrame* aFrame)
|
||||
{
|
||||
nsIView* view = aFrame->GetClosestView();
|
||||
if (view && !view->IsEffectivelyVisible())
|
||||
return false;
|
||||
|
||||
nsIPresShell* presShell = aFrame->PresContext()->GetPresShell();
|
||||
while (presShell) {
|
||||
if (!presShell->IsActive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsIFrame* rootFrame = presShell->GetRootFrame();
|
||||
presShell = nsnull;
|
||||
if (rootFrame) {
|
||||
nsIFrame* frame = nsLayoutUtils::GetCrossDocParentFrame(rootFrame);
|
||||
if (frame) {
|
||||
presShell = frame->PresContext()->GetPresShell();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessibleDOMStringList
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -370,11 +370,6 @@ public:
|
||||
aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the visibility across both parent content and chrome.
|
||||
*/
|
||||
static bool CheckVisibilityInParentChain(nsIFrame* aFrame);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -311,7 +311,8 @@ nsDocAccessible::NativeState()
|
||||
state |= states::BUSY;
|
||||
|
||||
nsIFrame* frame = GetFrame();
|
||||
if (!frame || !nsCoreUtils::CheckVisibilityInParentChain(frame)) {
|
||||
if (!frame ||
|
||||
!frame->IsVisibleConsideringAncestors(nsIFrame::VISIBILITY_CROSS_CHROME_CONTENT_BOUNDARY)) {
|
||||
state |= states::INVISIBLE | states::OFFSCREEN;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user