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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 428823002: Use tighter typing in editing: markup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 RefPtrWillBeRawPtr<Node> prev = previousSibling(); 2260 RefPtrWillBeRawPtr<Node> prev = previousSibling();
2261 RefPtrWillBeRawPtr<Node> next = nextSibling(); 2261 RefPtrWillBeRawPtr<Node> next = nextSibling();
2262 2262
2263 RefPtrWillBeRawPtr<DocumentFragment> fragment = createFragmentForInnerOuterH TML(html, parent.get(), AllowScriptingContent, "outerHTML", exceptionState); 2263 RefPtrWillBeRawPtr<DocumentFragment> fragment = createFragmentForInnerOuterH TML(html, parent.get(), AllowScriptingContent, "outerHTML", exceptionState);
2264 if (exceptionState.hadException()) 2264 if (exceptionState.hadException())
2265 return; 2265 return;
2266 2266
2267 parent->replaceChild(fragment.release(), this, exceptionState); 2267 parent->replaceChild(fragment.release(), this, exceptionState);
2268 RefPtrWillBeRawPtr<Node> node = next ? next->previousSibling() : 0; 2268 RefPtrWillBeRawPtr<Node> node = next ? next->previousSibling() : 0;
2269 if (!exceptionState.hadException() && node && node->isTextNode()) 2269 if (!exceptionState.hadException() && node && node->isTextNode())
2270 mergeWithNextTextNode(node.release(), exceptionState); 2270 mergeWithNextTextNode(toText(node.get()), exceptionState);
2271 2271
2272 if (!exceptionState.hadException() && prev && prev->isTextNode()) 2272 if (!exceptionState.hadException() && prev && prev->isTextNode())
2273 mergeWithNextTextNode(prev.release(), exceptionState); 2273 mergeWithNextTextNode(toText(prev.get()), exceptionState);
2274 } 2274 }
2275 2275
2276 Node* Element::insertAdjacent(const String& where, Node* newChild, ExceptionStat e& exceptionState) 2276 Node* Element::insertAdjacent(const String& where, Node* newChild, ExceptionStat e& exceptionState)
2277 { 2277 {
2278 if (equalIgnoringCase(where, "beforeBegin")) { 2278 if (equalIgnoringCase(where, "beforeBegin")) {
2279 if (ContainerNode* parent = this->parentNode()) { 2279 if (ContainerNode* parent = this->parentNode()) {
2280 parent->insertBefore(newChild, this, exceptionState); 2280 parent->insertBefore(newChild, this, exceptionState);
2281 if (!exceptionState.hadException()) 2281 if (!exceptionState.hadException())
2282 return newChild; 2282 return newChild;
2283 } 2283 }
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
3334 { 3334 {
3335 #if ENABLE(OILPAN) 3335 #if ENABLE(OILPAN)
3336 if (hasRareData()) 3336 if (hasRareData())
3337 visitor->trace(elementRareData()); 3337 visitor->trace(elementRareData());
3338 visitor->trace(m_elementData); 3338 visitor->trace(m_elementData);
3339 #endif 3339 #endif
3340 ContainerNode::trace(visitor); 3340 ContainerNode::trace(visitor);
3341 } 3341 }
3342 3342
3343 } // namespace blink 3343 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698