Bug 1718162 [wpt PR 29492] - Address clusterfuzz errors with image maps and a11y, a=testonly

Automatic update from web-platform-tests
Address clusterfuzz errors with image maps and a11y

Ignore <img usemap> inside of any <map>, in order to avoid potential
loops in the tree structure.

Fixed: 1221999
Change-Id: Ib5a112e1bc7f39d2a702fa39dedc4145d29d54b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2986380
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Kurt Catti-Schmidt <kschmi@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#896160}

--

wpt-commits: 0d89db41ff09f470ca0a645c31455578a5100ab5
wpt-pr: 29492
This commit is contained in:
Aaron Leventhal 2021-06-25 22:19:54 +00:00 коммит произвёл moz-wptsync-bot
Родитель ae189b38a7
Коммит a340096c3f
2 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,11 @@
<html>
<img usemap="map2" class="img-outside-map">
<map name="map2"></map>
<script>
const img = document.createElement('img');
img.className = 'img-inside-map';
img.setAttribute('usemap', '#map2');
img.style.visibility = 'collapse';
document.querySelector('map').appendChild(img);
</script>
</html>

Просмотреть файл

@ -0,0 +1,16 @@
<html>
<script>
const imgOutsideMap = document.createElement('img');
imgOutsideMap.className="img-outside-map";
imgOutsideMap.setAttribute('usemap', '#map2');
document.documentElement.appendChild(imgOutsideMap);
const map = document.createElement('map');
map.setAttribute('name', 'map2');
document.documentElement.appendChild(map);
const imgInsideMap = document.createElement('img');
imgInsideMap.className="img-inside-map";
imgInsideMap.setAttribute('usemap', '#map2');
imgInsideMap.style.visibility = 'collapse';
map.appendChild(imgInsideMap);
</script>
</html>