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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/DistributedNodes.h

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 25 matching lines...) Expand all
36 #include "wtf/Vector.h" 36 #include "wtf/Vector.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class DistributedNodes final { 40 class DistributedNodes final {
41 DISALLOW_NEW(); 41 DISALLOW_NEW();
42 42
43 public: 43 public:
44 DistributedNodes() {} 44 DistributedNodes() {}
45 45
46 Node* first() const { return m_nodes.first(); } 46 Node* first() const { return m_nodes.front(); }
47 Node* last() const { return m_nodes.back(); } 47 Node* last() const { return m_nodes.back(); }
48 Node* at(size_t index) const { return m_nodes.at(index); } 48 Node* at(size_t index) const { return m_nodes.at(index); }
49 49
50 size_t size() const { return m_nodes.size(); } 50 size_t size() const { return m_nodes.size(); }
51 bool isEmpty() const { return m_nodes.isEmpty(); } 51 bool isEmpty() const { return m_nodes.isEmpty(); }
52 52
53 void append(Node*); 53 void append(Node*);
54 void clear() { 54 void clear() {
55 m_nodes.clear(); 55 m_nodes.clear();
56 m_indices.clear(); 56 m_indices.clear();
(...skipping 10 matching lines...) Expand all
67 DECLARE_TRACE(); 67 DECLARE_TRACE();
68 68
69 private: 69 private:
70 HeapVector<Member<Node>> m_nodes; 70 HeapVector<Member<Node>> m_nodes;
71 HeapHashMap<Member<const Node>, size_t> m_indices; 71 HeapHashMap<Member<const Node>, size_t> m_indices;
72 }; 72 };
73 73
74 } // namespace blink 74 } // namespace blink
75 75
76 #endif 76 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698