| Index: third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp b/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
|
| index ac96cdd1ccaa4ce8e75665b4efcbdfef5e9402cd..1e1ef1618dd0581e59849433d068d453917cac55 100644
|
| --- a/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
|
| @@ -182,11 +182,7 @@ static bool elementCannotHaveEndTag(const Node& node) {
|
| if (!node.isHTMLElement())
|
| return false;
|
|
|
| - // FIXME: ieForbidsInsertHTML may not be the right function to call here
|
| - // ieForbidsInsertHTML is used to disallow setting innerHTML/outerHTML
|
| - // or createContextualFragment. It does not necessarily align with
|
| - // which elements should be serialized w/o end tags.
|
| - return toHTMLElement(node).ieForbidsInsertHTML();
|
| + return !toHTMLElement(node).shouldSerializeEndTag();
|
| }
|
|
|
| void MarkupFormatter::appendEndMarkup(StringBuilder& result,
|
| @@ -495,7 +491,7 @@ EntityMask MarkupFormatter::entityMaskForText(const Text& text) const {
|
| // Rules of self-closure
|
| // 1. No elements in HTML documents use the self-closing syntax.
|
| // 2. Elements w/ children never self-close because they use a separate end tag.
|
| -// 3. HTML elements which do not have a "forbidden" end tag will close with a
|
| +// 3. HTML elements which do not listed in spec will close with a
|
| // separate end tag.
|
| // 4. Other elements self-close.
|
| bool MarkupFormatter::shouldSelfClose(const Element& element) const {
|
|
|