Index: Source/core/html/parser/HTMLConstructionSite.cpp |
diff --git a/Source/core/html/parser/HTMLConstructionSite.cpp b/Source/core/html/parser/HTMLConstructionSite.cpp |
index 9e74f169c585411620543a60577a30ee052851a8..10643a2935c2c7ab26ad2dced342512e773333c2 100644 |
--- a/Source/core/html/parser/HTMLConstructionSite.cpp |
+++ b/Source/core/html/parser/HTMLConstructionSite.cpp |
@@ -37,6 +37,7 @@ |
#include "core/dom/Text.h" |
#include "core/html/HTMLFormElement.h" |
#include "core/html/HTMLHtmlElement.h" |
+#include "core/html/HTMLOptGroupElement.h" |
#include "core/html/HTMLScriptElement.h" |
#include "core/html/HTMLTemplateElement.h" |
#include "core/html/parser/AtomicHTMLToken.h" |
@@ -68,7 +69,7 @@ static bool hasImpliedEndTag(const HTMLStackItem* item) |
|| item->hasTagName(dtTag) |
|| item->hasTagName(liTag) |
|| item->hasTagName(optionTag) |
- || item->hasTagName(optgroupTag) |
+ || isHTMLOptGroupElement(item->node()) |
|| item->hasTagName(pTag) |
|| item->hasTagName(rpTag) |
|| item->hasTagName(rtTag); |