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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2629603003: Added constness to the hashmap on Document. (Closed)
Patch Set: Created 3 years, 11 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 | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 43482a85797474481f9e2cccc4cb3732c79ab7c2..feeb105ece85d7a6a4cdd4501f3342ffda4c1701 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -1365,13 +1365,13 @@ Element* Document::scrollingElement() {
// We use HashMap::set over HashMap::add here as we want to
// replace the ComputedStyle but not the Node if the Node is
// already present.
-void Document::addStyleReattachData(Node& node,
+void Document::addStyleReattachData(const Node& node,
StyleReattachData& styleReattachData) {
DCHECK(node.isElementNode() || node.isTextNode());
m_styleReattachDataMap.set(&node, styleReattachData);
ktyliu 2017/01/13 02:04:05 not related to your change, but "&node" should bet
Bugs Nash 2017/01/13 02:08:40 the set method is taking a Node* here (or more acc
}
-StyleReattachData Document::getStyleReattachData(Node& node) {
+StyleReattachData Document::getStyleReattachData(const Node& node) const {
return m_styleReattachDataMap.get(&node);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698