зеркало из https://github.com/mozilla/gecko-dev.git
Bug 346833. Objects in :before and :after no longer exposed. r=ginn.chen, sr=roc
This commit is contained in:
Родитель
ed6210be3f
Коммит
38a6785d4f
|
@ -272,15 +272,26 @@ NS_IMETHODIMP nsAccessibleTreeWalker::GetFirstChild()
|
|||
|
||||
void nsAccessibleTreeWalker::UpdateFrame(PRBool aTryFirstChild)
|
||||
{
|
||||
if (mState.frame) {
|
||||
mState.frame = aTryFirstChild? mState.frame->GetFirstChild(nsnull) :
|
||||
mState.frame->GetNextSibling();
|
||||
if (mState.frame && mState.siblingIndex < 0 &&
|
||||
mState.frame->GetContent()->IsNativeAnonymous()) {
|
||||
if (!mState.frame) {
|
||||
return;
|
||||
}
|
||||
if (aTryFirstChild) {
|
||||
nsIFrame *parentFrame = mState.frame;
|
||||
mState.frame = mState.frame->GetFirstChild(nsnull);
|
||||
if (mState.frame && mState.siblingIndex < 0 &&
|
||||
(parentFrame->GetType() == nsAccessibilityAtoms::blockFrame ||
|
||||
parentFrame->GetType() == nsAccessibilityAtoms::inlineFrame ||
|
||||
parentFrame->GetType() == nsAccessibilityAtoms::inlineBlockFrame)) {
|
||||
// Container frames can contain generated content frames from
|
||||
// :before and :after style rules, so we walk their frame trees
|
||||
// instead of content trees
|
||||
mState.domNode = do_QueryInterface(mState.frame->GetContent());
|
||||
mState.siblingIndex = eSiblingsWalkFrames;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mState.frame = mState.frame->GetNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче