Index: Source/core/css/StyleResolver.cpp |
diff --git a/Source/core/css/StyleResolver.cpp b/Source/core/css/StyleResolver.cpp |
index fe48ec0901827d6536604c615308f7e9e59ca2ce..ccd516bd86452dc9e41fc391ad45bb5e24f12799 100644 |
--- a/Source/core/css/StyleResolver.cpp |
+++ b/Source/core/css/StyleResolver.cpp |
@@ -865,6 +865,9 @@ bool StyleResolver::canShareStyleWithElement(StyledElement* element) const |
if (element->isLink() && state.elementLinkState() != style->insideLink()) |
return false; |
+ if (element->isUnresolvedCustomElement() != state.element()->isUnresolvedCustomElement()) |
+ return false; |
+ |
// Deny sharing styles between WebVTT and non-WebVTT nodes. |
if (element->isWebVTTElement() != state.element()->isWebVTTElement()) |
return false; |