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

Side by Side Diff: Source/core/inspector/DOMPatchSupport.cpp

Issue 41363002: Devirtualize several inspector classes destructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | « Source/core/inspector/DOMPatchSupport.h ('k') | Source/core/inspector/InspectorHistory.h » ('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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 DOMPatchSupport patchSupport(&domEditor, document); 75 DOMPatchSupport patchSupport(&domEditor, document);
76 patchSupport.patchDocument(markup); 76 patchSupport.patchDocument(markup);
77 } 77 }
78 78
79 DOMPatchSupport::DOMPatchSupport(DOMEditor* domEditor, Document& document) 79 DOMPatchSupport::DOMPatchSupport(DOMEditor* domEditor, Document& document)
80 : m_domEditor(domEditor) 80 : m_domEditor(domEditor)
81 , m_document(document) 81 , m_document(document)
82 { 82 {
83 } 83 }
84 84
85 DOMPatchSupport::~DOMPatchSupport() { }
86
87 void DOMPatchSupport::patchDocument(const String& markup) 85 void DOMPatchSupport::patchDocument(const String& markup)
88 { 86 {
89 RefPtr<Document> newDocument; 87 RefPtr<Document> newDocument;
90 if (m_document.isHTMLDocument()) 88 if (m_document.isHTMLDocument())
91 newDocument = HTMLDocument::create(); 89 newDocument = HTMLDocument::create();
92 else if (m_document.isXHTMLDocument()) 90 else if (m_document.isXHTMLDocument())
93 newDocument = HTMLDocument::createXHTML(); 91 newDocument = HTMLDocument::createXHTML();
94 else if (m_document.isSVGDocument()) 92 else if (m_document.isSVGDocument())
95 newDocument = Document::create(); 93 newDocument = Document::create();
96 94
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 void DOMPatchSupport::dumpMap(const ResultMap& map, const String& name) 507 void DOMPatchSupport::dumpMap(const ResultMap& map, const String& name)
510 { 508 {
511 fprintf(stderr, "\n\n"); 509 fprintf(stderr, "\n\n");
512 for (size_t i = 0; i < map.size(); ++i) 510 for (size_t i = 0; i < map.size(); ++i)
513 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); 511 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);
514 } 512 }
515 #endif 513 #endif
516 514
517 } // namespace WebCore 515 } // namespace WebCore
518 516
OLDNEW
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.h ('k') | Source/core/inspector/InspectorHistory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698