blob: 8a05a54e561af7bda2783ed87902081c5d909cfa [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DOMNodeIds_h
#define DOMNodeIds_h
#include "core/CoreExport.h"
#include "core/dom/Node.h"
#include "core/dom/WeakIdentifierMap.h"
namespace blink {
#if !ENABLE(OILPAN)
template<> struct WeakIdentifierMapTraits<Node> {
static void removedFromIdentifierMap(Node*);
static void addedToIdentifierMap(Node*);
};
#endif
DECLARE_WEAK_IDENTIFIER_MAP(Node);
class CORE_EXPORT DOMNodeIds {
public:
static int idForNode(Node*);
static Node* nodeForId(int id);
};
} // namespace blink
#endif // DOMNodeIds_h