Bug 1615502 - Support list items with display:contents. r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D62947

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eitan Isaacson 2020-02-14 21:14:02 +00:00
parent 85d206a203
commit 1fedcb34de

View File

@ -38,12 +38,15 @@ HTMLLIAccessible::HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc)
: HyperTextAccessibleWrap(aContent, aDoc), mBullet(nullptr) {
mType = eHTMLLiType;
const nsStyleList* styleList = GetFrame()->StyleList();
if (nsLayoutUtils::GetMarkerFrame(aContent) &&
(styleList->GetListStyleImage() || !styleList->mCounterStyle.IsNone())) {
mBullet = new HTMLListBulletAccessible(mContent, mDoc);
Document()->BindToDocument(mBullet, nullptr);
AppendChild(mBullet);
if (nsIFrame* bulletFrame = nsLayoutUtils::GetMarkerFrame(aContent)) {
if (const nsStyleList* styleList = bulletFrame->StyleList()) {
if (styleList->GetListStyleImage() ||
!styleList->mCounterStyle.IsNone()) {
mBullet = new HTMLListBulletAccessible(mContent, mDoc);
Document()->BindToDocument(mBullet, nullptr);
AppendChild(mBullet);
}
}
}
}