ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement

The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
to default 0. This way we have to check its existence before the usage.

Backported from my WebKit patch: http://trac.webkit.org/changeset/154439

R=hayato@chromium.org
BUG=350414

Review URL: https://codereview.chromium.org/190993002

git-svn-id: svn://svn.chromium.org/blink/trunk@169948 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d3030bc8
<html>
<body>
<table>
<td>
<a></a>
</td>
</table>
<script>
if (window.testRunner)
testRunner.dumpAsText();
document.designMode = "on";
document.execCommand("SelectAll");
document.execCommand("CreateLink", 0, 'foo');
document.body.innerHTML = "PASS. Blink didn't crash.";
</script>
</body>
</html>
\ No newline at end of file
......@@ -892,8 +892,8 @@ bool ApplyStyleCommand::removeInlineStyleFromElement(EditingStyle* style, PassRe
if (isStyledInlineElementToRemove(element.get())) {
if (mode == RemoveNone)
return true;
ASSERT(extractedStyle);
extractedStyle->mergeInlineStyleOfElement(element.get(), EditingStyle::OverrideValues);
if (extractedStyle)
extractedStyle->mergeInlineStyleOfElement(element.get(), EditingStyle::OverrideValues);
removeNodePreservingChildren(element);
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment