| Index: Source/core/editing/EditingStyle.cpp
|
| diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp
|
| index e3f48b48d3640b4150c015b10f8a5d296627e02f..eaf89f1bad5b479f2f1cbcba14e868b6b6e98f37 100644
|
| --- a/Source/core/editing/EditingStyle.cpp
|
| +++ b/Source/core/editing/EditingStyle.cpp
|
| @@ -909,7 +909,8 @@ bool EditingStyle::elementIsStyledSpanOrHTMLEquivalent(const HTMLElement* elemen
|
| }
|
| }
|
|
|
| - if (!element->hasAttributes())
|
| + AttributeCollection attributes = element->attributes();
|
| + if (attributes.isEmpty())
|
| return elementIsSpanOrElementEquivalent; // span, b, etc... without any attributes
|
|
|
| unsigned matchedAttributes = 0;
|
| @@ -937,8 +938,8 @@ bool EditingStyle::elementIsStyledSpanOrHTMLEquivalent(const HTMLElement* elemen
|
| }
|
|
|
| // font with color attribute, span with style attribute, etc...
|
| - ASSERT(matchedAttributes <= element->attributes().size());
|
| - return matchedAttributes >= element->attributes().size();
|
| + ASSERT(matchedAttributes <= attributes.size());
|
| + return matchedAttributes >= attributes.size();
|
| }
|
|
|
| void EditingStyle::prepareToApplyAt(const Position& position, ShouldPreserveWritingDirection shouldPreserveWritingDirection)
|
|
|