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

Side by Side Diff: Source/core/html/HTMLElement.cpp

Issue 339173002: Removed the redundant !this check (fix Clang's -Wundefined-bool-conversion warning) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 RefPtr<Node> next = nextSibling(); 427 RefPtr<Node> next = nextSibling();
428 RefPtr<Node> newChild; 428 RefPtr<Node> newChild;
429 429
430 // Convert text to fragment with <br> tags instead of linebreaks if needed. 430 // Convert text to fragment with <br> tags instead of linebreaks if needed.
431 if (text.contains('\r') || text.contains('\n')) 431 if (text.contains('\r') || text.contains('\n'))
432 newChild = textToFragment(text, exceptionState); 432 newChild = textToFragment(text, exceptionState);
433 else 433 else
434 newChild = Text::create(document(), text); 434 newChild = Text::create(document(), text);
435 435
436 // textToFragment might cause mutation events. 436 // textToFragment might cause mutation events.
437 if (!this || !parentNode()) 437 if (!parentNode())
438 exceptionState.throwDOMException(HierarchyRequestError, "The element has no parent."); 438 exceptionState.throwDOMException(HierarchyRequestError, "The element has no parent.");
439 439
440 if (exceptionState.hadException()) 440 if (exceptionState.hadException())
441 return; 441 return;
442 442
443 parent->replaceChild(newChild.release(), this, exceptionState); 443 parent->replaceChild(newChild.release(), this, exceptionState);
444 444
445 RefPtr<Node> node = next ? next->previousSibling() : 0; 445 RefPtr<Node> node = next ? next->previousSibling() : 0;
446 if (!exceptionState.hadException() && node && node->isTextNode()) 446 if (!exceptionState.hadException() && node && node->isTextNode())
447 mergeWithNextTextNode(node.release(), exceptionState); 447 mergeWithNextTextNode(node.release(), exceptionState);
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 #ifndef NDEBUG 968 #ifndef NDEBUG
969 969
970 // For use in the debugger 970 // For use in the debugger
971 void dumpInnerHTML(WebCore::HTMLElement*); 971 void dumpInnerHTML(WebCore::HTMLElement*);
972 972
973 void dumpInnerHTML(WebCore::HTMLElement* element) 973 void dumpInnerHTML(WebCore::HTMLElement* element)
974 { 974 {
975 printf("%s\n", element->innerHTML().ascii().data()); 975 printf("%s\n", element->innerHTML().ascii().data());
976 } 976 }
977 #endif 977 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698