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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp

Issue 2838123002: Count element name validity per DOM versus HTML parsing. (Closed)
Patch Set: Do not need the attribute counting. Created 3 years, 8 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
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698