зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1545190 - Allow table in host and row in shadow. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D27993 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
96cc526deb
Коммит
cb33ea8e16
|
@ -1395,14 +1395,19 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
|
|||
table = aContext->Parent();
|
||||
|
||||
if (table) {
|
||||
nsIContent* parentContent = aContent->GetParent();
|
||||
nsIFrame* parentFrame = parentContent->GetPrimaryFrame();
|
||||
if (!parentFrame->IsTableWrapperFrame()) {
|
||||
parentContent = parentContent->GetParent();
|
||||
nsIContent* parentContent = aContent->GetParentOrHostNode()->AsContent();
|
||||
nsIFrame* parentFrame = nullptr;
|
||||
if (parentContent) {
|
||||
parentFrame = parentContent->GetPrimaryFrame();
|
||||
if (!parentFrame || !parentFrame->IsTableWrapperFrame()) {
|
||||
parentContent = parentContent->GetParentOrHostNode()->AsContent();
|
||||
if (parentContent) {
|
||||
parentFrame = parentContent->GetPrimaryFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parentFrame->IsTableWrapperFrame() &&
|
||||
if (parentFrame && parentFrame->IsTableWrapperFrame() &&
|
||||
table->GetContent() == parentContent) {
|
||||
newAcc = new HTMLTableRowAccessible(aContent, document);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,16 @@
|
|||
],
|
||||
});
|
||||
|
||||
// Shadow root boundary between table and row
|
||||
testElm("table", {
|
||||
role: ROLE_TABLE,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_ROW,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -33,6 +43,8 @@
|
|||
</head>
|
||||
<body>
|
||||
<div role="group" id="component"></div>
|
||||
<div id="table" role="table" style="display: table;"></div>
|
||||
|
||||
<script>
|
||||
var component = document.getElementById("component");
|
||||
var shadow = component.attachShadow({mode: "open"});
|
||||
|
@ -46,5 +58,11 @@
|
|||
|
||||
shadow.appendChild(button);
|
||||
shadow.appendChild(a);
|
||||
|
||||
var table = document.getElementById("table");
|
||||
shadow = table.attachShadow({mode: "open"});
|
||||
shadow.innerHTML = "<div style='display: table-row'>" +
|
||||
"<div style='display: table-cell'>hi</div>" +
|
||||
"</div>";
|
||||
</script>
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче