Changeset 65749 in webkit
- Timestamp:
- Aug 20, 2010 12:44:50 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r65748 r65749 1 2010-08-19 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 style correction in markup.cpp 6 https://bugs.webkit.org/show_bug.cgi?id=44318 7 8 Make markup.cpp pass check-webkit-style. 9 10 No new tests are added since this is a cleanup. 11 12 * editing/markup.cpp: 13 (WebCore::MarkupAccumulator::appendAttributeValue): 14 (WebCore::appendEscapedContent): 15 (WebCore::MarkupAccumulator::appendStartMarkup): 16 (WebCore::completeURLs): 17 (WebCore::isElementPresentational): 18 (WebCore::isSpecialAncestorBlock): 19 (WebCore::shouldIncludeWrapperForFullySelectedRoot): 20 (WebCore::createMarkup): 21 (WebCore::fillContainerFromString): 22 (WebCore::createFragmentFromText): 23 (WebCore::createFragmentFromNodes): 24 1 25 2010-08-20 Tony Chang <tony@chromium.org> 2 26 -
trunk/WebCore/editing/markup.cpp
r65680 r65749 27 27 #include "markup.h" 28 28 29 #include "ApplyStyleCommand.h" 29 30 #include "CDATASection.h" 30 31 #include "CharacterNames.h" … … 53 54 #include "ProcessingInstruction.h" 54 55 #include "Range.h" 56 #include "TextIterator.h" 55 57 #include "VisibleSelection.h" 56 #include "TextIterator.h"57 58 #include "XMLNSNames.h" 58 59 #include "htmlediting.h" 59 60 #include "visible_units.h" 60 61 #include <wtf/StdLibExtras.h> 61 #include "ApplyStyleCommand.h"62 62 63 63 using namespace std; … … 231 231 UChar c = uchars[i]; 232 232 switch (c) { 233 case '&': 234 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 235 append(result, ampEntity); 236 lastCopiedFrom = i + 1; 233 case '&': 234 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 235 append(result, ampEntity); 236 lastCopiedFrom = i + 1; 237 break; 238 case '<': 239 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 240 append(result, ltEntity); 241 lastCopiedFrom = i + 1; 242 break; 243 case '>': 244 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 245 append(result, gtEntity); 246 lastCopiedFrom = i + 1; 247 break; 248 case '"': 249 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 250 append(result, quotEntity); 251 lastCopiedFrom = i + 1; 252 break; 253 case noBreakSpace: 254 if (!escapeNBSP) 237 255 break; 238 case '<': 239 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 240 append(result, ltEntity); 241 lastCopiedFrom = i + 1; 242 break; 243 case '>': 244 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 245 append(result, gtEntity); 246 lastCopiedFrom = i + 1; 247 break; 248 case '"': 249 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 250 append(result, quotEntity); 251 lastCopiedFrom = i + 1; 252 break; 253 case noBreakSpace: 254 if (escapeNBSP) { 255 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 256 append(result, nbspEntity); 257 lastCopiedFrom = i + 1; 258 } 259 break; 256 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 257 append(result, nbspEntity); 258 lastCopiedFrom = i + 1; 260 259 } 261 260 } … … 278 277 UChar c = uchars[i]; 279 278 switch (c) { 280 case '&': 281 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 282 append(result, ampEntity); 283 lastCopiedFrom = i + 1; 279 case '&': 280 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 281 append(result, ampEntity); 282 lastCopiedFrom = i + 1; 283 break; 284 case '<': 285 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 286 append(result, ltEntity); 287 lastCopiedFrom = i + 1; 288 break; 289 case '>': 290 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 291 append(result, gtEntity); 292 lastCopiedFrom = i + 1; 293 break; 294 case noBreakSpace: 295 if (!escapeNBSP) 284 296 break; 285 case '<': 286 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 287 append(result, ltEntity); 288 lastCopiedFrom = i + 1; 289 break; 290 case '>': 291 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 292 append(result, gtEntity); 293 lastCopiedFrom = i + 1; 294 break; 295 case noBreakSpace: 296 if (escapeNBSP) { 297 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 298 append(result, nbspEntity); 299 lastCopiedFrom = i + 1; 300 } 301 break; 297 result.append(uchars + lastCopiedFrom, i - lastCopiedFrom); 298 append(result, nbspEntity); 299 lastCopiedFrom = i + 1; 300 break; 302 301 } 303 302 } … … 522 521 bool documentIsHTML = node->document()->isHTMLDocument(); 523 522 switch (node->nodeType()) { 524 case Node::TEXT_NODE: { 525 if (Node* parent = node->parentNode()) { 526 if (parent->hasTagName(scriptTag) 527 || parent->hasTagName(styleTag) 528 || parent->hasTagName(xmpTag)) { 529 appendUCharRange(result, ucharRange(node, m_range)); 530 break; 531 } else if (parent->hasTagName(textareaTag)) { 532 appendEscapedContent(result, ucharRange(node, m_range), documentIsHTML); 533 break; 534 } 523 case Node::TEXT_NODE: { 524 if (Node* parent = node->parentNode()) { 525 if (parent->hasTagName(scriptTag) 526 || parent->hasTagName(styleTag) 527 || parent->hasTagName(xmpTag)) { 528 appendUCharRange(result, ucharRange(node, m_range)); 529 break; 535 530 } 536 if ( !shouldAnnotate()) {531 if (parent->hasTagName(textareaTag)) { 537 532 appendEscapedContent(result, ucharRange(node, m_range), documentIsHTML); 538 533 break; 539 534 } 540 535 } 536 if (shouldAnnotate()) { 541 537 bool useRenderedText = !enclosingNodeWithTag(Position(const_cast<Node*>(node), 0), selectTag); 542 538 String markup = escapeContentText(useRenderedText ? renderedText(node, m_range) : stringValueForRange(node, m_range), false); … … 545 541 break; 546 542 } 547 case Node::COMMENT_NODE: 548 // FIXME: Comment content is not escaped, but XMLSerializer (and possibly other callers) should raise an exception if it includes "-->". 549 append(result, "<!--"); 550 append(result, static_cast<const Comment*>(node)->data()); 551 append(result, "-->"); 552 break; 553 case Node::DOCUMENT_NODE: 554 case Node::DOCUMENT_FRAGMENT_NODE: 555 break; 556 case Node::DOCUMENT_TYPE_NODE: 557 appendDocumentType(result, static_cast<const DocumentType*>(node)); 558 break; 559 case Node::PROCESSING_INSTRUCTION_NODE: { 560 // FIXME: PI data is not escaped, but XMLSerializer (and possibly other callers) this should raise an exception if it includes "?>". 561 const ProcessingInstruction* n = static_cast<const ProcessingInstruction*>(node); 562 append(result, "<?"); 563 append(result, n->target()); 564 append(result, " "); 565 append(result, n->data()); 566 append(result, "?>"); 567 break; 568 } 569 case Node::ELEMENT_NODE: { 570 result.append('<'); 571 const Element* el = static_cast<const Element*>(node); 572 bool convert = convertBlocksToInlines && isBlock(const_cast<Node*>(node)); 573 append(result, el->nodeNamePreservingCase()); 574 NamedNodeMap *attrs = el->attributes(); 575 unsigned length = attrs->length(); 576 if (!documentIsHTML && namespaces && shouldAddNamespaceElement(el)) 577 appendNamespace(result, el->prefix(), el->namespaceURI(), *namespaces); 578 579 for (unsigned int i = 0; i < length; i++) { 580 Attribute *attr = attrs->attributeItem(i); 581 // We'll handle the style attribute separately, below. 582 if (attr->name() == styleAttr && el->isHTMLElement() && (shouldAnnotate() || convert)) 583 continue; 584 result.append(' '); 585 586 if (documentIsHTML) 587 append(result, attr->name().localName()); 543 appendEscapedContent(result, ucharRange(node, m_range), documentIsHTML); 544 break; 545 } 546 case Node::COMMENT_NODE: 547 // FIXME: Comment content is not escaped, but XMLSerializer (and possibly other callers) should raise an exception if it includes "-->". 548 append(result, "<!--"); 549 append(result, static_cast<const Comment*>(node)->data()); 550 append(result, "-->"); 551 break; 552 case Node::DOCUMENT_NODE: 553 case Node::DOCUMENT_FRAGMENT_NODE: 554 break; 555 case Node::DOCUMENT_TYPE_NODE: 556 appendDocumentType(result, static_cast<const DocumentType*>(node)); 557 break; 558 case Node::PROCESSING_INSTRUCTION_NODE: { 559 // FIXME: PI data is not escaped, but XMLSerializer (and possibly other callers) this should raise an exception if it includes "?>". 560 const ProcessingInstruction* n = static_cast<const ProcessingInstruction*>(node); 561 append(result, "<?"); 562 append(result, n->target()); 563 append(result, " "); 564 append(result, n->data()); 565 append(result, "?>"); 566 break; 567 } 568 case Node::ELEMENT_NODE: { 569 result.append('<'); 570 Element* element = const_cast<Element*>(static_cast<const Element*>(node)); 571 bool convert = convertBlocksToInlines && isBlock(const_cast<Node*>(node)); 572 append(result, element->nodeNamePreservingCase()); 573 if (!documentIsHTML && namespaces && shouldAddNamespaceElement(element)) 574 appendNamespace(result, element->prefix(), element->namespaceURI(), *namespaces); 575 576 NamedNodeMap* attributes = element->attributes(); 577 unsigned length = attributes->length(); 578 for (unsigned int i = 0; i < length; i++) { 579 Attribute* attribute = attributes->attributeItem(i); 580 // We'll handle the style attribute separately, below. 581 if (attribute->name() == styleAttr && element->isHTMLElement() && (shouldAnnotate() || convert)) 582 continue; 583 result.append(' '); 584 585 if (documentIsHTML) 586 append(result, attribute->name().localName()); 587 else 588 append(result, attribute->name().toString()); 589 590 result.append('='); 591 592 if (element->isURLAttribute(attribute)) { 593 // We don't want to complete file:/// URLs because it may contain sensitive information 594 // about the user's system. 595 if (shouldResolveURLs() && !node->document()->url().isLocalFile()) 596 appendQuotedURLAttributeValue(result, node->document()->completeURL(attribute->value()).string()); 588 597 else 589 append(result, attr->name().toString()); 590 591 result.append('='); 592 593 if (el->isURLAttribute(attr)) { 594 // We don't want to complete file:/// URLs because it may contain sensitive information 595 // about the user's system. 596 if (shouldResolveURLs() && !node->document()->url().isLocalFile()) 597 appendQuotedURLAttributeValue(result, node->document()->completeURL(attr->value()).string()); 598 else 599 appendQuotedURLAttributeValue(result, attr->value().string()); 600 } else { 601 result.append('\"'); 602 appendAttributeValue(result, attr->value(), documentIsHTML); 603 result.append('\"'); 598 appendQuotedURLAttributeValue(result, attribute->value().string()); 599 } else { 600 result.append('\"'); 601 appendAttributeValue(result, attribute->value(), documentIsHTML); 602 result.append('\"'); 603 } 604 605 if (!documentIsHTML && namespaces && shouldAddNamespaceAttribute(attribute, *namespaces)) 606 appendNamespace(result, attribute->prefix(), attribute->namespaceURI(), *namespaces); 607 } 608 609 if (element->isHTMLElement() && (shouldAnnotate() || convert)) { 610 RefPtr<CSSMutableStyleDeclaration> style = static_cast<HTMLElement*>(element)->getInlineStyleDecl()->copy(); 611 if (shouldAnnotate()) { 612 RefPtr<CSSMutableStyleDeclaration> styleFromMatchedRules = styleFromMatchedRulesForElement(const_cast<Element*>(element)); 613 // Styles from the inline style declaration, held in the variable "style", take precedence 614 // over those from matched rules. 615 styleFromMatchedRules->merge(style.get()); 616 style = styleFromMatchedRules; 617 618 RefPtr<CSSComputedStyleDeclaration> computedStyleForElement = computedStyle(element); 619 RefPtr<CSSMutableStyleDeclaration> fromComputedStyle = CSSMutableStyleDeclaration::create(); 620 621 { 622 CSSMutableStyleDeclaration::const_iterator end = style->end(); 623 for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) { 624 const CSSProperty& property = *it; 625 CSSValue* value = property.value(); 626 // The property value, if it's a percentage, may not reflect the actual computed value. 627 // For example: style="height: 1%; overflow: visible;" in quirksmode 628 // FIXME: There are others like this, see <rdar://problem/5195123> Slashdot copy/paste fidelity problem 629 if (value->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE) 630 if (static_cast<CSSPrimitiveValue*>(value)->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE) 631 if (RefPtr<CSSValue> computedPropertyValue = computedStyleForElement->getPropertyCSSValue(property.id())) 632 fromComputedStyle->addParsedProperty(CSSProperty(property.id(), computedPropertyValue)); 633 } 604 634 } 605 606 if (!documentIsHTML && namespaces && shouldAddNamespaceAttribute(attr, *namespaces)) 607 appendNamespace(result, attr->prefix(), attr->namespaceURI(), *namespaces); 635 style->merge(fromComputedStyle.get()); 608 636 } 609 610 if (el->isHTMLElement() && (shouldAnnotate() || convert)) { 611 Element* element = const_cast<Element*>(el); 612 RefPtr<CSSMutableStyleDeclaration> style = static_cast<HTMLElement*>(element)->getInlineStyleDecl()->copy(); 613 if (shouldAnnotate()) { 614 RefPtr<CSSMutableStyleDeclaration> styleFromMatchedRules = styleFromMatchedRulesForElement(const_cast<Element*>(el)); 615 // Styles from the inline style declaration, held in the variable "style", take precedence 616 // over those from matched rules. 617 styleFromMatchedRules->merge(style.get()); 618 style = styleFromMatchedRules; 619 620 RefPtr<CSSComputedStyleDeclaration> computedStyleForElement = computedStyle(element); 621 RefPtr<CSSMutableStyleDeclaration> fromComputedStyle = CSSMutableStyleDeclaration::create(); 622 623 { 624 CSSMutableStyleDeclaration::const_iterator end = style->end(); 625 for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) { 626 const CSSProperty& property = *it; 627 CSSValue* value = property.value(); 628 // The property value, if it's a percentage, may not reflect the actual computed value. 629 // For example: style="height: 1%; overflow: visible;" in quirksmode 630 // FIXME: There are others like this, see <rdar://problem/5195123> Slashdot copy/paste fidelity problem 631 if (value->cssValueType() == CSSValue::CSS_PRIMITIVE_VALUE) 632 if (static_cast<CSSPrimitiveValue*>(value)->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE) 633 if (RefPtr<CSSValue> computedPropertyValue = computedStyleForElement->getPropertyCSSValue(property.id())) 634 fromComputedStyle->addParsedProperty(CSSProperty(property.id(), computedPropertyValue)); 635 } 636 } 637 638 style->merge(fromComputedStyle.get()); 639 } 640 if (convert) 641 style->setProperty(CSSPropertyDisplay, CSSValueInline, true); 642 // If the node is not fully selected by the range, then we don't want to keep styles that affect its relationship to the nodes around it 643 // only the ones that affect it and the nodes within it. 644 if (rangeFullySelectsNode == DoesNotFullySelectNode) 645 removeExteriorStyles(style.get()); 646 if (style->length() > 0) { 647 DEFINE_STATIC_LOCAL(const String, stylePrefix, (" style=\"")); 648 append(result, stylePrefix); 649 appendAttributeValue(result, style->cssText(), documentIsHTML); 650 result.append('\"'); 651 } 637 if (convert) 638 style->setProperty(CSSPropertyDisplay, CSSValueInline, true); 639 // If the node is not fully selected by the range, then we don't want to keep styles that affect its relationship to the nodes around it 640 // only the ones that affect it and the nodes within it. 641 if (rangeFullySelectsNode == DoesNotFullySelectNode) 642 removeExteriorStyles(style.get()); 643 if (style->length() > 0) { 644 DEFINE_STATIC_LOCAL(const String, stylePrefix, (" style=\"")); 645 append(result, stylePrefix); 646 appendAttributeValue(result, style->cssText(), documentIsHTML); 647 result.append('\"'); 652 648 } 653 654 if (shouldSelfClose(el)) { 655 if (el->isHTMLElement()) 656 result.append(' '); // XHTML 1.0 <-> HTML compatibility. 657 result.append('/'); 658 } 659 result.append('>'); 660 break; 661 } 662 case Node::CDATA_SECTION_NODE: { 663 // FIXME: CDATA content is not escaped, but XMLSerializer (and possibly other callers) should raise an exception if it includes "]]>". 664 const CDATASection* n = static_cast<const CDATASection*>(node); 665 append(result, "<![CDATA["); 666 append(result, n->data()); 667 append(result, "]]>"); 668 break; 669 } 670 case Node::ATTRIBUTE_NODE: 671 case Node::ENTITY_NODE: 672 case Node::ENTITY_REFERENCE_NODE: 673 case Node::NOTATION_NODE: 674 case Node::XPATH_NAMESPACE_NODE: 675 ASSERT_NOT_REACHED(); 676 break; 649 } 650 651 if (shouldSelfClose(element)) { 652 if (element->isHTMLElement()) 653 result.append(' '); // XHTML 1.0 <-> HTML compatibility. 654 result.append('/'); 655 } 656 result.append('>'); 657 break; 658 } 659 case Node::CDATA_SECTION_NODE: { 660 // FIXME: CDATA content is not escaped, but XMLSerializer (and possibly other callers) should raise an exception if it includes "]]>". 661 const CDATASection* n = static_cast<const CDATASection*>(node); 662 append(result, "<![CDATA["); 663 append(result, n->data()); 664 append(result, "]]>"); 665 break; 666 } 667 case Node::ATTRIBUTE_NODE: 668 case Node::ENTITY_NODE: 669 case Node::ENTITY_REFERENCE_NODE: 670 case Node::NOTATION_NODE: 671 case Node::XPATH_NAMESPACE_NODE: 672 ASSERT_NOT_REACHED(); 673 break; 677 674 } 678 675 } … … 724 721 if (n->isElementNode()) { 725 722 Element* e = static_cast<Element*>(n); 726 NamedNodeMap* attr s = e->attributes();727 unsigned length = attr s->length();723 NamedNodeMap* attributes = e->attributes(); 724 unsigned length = attributes->length(); 728 725 for (unsigned i = 0; i < length; i++) { 729 Attribute* attr = attrs->attributeItem(i);730 if (e->isURLAttribute(attr ))731 changes.append(AttributeChange(e, attr ->name(), KURL(parsedBaseURL, attr->value()).string()));726 Attribute* attribute = attributes->attributeItem(i); 727 if (e->isURLAttribute(attribute)) 728 changes.append(AttributeChange(e, attribute->name(), KURL(parsedBaseURL, attribute->value()).string())); 732 729 } 733 730 } … … 776 773 static bool isElementPresentational(const Node* node) 777 774 { 778 if (node->hasTagName(uTag) || node->hasTagName(sTag) || node->hasTagName(strikeTag) ||779 node->hasTagName(iTag) || node->hasTagName(emTag) || node->hasTagName(bTag) || node->hasTagName(strongTag))775 if (node->hasTagName(uTag) || node->hasTagName(sTag) || node->hasTagName(strikeTag) 776 || node->hasTagName(iTag) || node->hasTagName(emTag) || node->hasTagName(bTag) || node->hasTagName(strongTag)) 780 777 return true; 781 778 RefPtr<CSSMutableStyleDeclaration> style = styleFromMatchedRulesAndInlineDecl(node); … … 790 787 return false; 791 788 792 return node->hasTagName(listingTag) ||793 node->hasTagName(olTag) ||794 node->hasTagName(preTag) ||795 node->hasTagName(tableTag) ||796 node->hasTagName(ulTag) ||797 node->hasTagName(xmpTag) ||798 node->hasTagName(h1Tag) ||799 node->hasTagName(h2Tag) ||800 node->hasTagName(h3Tag) ||801 node->hasTagName(h4Tag) ||802 789 return node->hasTagName(listingTag) 790 || node->hasTagName(olTag) 791 || node->hasTagName(preTag) 792 || node->hasTagName(tableTag) 793 || node->hasTagName(ulTag) 794 || node->hasTagName(xmpTag) 795 || node->hasTagName(h1Tag) 796 || node->hasTagName(h2Tag) 797 || node->hasTagName(h3Tag) 798 || node->hasTagName(h4Tag) 799 || node->hasTagName(h5Tag); 803 800 } 804 801 … … 808 805 return true; 809 806 810 return style->getPropertyCSSValue(CSSPropertyBackgroundImage) || 811 style->getPropertyCSSValue(CSSPropertyBackgroundColor); 807 return style->getPropertyCSSValue(CSSPropertyBackgroundImage) || style->getPropertyCSSValue(CSSPropertyBackgroundColor); 812 808 } 813 809 … … 912 908 ExceptionCode ec = 0; 913 909 bool collapsed = updatedRange->collapsed(ec); 914 ASSERT( ec == 0);910 ASSERT(!ec); 915 911 if (collapsed) 916 912 return ""; 917 913 Node* commonAncestor = updatedRange->commonAncestorContainer(ec); 918 ASSERT( ec == 0);914 ASSERT(!ec); 919 915 if (!commonAncestor) 920 916 return ""; … … 1131 1127 if (string.isEmpty()) { 1132 1128 paragraph->appendChild(createBlockPlaceholderElement(document), ec); 1133 ASSERT( ec == 0);1129 ASSERT(!ec); 1134 1130 return; 1135 1131 } … … 1149 1145 if (!tabText.isEmpty()) { 1150 1146 paragraph->appendChild(createTabSpanElement(document, tabText), ec); 1151 ASSERT( ec == 0);1147 ASSERT(!ec); 1152 1148 tabText = ""; 1153 1149 } 1154 1150 RefPtr<Node> textNode = document->createTextNode(stringWithRebalancedWhitespace(s, first, i + 1 == numEntries)); 1155 1151 paragraph->appendChild(textNode.release(), ec); 1156 ASSERT( ec == 0);1152 ASSERT(!ec); 1157 1153 } 1158 1154 … … 1163 1159 else if (!tabText.isEmpty()) { 1164 1160 paragraph->appendChild(createTabSpanElement(document, tabText), ec); 1165 ASSERT( ec == 0);1161 ASSERT(!ec); 1166 1162 } 1167 1163 … … 1207 1203 if (renderer && renderer->style()->preserveNewline()) { 1208 1204 fragment->appendChild(document->createTextNode(string), ec); 1209 ASSERT( ec == 0);1205 ASSERT(!ec); 1210 1206 if (string.endsWith("\n")) { 1211 1207 RefPtr<Element> element = createBreakElement(document); 1212 1208 element->setAttribute(classAttr, AppleInterchangeNewline); 1213 1209 fragment->appendChild(element.release(), ec); 1214 ASSERT( ec == 0);1210 ASSERT(!ec); 1215 1211 } 1216 1212 return fragment.release(); … … 1251 1247 } 1252 1248 fragment->appendChild(element.release(), ec); 1253 ASSERT( ec == 0);1249 ASSERT(!ec); 1254 1250 } 1255 1251 return fragment.release(); … … 1272 1268 RefPtr<Element> element = createDefaultParagraphElement(document); 1273 1269 element->appendChild(nodes[i], ec); 1274 ASSERT( ec == 0);1270 ASSERT(!ec); 1275 1271 fragment->appendChild(element.release(), ec); 1276 ASSERT( ec == 0);1272 ASSERT(!ec); 1277 1273 } 1278 1274
Note: See TracChangeset
for help on using the changeset viewer.