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

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

Issue 14083009: Remove ENABLE_CUSTOM_ELEMENTS compile time flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebasing. Created 7 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
« no previous file with comments | « Source/bindings/v8/CustomElementHelpers.h ('k') | Source/bindings/v8/V8AdaptorFunction.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 24 matching lines...) Expand all
35 #include "V8CustomElementConstructor.h" 35 #include "V8CustomElementConstructor.h"
36 #include "V8HTMLElementWrapperFactory.h" 36 #include "V8HTMLElementWrapperFactory.h"
37 #include "V8SVGElementWrapperFactory.h" 37 #include "V8SVGElementWrapperFactory.h"
38 #include "bindings/v8/DOMWrapperWorld.h" 38 #include "bindings/v8/DOMWrapperWorld.h"
39 #include "bindings/v8/ScriptController.h" 39 #include "bindings/v8/ScriptController.h"
40 #include "core/dom/CustomElementRegistry.h" 40 #include "core/dom/CustomElementRegistry.h"
41 41
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 #if ENABLE(CUSTOM_ELEMENTS)
46
47 v8::Handle<v8::Object> CustomElementHelpers::createWrapper(PassRefPtr<Element> i mpl, v8::Handle<v8::Object> creationContext, PassRefPtr<CustomElementConstructor > constructor, v8::Isolate* isolate) 45 v8::Handle<v8::Object> CustomElementHelpers::createWrapper(PassRefPtr<Element> i mpl, v8::Handle<v8::Object> creationContext, PassRefPtr<CustomElementConstructor > constructor, v8::Isolate* isolate)
48 { 46 {
49 ASSERT(impl); 47 ASSERT(impl);
50 48
51 // The constructor and registered lifecycle callbacks should be visible only from main world. 49 // The constructor and registered lifecycle callbacks should be visible only from main world.
52 // FIXME: This shouldn't be needed once each custom element has its own Func tionTemplate 50 // FIXME: This shouldn't be needed once each custom element has its own Func tionTemplate
53 // https://bugs.webkit.org/show_bug.cgi?id=108138 51 // https://bugs.webkit.org/show_bug.cgi?id=108138
54 if (!CustomElementHelpers::isFeatureAllowed(creationContext->CreationContext ())) { 52 if (!CustomElementHelpers::isFeatureAllowed(creationContext->CreationContext ())) {
55 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationCon text, &V8HTMLElement::info, impl.get(), isolate); 53 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationCon text, &V8HTMLElement::info, impl.get(), isolate);
56 if (!wrapper.IsEmpty()) 54 if (!wrapper.IsEmpty())
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 if (context.IsEmpty()) 224 if (context.IsEmpty())
227 return; 225 return;
228 v8::Context::Scope scope(context); 226 v8::Context::Scope scope(context);
229 227
230 for (size_t i = 0; i < invocations.size(); ++i) { 228 for (size_t i = 0; i < invocations.size(); ++i) {
231 ASSERT(executionContext == invocations[i].element()->document()); 229 ASSERT(executionContext == invocations[i].element()->document());
232 invokeReadyCallbackIfNeeded(invocations[i].element(), context); 230 invokeReadyCallbackIfNeeded(invocations[i].element(), context);
233 } 231 }
234 } 232 }
235 233
236 #endif // ENABLE(CUSTOM_ELEMENTS)
237
238 } // namespace WebCore 234 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/CustomElementHelpers.h ('k') | Source/bindings/v8/V8AdaptorFunction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698