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

Unified Diff: WebCore/editing/ApplyStyleCommand.cpp

Issue 3389031: Merge 67967 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 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/apply-style-text-decoration-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/editing/ApplyStyleCommand.cpp
===================================================================
--- WebCore/editing/ApplyStyleCommand.cpp (revision 68294)
+++ WebCore/editing/ApplyStyleCommand.cpp (working copy)
@@ -219,8 +219,8 @@
// Assuming reconcileTextDecorationProperties has been called, there should not be -webkit-text-decorations-in-effect
// Furthermore, text-decoration: none has been trimmed so that text-decoration property is always a CSSValueList.
- if (RefPtr<CSSValue> textDecoration = style->getPropertyCSSValue(CSSPropertyTextDecoration)) {
- ASSERT(textDecoration->isValueList());
+ RefPtr<CSSValue> textDecoration = style->getPropertyCSSValue(CSSPropertyTextDecoration);
+ if (textDecoration && textDecoration->isValueList()) {
DEFINE_STATIC_LOCAL(RefPtr<CSSPrimitiveValue>, underline, (CSSPrimitiveValue::createIdentifier(CSSValueUnderline)));
DEFINE_STATIC_LOCAL(RefPtr<CSSPrimitiveValue>, lineThrough, (CSSPrimitiveValue::createIdentifier(CSSValueLineThrough)));
@@ -1387,11 +1387,9 @@
newInlineStyle->setProperty(it->id(), it->value()->cssText(), it->isImportant(), ec);
// text-decorations adds up
- if (it->id() == CSSPropertyTextDecoration) {
- ASSERT(it->value()->isValueList());
+ if (it->id() == CSSPropertyTextDecoration && it->value()->isValueList()) {
RefPtr<CSSValue> textDecoration = newInlineStyle->getPropertyCSSValue(CSSPropertyTextDecoration);
- if (textDecoration) {
- ASSERT(textDecoration->isValueList());
+ if (textDecoration && textDecoration->isValueList()) {
CSSValueList* textDecorationOfInlineStyle = static_cast<CSSValueList*>(textDecoration.get());
CSSValueList* textDecorationOfStyleApplied = static_cast<CSSValueList*>(it->value());
« no previous file with comments | « LayoutTests/editing/execCommand/apply-style-text-decoration-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698