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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/events/DOMWindowEventQueue.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 7919ea8debc89ea084111c63ea5ab19540412570..03fd2b91d47899919db62f502ab238ad2f1d295d 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -477,7 +477,7 @@ static bool needInterchangeNewlineAfter(const VisiblePosition& v)
static PassRefPtr<EditingStyle> styleFromMatchedRulesAndInlineDecl(const Node* node)
{
if (!node->isHTMLElement())
- return 0;
+ return nullptr;
// FIXME: Having to const_cast here is ugly, but it is quite a bit of work to untangle
// the non-const-ness of styleFromMatchedRulesForElement.
@@ -710,7 +710,7 @@ PassRefPtr<DocumentFragment> createFragmentFromMarkupWithContext(Document& docum
RefPtr<Node> nodeBeforeContext;
RefPtr<Node> nodeAfterContext;
if (!findNodesSurroundingContext(taggedDocument.get(), nodeBeforeContext, nodeAfterContext))
- return 0;
+ return nullptr;
RefPtr<Range> range = Range::create(*taggedDocument.get(),
positionAfterNode(nodeBeforeContext.get()).parentAnchoredEquivalent(),
@@ -815,7 +815,7 @@ static bool shouldPreserveNewline(const Range& range)
PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String& text)
{
if (!context)
- return 0;
+ return nullptr;
Document& document = context->ownerDocument();
RefPtr<DocumentFragment> fragment = document.createDocumentFragment();
@@ -921,7 +921,7 @@ PassRefPtr<DocumentFragment> createFragmentForInnerOuterHTML(const String& marku
bool wasValid = fragment->parseXML(markup, contextElement, parserContentPolicy);
if (!wasValid) {
exceptionState.throwDOMException(SyntaxError, "The provided markup is invalid XML, and therefore cannot be inserted into an XML document.");
- return 0;
+ return nullptr;
}
return fragment.release();
}
@@ -942,7 +942,7 @@ PassRefPtr<DocumentFragment> createFragmentForTransformToFragment(const String&
} else {
bool successfulParse = fragment->parseXML(sourceString, 0);
if (!successfulParse)
- return 0;
+ return nullptr;
}
// FIXME: Do we need to mess with URLs here?
@@ -967,12 +967,12 @@ PassRefPtr<DocumentFragment> createContextualFragment(const String& markup, HTML
if (element->ieForbidsInsertHTML() || element->hasLocalName(colTag) || element->hasLocalName(colgroupTag) || element->hasLocalName(framesetTag)
|| element->hasLocalName(headTag) || element->hasLocalName(styleTag) || element->hasLocalName(titleTag)) {
exceptionState.throwDOMException(NotSupportedError, "The range's container is '" + element->localName() + "', which is not supported.");
- return 0;
+ return nullptr;
}
RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(markup, element, parserContentPolicy, "createContextualFragment", exceptionState);
if (!fragment)
- return 0;
+ return nullptr;
// We need to pop <html> and <body> elements and remove <head> to
// accommodate folks passing complete HTML documents to make the
« no previous file with comments | « Source/core/editing/htmlediting.cpp ('k') | Source/core/events/DOMWindowEventQueue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698