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

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

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (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/BaseChooserOnlyDateAndTimeInputType.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 da3b8c95d47e0b3d91a280a20528db2fef5037f7..9c07f3f61e0b039a10b808172b6322e065c0fd03 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -496,7 +496,7 @@ static bool isElementPresentational(const Node* node)
static Node* highestAncestorToWrapMarkup(const Range* range, EAnnotateForInterchange shouldAnnotate, Node* constrainingAncestor)
{
- Node* commonAncestor = range->commonAncestorContainer(IGNORE_EXCEPTION_STATE);
+ Node* commonAncestor = range->commonAncestorContainer(IGNORE_EXCEPTION);
ASSERT(commonAncestor);
Node* specialCommonAncestor = 0;
if (shouldAnnotate == AnnotateForInterchange) {
@@ -549,10 +549,10 @@ static String createMarkupInternal(Document* document, const Range* range, const
ASSERT(updatedRange);
DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, (ASCIILiteral("<br class=\"" AppleInterchangeNewline "\">")));
- bool collapsed = updatedRange->collapsed(ASSERT_NO_EXCEPTION_STATE);
+ bool collapsed = updatedRange->collapsed(ASSERT_NO_EXCEPTION);
if (collapsed)
return emptyString();
- Node* commonAncestor = updatedRange->commonAncestorContainer(ASSERT_NO_EXCEPTION_STATE);
+ Node* commonAncestor = updatedRange->commonAncestorContainer(ASSERT_NO_EXCEPTION);
if (!commonAncestor)
return emptyString();
@@ -577,7 +577,7 @@ static String createMarkupInternal(Document* document, const Range* range, const
accumulator.appendString(interchangeNewlineString);
startNode = visibleStart.next().deepEquivalent().deprecatedNode();
- if (pastEnd && Range::compareBoundaryPoints(startNode, 0, pastEnd, 0, ASSERT_NO_EXCEPTION_STATE) >= 0)
+ if (pastEnd && Range::compareBoundaryPoints(startNode, 0, pastEnd, 0, ASSERT_NO_EXCEPTION) >= 0)
return interchangeNewlineString;
}
@@ -682,7 +682,7 @@ static void trimFragment(DocumentFragment* fragment, Node* nodeBeforeContext, No
}
next = NodeTraversal::nextSkippingChildren(node.get());
ASSERT(!node->contains(nodeAfterContext));
- node->parentNode()->removeChild(node.get(), ASSERT_NO_EXCEPTION_STATE);
+ node->parentNode()->removeChild(node.get(), ASSERT_NO_EXCEPTION);
if (nodeBeforeContext == node)
break;
}
@@ -690,7 +690,7 @@ static void trimFragment(DocumentFragment* fragment, Node* nodeBeforeContext, No
ASSERT(nodeAfterContext->parentNode());
for (RefPtr<Node> node = nodeAfterContext; node; node = next) {
next = NodeTraversal::nextSkippingChildren(node.get());
- node->parentNode()->removeChild(node.get(), ASSERT_NO_EXCEPTION_STATE);
+ node->parentNode()->removeChild(node.get(), ASSERT_NO_EXCEPTION);
}
}
@@ -720,7 +720,7 @@ PassRefPtr<DocumentFragment> createFragmentFromMarkupWithContext(Document* docum
positionAfterNode(nodeBeforeContext.get()).parentAnchoredEquivalent(),
positionBeforeNode(nodeAfterContext.get()).parentAnchoredEquivalent());
- Node* commonAncestor = range->commonAncestorContainer(ASSERT_NO_EXCEPTION_STATE);
+ Node* commonAncestor = range->commonAncestorContainer(ASSERT_NO_EXCEPTION);
Node* specialCommonAncestor = ancestorToRetainStructureAndAppearanceWithNoRenderer(commonAncestor);
// When there's a special common ancestor outside of the fragment, we must include it as well to
@@ -728,7 +728,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_STATE);
+ fragment->appendChild(specialCommonAncestor, ASSERT_NO_EXCEPTION);
else
fragment->takeAllChildrenFrom(toContainerNode(commonAncestor));
@@ -751,7 +751,7 @@ static void fillContainerFromString(ContainerNode* paragraph, const String& stri
Document* document = paragraph->document();
if (string.isEmpty()) {
- paragraph->appendChild(createBlockPlaceholderElement(document), ASSERT_NO_EXCEPTION_STATE);
+ paragraph->appendChild(createBlockPlaceholderElement(document), ASSERT_NO_EXCEPTION);
return;
}
@@ -768,11 +768,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_STATE);
+ paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION);
tabText = emptyString();
}
RefPtr<Node> textNode = document->createTextNode(stringWithRebalancedWhitespace(s, first, i + 1 == numEntries));
- paragraph->appendChild(textNode.release(), ASSERT_NO_EXCEPTION_STATE);
+ paragraph->appendChild(textNode.release(), ASSERT_NO_EXCEPTION);
}
// there is a tab after every entry, except the last entry
@@ -780,7 +780,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_STATE);
+ paragraph->appendChild(createTabSpanElement(document, tabText), ASSERT_NO_EXCEPTION);
first = false;
}
@@ -821,11 +821,11 @@ PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String
RenderObject* renderer = styleNode->renderer();
if (renderer && renderer->style()->preserveNewline()) {
- fragment->appendChild(document->createTextNode(string), ASSERT_NO_EXCEPTION_STATE);
+ fragment->appendChild(document->createTextNode(string), ASSERT_NO_EXCEPTION);
if (string.endsWith('\n')) {
RefPtr<Element> element = createBreakElement(document);
element->setAttribute(classAttr, AppleInterchangeNewline);
- fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION_STATE);
+ fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
}
return fragment.release();
}
@@ -867,7 +867,7 @@ PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String
element = createDefaultParagraphElement(document);
fillContainerFromString(element.get(), s);
}
- fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION_STATE);
+ fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
}
return fragment.release();
}
@@ -882,8 +882,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_STATE);
- fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION_STATE);
+ element->appendChild(nodes[i], ASSERT_NO_EXCEPTION);
+ fragment->appendChild(element.release(), ASSERT_NO_EXCEPTION);
}
return fragment.release();
@@ -990,10 +990,10 @@ static inline void removeElementPreservingChildren(PassRefPtr<DocumentFragment>
RefPtr<Node> nextChild;
for (RefPtr<Node> child = element->firstChild(); child; child = nextChild) {
nextChild = child->nextSibling();
- element->removeChild(child.get(), ASSERT_NO_EXCEPTION_STATE);
- fragment->insertBefore(child, element, ASSERT_NO_EXCEPTION_STATE);
+ element->removeChild(child.get(), ASSERT_NO_EXCEPTION);
+ fragment->insertBefore(child, element, ASSERT_NO_EXCEPTION);
}
- fragment->removeChild(element, ASSERT_NO_EXCEPTION_STATE);
+ fragment->removeChild(element, ASSERT_NO_EXCEPTION);
}
PassRefPtr<DocumentFragment> createContextualFragment(const String& markup, HTMLElement* element, ParserContentPolicy parserContentPolicy, ExceptionState& es)
« no previous file with comments | « Source/core/editing/htmlediting.cpp ('k') | Source/core/html/BaseChooserOnlyDateAndTimeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698