Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: Source/core/editing/ApplyStyleCommand.cpp

Issue 23600068: ContentEditable plaintext-only crash fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/editing/execCommand/crash-on-plaintext-createLink-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ApplyStyleCommand.cpp
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
index 43cc1ddea1e2dba61ed6d74fadb53a9ba138cbb5..ba5921b27ed347392278d6a89e1537a072cefd07 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -759,10 +759,12 @@ void ApplyStyleCommand::applyInlineStyleToNodeRange(EditingStyle* style, PassRef
break;
// Add to this element's inline style and skip over its contents.
HTMLElement* element = toHTMLElement(node.get());
+ next = NodeTraversal::nextSkippingChildren(node.get());
+ if (!style->style())
+ continue;
RefPtr<MutableStylePropertySet> inlineStyle = copyStyleOrCreateEmpty(element->inlineStyle());
inlineStyle->mergeAndOverrideOnConflict(style->style());
setNodeAttribute(element, styleAttr, inlineStyle->asText());
- next = NodeTraversal::nextSkippingChildren(node.get());
continue;
}
« no previous file with comments | « LayoutTests/editing/execCommand/crash-on-plaintext-createLink-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698