OLD | NEW |
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 V8StringResource<>, tag_name, | 336 V8StringResource<>, tag_name, |
337 V8PrivateProperty::GetCustomElementTagName(isolate).GetOrEmpty(data)); | 337 V8PrivateProperty::GetCustomElementTagName(isolate).GetOrEmpty(data)); |
338 v8::Local<v8::Value> maybe_type = | 338 v8::Local<v8::Value> maybe_type = |
339 V8PrivateProperty::GetCustomElementType(isolate).GetOrEmpty(data); | 339 V8PrivateProperty::GetCustomElementType(isolate).GetOrEmpty(data); |
340 TOSTRING_VOID(V8StringResource<>, type, maybe_type); | 340 TOSTRING_VOID(V8StringResource<>, type, maybe_type); |
341 | 341 |
342 ExceptionState exception_state(isolate, ExceptionState::kConstructionContext, | 342 ExceptionState exception_state(isolate, ExceptionState::kConstructionContext, |
343 "CustomElement"); | 343 "CustomElement"); |
344 V0CustomElementProcessingStack::CallbackDeliveryScope delivery_scope; | 344 V0CustomElementProcessingStack::CallbackDeliveryScope delivery_scope; |
345 Element* element = document->createElementNS( | 345 Element* element = document->createElementNS( |
346 namespace_uri, tag_name, | 346 nullptr, namespace_uri, tag_name, |
347 StringOrDictionary::fromString(maybe_type->IsNull() ? g_null_atom : type), | 347 StringOrDictionary::fromString(maybe_type->IsNull() ? g_null_atom : type), |
348 exception_state); | 348 exception_state); |
349 if (element) { | 349 if (element) { |
350 UseCounter::Count(document, UseCounter::kV0CustomElementsConstruct); | 350 UseCounter::Count(document, UseCounter::kV0CustomElementsConstruct); |
351 } | 351 } |
352 V8SetReturnValueFast(info, element, document); | 352 V8SetReturnValueFast(info, element, document); |
353 } | 353 } |
354 | 354 |
355 } // namespace blink | 355 } // namespace blink |
OLD | NEW |