| Index: Source/core/editing/markup.cpp
|
| diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
|
| index 8aad0b752e12ba8f6a8828019a2233d247eae420..9e4c3f09b3a46d2f03a94b384f1a1ee9036a38b3 100644
|
| --- a/Source/core/editing/markup.cpp
|
| +++ b/Source/core/editing/markup.cpp
|
| @@ -115,8 +115,6 @@ static void completeURLs(DocumentFragment& fragment, const String& baseURL)
|
| KURL parsedBaseURL(ParsedURLString, baseURL);
|
|
|
| for (Element* element = ElementTraversal::firstWithin(fragment); element; element = ElementTraversal::next(*element, &fragment)) {
|
| - if (!element->hasAttributes())
|
| - continue;
|
| AttributeCollection attributes = element->attributes();
|
| AttributeCollection::const_iterator end = attributes.end();
|
| for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
|
| @@ -296,15 +294,13 @@ void StyledMarkupAccumulator::appendElement(StringBuilder& out, Element& element
|
| const bool shouldAnnotateOrForceInline = element.isHTMLElement() && (shouldAnnotate() || addDisplayInline);
|
| const bool shouldOverrideStyleAttr = shouldAnnotateOrForceInline || shouldApplyWrappingStyle(element);
|
|
|
| - if (element.hasAttributes()) {
|
| - AttributeCollection attributes = element.attributes();
|
| - AttributeCollection::const_iterator end = attributes.end();
|
| - for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
|
| - // We'll handle the style attribute separately, below.
|
| - if (it->name() == styleAttr && shouldOverrideStyleAttr)
|
| - continue;
|
| - appendAttribute(out, element, *it, 0);
|
| - }
|
| + AttributeCollection attributes = element.attributes();
|
| + AttributeCollection::const_iterator end = attributes.end();
|
| + for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
|
| + // We'll handle the style attribute separately, below.
|
| + if (it->name() == styleAttr && shouldOverrideStyleAttr)
|
| + continue;
|
| + appendAttribute(out, element, *it, 0);
|
| }
|
|
|
| if (shouldOverrideStyleAttr) {
|
|
|