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

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: Removing flag from features.gypi 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
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 "DOMWrapperWorld.h" 35 #include "DOMWrapperWorld.h"
36 #include "SVGNames.h" 36 #include "SVGNames.h"
37 #include "ScriptController.h" 37 #include "ScriptController.h"
38 #include "V8CustomElementConstructor.h" 38 #include "V8CustomElementConstructor.h"
39 #include "V8HTMLElementWrapperFactory.h" 39 #include "V8HTMLElementWrapperFactory.h"
40 #include "V8SVGElementWrapperFactory.h" 40 #include "V8SVGElementWrapperFactory.h"
41 41
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 #if ENABLE(CUSTOM_ELEMENTS)
46 45
47 v8::Handle<v8::Object> CustomElementHelpers::createWrapper(PassRefPtr<Element> i mpl, v8::Handle<v8::Object> creationContext, PassRefPtr<CustomElementConstructor > constructor, v8::Isolate* isolate) 46 v8::Handle<v8::Object> CustomElementHelpers::createWrapper(PassRefPtr<Element> i mpl, v8::Handle<v8::Object> creationContext, PassRefPtr<CustomElementConstructor > constructor, v8::Isolate* isolate)
48 { 47 {
49 ASSERT(impl); 48 ASSERT(impl);
50 49
51 // The constructor and registered lifecycle callbacks should be visible only from main world. 50 // 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 51 // 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 52 // https://bugs.webkit.org/show_bug.cgi?id=108138
54 if (!CustomElementHelpers::isFeatureAllowed(creationContext->CreationContext ())) { 53 if (!CustomElementHelpers::isFeatureAllowed(creationContext->CreationContext ())) {
55 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationCon text, &V8HTMLElement::info, impl.get(), isolate); 54 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationCon text, &V8HTMLElement::info, impl.get(), isolate);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 if (context.IsEmpty()) 225 if (context.IsEmpty())
227 return; 226 return;
228 v8::Context::Scope scope(context); 227 v8::Context::Scope scope(context);
229 228
230 for (size_t i = 0; i < invocations.size(); ++i) { 229 for (size_t i = 0; i < invocations.size(); ++i) {
231 ASSERT(executionContext == invocations[i].element()->document()); 230 ASSERT(executionContext == invocations[i].element()->document());
232 invokeReadyCallbackIfNeeded(invocations[i].element(), context); 231 invokeReadyCallbackIfNeeded(invocations[i].element(), context);
233 } 232 }
234 } 233 }
235 234
236 #endif // ENABLE(CUSTOM_ELEMENTS)
237 235
238 } // namespace WebCore 236 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698