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

Unified Diff: Source/core/editing/markup.cpp

Issue 22880029: Make AttachBehavior a required argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « Source/core/editing/htmlediting.cpp ('k') | Source/core/html/BaseButtonInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markup.cpp
diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
index 4638931d3a9975f9333c88532581a852a294f781..06ec0b17af48ca739fd16784005288f2b754f807 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -729,7 +729,7 @@ PassRefPtr<DocumentFragment> createFragmentFromMarkupWithContext(Document* docum
// TD, we need to include the enclosing TABLE tag as well.
RefPtr<DocumentFragment> fragment = DocumentFragment::create(document);
if (specialCommonAncestor)
- fragment->appendChild(specialCommonAncestor, ASSERT_NO_EXCEPTION);
+ fragment->appendChild(specialCommonAncestor, ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
else
fragment->takeAllChildrenFrom(toContainerNode(commonAncestor));
@@ -752,7 +752,7 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
Document* document = paragraph->document();
if (string.isEmpty()) {
- paragraph->appendChild(createBlockPlaceholderElement(document), ASSERT_NO_EXCEPTION);
+ paragraph->appendChild(createBlockPlaceholderElement(document), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
return;
}
@@ -769,11 +769,11 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
// append the non-tab textual part
if (!s.isEmpty()) {
if (!tabText.isEmpty()) {
- paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION);
+ paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
tabText = emptyString();
}
RefPtr<Node> textNode = document->createTextNode(stringWithRebalancedWhitespace(s, first, i + 1 == numEntries));
- paragraph->appendChild(textNode.release(), ASSERT_NO_EXCEPTION);
+ paragraph->appendChild(textNode.release(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
}
// there is a tab after every entry, except the last entry
@@ -781,7 +781,7 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
if (i + 1 != numEntries)
tabText.append('\t');
else if (!tabText.isEmpty())
- paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION);
+ paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
first = false;
}
@@ -829,11 +829,11 @@ PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String
string.replace('\r', '\n');
if (shouldPreserveNewline(*context)) {
- fragment->appendChild(document->createTextNode(string), ASSERT_NO_EXCEPTION);
+ fragment->appendChild(document->createTextNode(string), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
if (string.endsWith('\n')) {
RefPtr<Element> element = createBreakElement(document);
element->setAttribute(classAttr, AppleInterchangeNewline);
- fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
+ fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
}
return fragment.release();
}
@@ -875,7 +875,7 @@ PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String
element = createDefaultParagraphElement(document);
fillContainerFromString(element.get(), s);
}
- fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
+ fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
}
return fragment.release();
}
@@ -890,8 +890,8 @@ PassRefPtr<DocumentFragment> createFragmentFromNodes(Document *document, const V
size_t size = nodes.size();
for (size_t i = 0; i < size; ++i) {
RefPtr<Element> element = createDefaultParagraphElement(document);
- element->appendChild(nodes[i], ASSERT_NO_EXCEPTION);
- fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
+ element->appendChild(nodes[i], ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
+ fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
}
return fragment.release();
@@ -999,7 +999,7 @@ static inline void removeElementPreservingChildren(PassRefPtr<DocumentFragment>
for (RefPtr<Node> child = element->firstChild(); child; child = nextChild) {
nextChild = child->nextSibling();
element->removeChild(child.get(), ASSERT_NO_EXCEPTION);
- fragment->insertBefore(child, element, ASSERT_NO_EXCEPTION);
+ fragment->insertBefore(child, element, ASSERT_NO_EXCEPTION, DeprecatedAttachNow);
}
fragment->removeChild(element, ASSERT_NO_EXCEPTION);
}
« no previous file with comments | « Source/core/editing/htmlediting.cpp ('k') | Source/core/html/BaseButtonInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698