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

Side by Side Diff: Source/core/inspector/DOMPatchSupport.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/DOMEditor.cpp ('k') | Source/core/inspector/InspectorCSSAgent.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 parser = HTMLDocumentParser::create(static_cast<HTMLDocument*>(newDocume nt.get()), false); 101 parser = HTMLDocumentParser::create(static_cast<HTMLDocument*>(newDocume nt.get()), false);
102 else 102 else
103 parser = XMLDocumentParser::create(newDocument.get(), 0); 103 parser = XMLDocumentParser::create(newDocument.get(), 0);
104 parser->insert(markup); // Use insert() so that the parser will not yield. 104 parser->insert(markup); // Use insert() so that the parser will not yield.
105 parser->finish(); 105 parser->finish();
106 parser->detach(); 106 parser->detach();
107 107
108 OwnPtr<Digest> oldInfo = createDigest(m_document->documentElement(), 0); 108 OwnPtr<Digest> oldInfo = createDigest(m_document->documentElement(), 0);
109 OwnPtr<Digest> newInfo = createDigest(newDocument->documentElement(), &m_unu sedNodesMap); 109 OwnPtr<Digest> newInfo = createDigest(newDocument->documentElement(), &m_unu sedNodesMap);
110 110
111 if (!innerPatchNode(oldInfo.get(), newInfo.get(), IGNORE_EXCEPTION_STATE)) { 111 if (!innerPatchNode(oldInfo.get(), newInfo.get(), IGNORE_EXCEPTION)) {
112 // Fall back to rewrite. 112 // Fall back to rewrite.
113 m_document->write(markup); 113 m_document->write(markup);
114 m_document->close(); 114 m_document->close();
115 } 115 }
116 } 116 }
117 117
118 Node* DOMPatchSupport::patchNode(Node* node, const String& markup, ExceptionStat e& es) 118 Node* DOMPatchSupport::patchNode(Node* node, const String& markup, ExceptionStat e& es)
119 { 119 {
120 // Don't parse <html> as a fragment. 120 // Don't parse <html> as a fragment.
121 if (node->isDocumentNode() || (node->parentNode() && node->parentNode()->isD ocumentNode())) { 121 if (node->isDocumentNode() || (node->parentNode() && node->parentNode()->isD ocumentNode())) {
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 void DOMPatchSupport::dumpMap(const ResultMap& map, const String& name) 511 void DOMPatchSupport::dumpMap(const ResultMap& map, const String& name)
512 { 512 {
513 fprintf(stderr, "\n\n"); 513 fprintf(stderr, "\n\n");
514 for (size_t i = 0; i < map.size(); ++i) 514 for (size_t i = 0; i < map.size(); ++i)
515 fprintf(stderr, "%s[%lu]: %s (%p) - [%lu]\n", name.utf8().data(), i, map [i].first ? nodeName(map[i].first->m_node).utf8().data() : "", map[i].first, map [i].second); 515 fprintf(stderr, "%s[%lu]: %s (%p) - [%lu]\n", name.utf8().data(), i, map [i].first ? nodeName(map[i].first->m_node).utf8().data() : "", map[i].first, map [i].second);
516 } 516 }
517 #endif 517 #endif
518 518
519 } // namespace WebCore 519 } // namespace WebCore
520 520
OLDNEW
« no previous file with comments | « Source/core/inspector/DOMEditor.cpp ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698