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

Side by Side Diff: Source/bindings/v8/V8NodeFilterCondition.cpp

Issue 135843008: Remove V8HiddenPropertyName (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8MutationCallback.cpp ('k') | Source/bindings/v8/V8PerIsolateData.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) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "bindings/v8/V8NodeFilterCondition.h" 32 #include "bindings/v8/V8NodeFilterCondition.h"
33 33
34 #include "V8Node.h" 34 #include "V8Node.h"
35 #include "bindings/v8/ScriptController.h" 35 #include "bindings/v8/ScriptController.h"
36 #include "bindings/v8/ScriptState.h" 36 #include "bindings/v8/ScriptState.h"
37 #include "bindings/v8/V8HiddenPropertyName.h"
38 #include "core/dom/Node.h" 37 #include "core/dom/Node.h"
39 #include "core/dom/NodeFilter.h" 38 #include "core/dom/NodeFilter.h"
40 #include "wtf/OwnPtr.h" 39 #include "wtf/OwnPtr.h"
41 40
42 namespace WebCore { 41 namespace WebCore {
43 42
44 V8NodeFilterCondition::V8NodeFilterCondition(v8::Handle<v8::Value> filter, v8::H andle<v8::Object> owner, v8::Isolate* isolate) 43 V8NodeFilterCondition::V8NodeFilterCondition(v8::Handle<v8::Value> filter, v8::H andle<v8::Object> owner, v8::Isolate* isolate)
45 : m_filter(isolate, filter) 44 : m_filter(isolate, filter)
46 { 45 {
47 owner->SetHiddenValue(V8HiddenPropertyName::condition(isolate), filter); 46 setHiddenValue(isolate, owner, "condition", filter);
48 m_filter.setWeak(this, &setWeakCallback); 47 m_filter.setWeak(this, &setWeakCallback);
49 } 48 }
50 49
51 V8NodeFilterCondition::~V8NodeFilterCondition() 50 V8NodeFilterCondition::~V8NodeFilterCondition()
52 { 51 {
53 } 52 }
54 53
55 short V8NodeFilterCondition::acceptNode(ScriptState* state, Node* node) const 54 short V8NodeFilterCondition::acceptNode(ScriptState* state, Node* node) const
56 { 55 {
57 v8::Isolate* isolate = state->isolate(); 56 v8::Isolate* isolate = state->isolate();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 90
92 return result->Int32Value(); 91 return result->Int32Value();
93 } 92 }
94 93
95 void V8NodeFilterCondition::setWeakCallback(const v8::WeakCallbackData<v8::Value , V8NodeFilterCondition>& data) 94 void V8NodeFilterCondition::setWeakCallback(const v8::WeakCallbackData<v8::Value , V8NodeFilterCondition>& data)
96 { 95 {
97 data.GetParameter()->m_filter.clear(); 96 data.GetParameter()->m_filter.clear();
98 } 97 }
99 98
100 } // namespace WebCore 99 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8MutationCallback.cpp ('k') | Source/bindings/v8/V8PerIsolateData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698