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

Side by Side Diff: Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp

Issue 640073005: Pass setScriptableObjectProperty calls on to Pepper again (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return; 93 return;
94 94
95 // We need to directly call setter on NPObject to be able to detect 95 // We need to directly call setter on NPObject to be able to detect
96 // situation where NPObject notifies it does not possess the property 96 // situation where NPObject notifies it does not possess the property
97 // to be able to lookup standard DOM property. 97 // to be able to lookup standard DOM property.
98 // This information is lost when retrieving it through v8::Object. 98 // This information is lost when retrieving it through v8::Object.
99 if (isWrappedNPObject(instance)) { 99 if (isWrappedNPObject(instance)) {
100 callNpObjectSetter(instance, property, value, info); 100 callNpObjectSetter(instance, property, value, info);
101 return; 101 return;
102 } 102 }
103
104 // FIXME: The gTalk pepper plugin is the only plugin to make use of
105 // SetProperty and that is being deprecated. This can be removed as soon as
106 // it goes away.
107 // Call SetProperty on a pepper plugin's scriptable object. Note that we
108 // never set the return value here which would indicate that the plugin has
109 // intercepted the SetProperty call, which means that the property on the
110 // DOM element will also be set. For plugin's that don't intercept the call
111 // (all except gTalk) this makes no difference at all. For gTalk the fact
112 // that the property on the DOM element also gets set is inconsequential.
113 instance->Set(property, value);
103 } 114 }
104 } // namespace 115 } // namespace
105 116
106 void V8HTMLAppletElement::namedPropertyGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 117 void V8HTMLAppletElement::namedPropertyGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
107 { 118 {
108 getScriptableObjectProperty<V8HTMLAppletElement>(name, info); 119 getScriptableObjectProperty<V8HTMLAppletElement>(name, info);
109 } 120 }
110 121
111 void V8HTMLEmbedElement::namedPropertyGetterCustom(v8::Local<v8::String> name, c onst v8::PropertyCallbackInfo<v8::Value>& info) 122 void V8HTMLEmbedElement::namedPropertyGetterCustom(v8::Local<v8::String> name, c onst v8::PropertyCallbackInfo<v8::Value>& info)
112 { 123 {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 UseCounter::count(V8HTMLEmbedElement::toImpl(info.Holder())->document(), Use Counter::HTMLEmbedElementLegacyCall); 210 UseCounter::count(V8HTMLEmbedElement::toImpl(info.Holder())->document(), Use Counter::HTMLEmbedElementLegacyCall);
200 } 211 }
201 212
202 void V8HTMLObjectElement::legacyCallCustom(const v8::FunctionCallbackInfo<v8::Va lue>& info) 213 void V8HTMLObjectElement::legacyCallCustom(const v8::FunctionCallbackInfo<v8::Va lue>& info)
203 { 214 {
204 invokeOnScriptableObject<V8HTMLObjectElement>(info); 215 invokeOnScriptableObject<V8HTMLObjectElement>(info);
205 UseCounter::count(V8HTMLObjectElement::toImpl(info.Holder())->document(), Us eCounter::HTMLObjectElementLegacyCall); 216 UseCounter::count(V8HTMLObjectElement::toImpl(info.Holder())->document(), Us eCounter::HTMLObjectElementLegacyCall);
206 } 217 }
207 218
208 } // namespace blink 219 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698