| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 return; | 122 return; |
| 123 } | 123 } |
| 124 v8SetReturnValueNull(args); | 124 v8SetReturnValueNull(args); |
| 125 } | 125 } |
| 126 | 126 |
| 127 // This function is customized to take advantage of the optional 4th argument: A
ttachBehavior | 127 // This function is customized to take advantage of the optional 4th argument: A
ttachBehavior |
| 128 void V8Node::appendChildMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
args) | 128 void V8Node::appendChildMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 129 { | 129 { |
| 130 v8::Handle<v8::Object> holder = args.Holder(); | 130 v8::Handle<v8::Object> holder = args.Holder(); |
| 131 Node* imp = V8Node::toNative(holder); | 131 Node* imp = V8Node::toNative(holder); |
| 132 |
| 133 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 134 |
| 132 ExceptionCode ec = 0; | 135 ExceptionCode ec = 0; |
| 133 Node* newChild = V8Node::HasInstance(args[0], args.GetIsolate(), worldType(a
rgs.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0
; | 136 Node* newChild = V8Node::HasInstance(args[0], args.GetIsolate(), worldType(a
rgs.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0
; |
| 134 bool success = imp->appendChild(newChild, ec, AttachLazily); | 137 bool success = imp->appendChild(newChild, ec, AttachLazily); |
| 135 if (ec) { | 138 if (ec) { |
| 136 setDOMException(ec, args.GetIsolate()); | 139 setDOMException(ec, args.GetIsolate()); |
| 137 return; | 140 return; |
| 138 } | 141 } |
| 139 if (success) { | 142 if (success) { |
| 140 v8SetReturnValue(args, args[0]); | 143 v8SetReturnValue(args, args[0]); |
| 141 return; | 144 return; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 return wrap(toShadowRoot(impl), creationContext, isolate); | 178 return wrap(toShadowRoot(impl), creationContext, isolate); |
| 176 return wrap(static_cast<DocumentFragment*>(impl), creationContext, isola
te); | 179 return wrap(static_cast<DocumentFragment*>(impl), creationContext, isola
te); |
| 177 case Node::NOTATION_NODE: | 180 case Node::NOTATION_NODE: |
| 178 return wrap(static_cast<Notation*>(impl), creationContext, isolate); | 181 return wrap(static_cast<Notation*>(impl), creationContext, isolate); |
| 179 default: | 182 default: |
| 180 break; // ENTITY_REFERENCE_NODE or XPATH_NAMESPACE_NODE | 183 break; // ENTITY_REFERENCE_NODE or XPATH_NAMESPACE_NODE |
| 181 } | 184 } |
| 182 return V8Node::createWrapper(impl, creationContext, isolate); | 185 return V8Node::createWrapper(impl, creationContext, isolate); |
| 183 } | 186 } |
| 184 } // namespace WebCore | 187 } // namespace WebCore |
| OLD | NEW |