Release assert with <img usemap> in shadow tree
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jan 2019 13:15:11 +0000 (13:15 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jan 2019 13:15:11 +0000 (13:15 +0000)
commitbdac5e926b5c5c6eab21fe35a2bbb5e11d792ad3
tree36320096c84005abfdfac8b90f39779c42f08ab9
parent5f75b7876905c45f44cba3024899b55c03c7f95e
Release assert with <img usemap> in shadow tree
https://bugs.webkit.org/show_bug.cgi?id=193378

Reviewed by Ryosuke Niwa.

Source/WebCore:

When a shadow host that has <img usemap> in the shadow tree is removed from the document, we try
to remove the map from the scope of the host.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::insertedIntoAncestor):
(WebCore::HTMLImageElement::removedFromAncestor):

Tree scope changes are relevant, not the connection to the document.

LayoutTests:

* fast/shadow-dom/image-map-tree-scope.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/shadow-dom/image-map-tree-scope-expected.txt
LayoutTests/fast/shadow-dom/image-map-tree-scope.html
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLImageElement.cpp