Log Message
Allow image map adding/removing when in tree scope https://bugs.webkit.org/show_bug.cgi?id=241263
Patch by Rob Buis <[email protected]> on 2022-06-03 Reviewed by Ryosuke Niwa. Allow image map adding/removing when in tree scope, even when disconnected, to avoid insert/remove mismatches. * Source/WebCore/html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseAttribute): Canonical link: https://commits.webkit.org/251267@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/html/HTMLMapElement.cpp (295209 => 295210)
--- trunk/Source/WebCore/html/HTMLMapElement.cpp 2022-06-03 15:13:50 UTC (rev 295209)
+++ trunk/Source/WebCore/html/HTMLMapElement.cpp 2022-06-03 15:24:42 UTC (rev 295210)
@@ -95,13 +95,13 @@
if (document().isHTMLDocument())
return;
}
- if (isConnected())
+ if (isInTreeScope())
treeScope().removeImageMap(*this);
AtomString mapName = value;
if (mapName[0] == '#')
mapName = StringView(mapName).substring(1).toAtomString();
m_name = WTFMove(mapName);
- if (isConnected())
+ if (isInTreeScope())
treeScope().addImageMap(*this);
return;
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
