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

Side by Side Diff: Source/core/editing/EditingStyle.cpp

Issue 192373008: ASSERTION FAILED: !style->propertyIsImportant(propertyID) in WebCore::setTextDecorationProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « Source/core/editing/ApplyStyleCommand.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc.
3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 // Save the result for later 1400 // Save the result for later
1401 m_cssStyle = mutableStyle->asText().stripWhiteSpace(); 1401 m_cssStyle = mutableStyle->asText().stripWhiteSpace();
1402 } 1402 }
1403 1403
1404 static void setTextDecorationProperty(MutableStylePropertySet* style, const CSSV alueList* newTextDecoration, CSSPropertyID propertyID) 1404 static void setTextDecorationProperty(MutableStylePropertySet* style, const CSSV alueList* newTextDecoration, CSSPropertyID propertyID)
1405 { 1405 {
1406 if (newTextDecoration->length()) 1406 if (newTextDecoration->length())
1407 style->setProperty(propertyID, newTextDecoration->cssText(), style->prop ertyIsImportant(propertyID)); 1407 style->setProperty(propertyID, newTextDecoration->cssText(), style->prop ertyIsImportant(propertyID));
1408 else { 1408 else {
1409 // text-decoration: none is redundant since it does not remove any text decorations. 1409 // text-decoration: none is redundant since it does not remove any text decorations.
1410 ASSERT(!style->propertyIsImportant(propertyID));
1411 style->removeProperty(propertyID); 1410 style->removeProperty(propertyID);
1412 } 1411 }
1413 } 1412 }
1414 1413
1415 void StyleChange::extractTextStyles(Document* document, MutableStylePropertySet* style, bool shouldUseFixedFontDefaultSize) 1414 void StyleChange::extractTextStyles(Document* document, MutableStylePropertySet* style, bool shouldUseFixedFontDefaultSize)
1416 { 1415 {
1417 ASSERT(style); 1416 ASSERT(style);
1418 1417
1419 if (getIdentifierValue(style, CSSPropertyFontWeight) == CSSValueBold) { 1418 if (getIdentifierValue(style, CSSPropertyFontWeight) == CSSValueBold) {
1420 style->removeProperty(CSSPropertyFontWeight); 1419 style->removeProperty(CSSPropertyFontWeight);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 { 1633 {
1635 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1634 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1636 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor); 1635 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor);
1637 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1636 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1638 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1637 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1639 } 1638 }
1640 return nullptr; 1639 return nullptr;
1641 } 1640 }
1642 1641
1643 } 1642 }
OLDNEW
« no previous file with comments | « Source/core/editing/ApplyStyleCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698