| OLD | NEW |
| 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 21 matching lines...) Expand all Loading... |
| 32 #define CustomElementHelpers_h | 32 #define CustomElementHelpers_h |
| 33 | 33 |
| 34 #include "bindings/v8/DOMDataStore.h" | 34 #include "bindings/v8/DOMDataStore.h" |
| 35 #include "bindings/v8/ScriptValue.h" | 35 #include "bindings/v8/ScriptValue.h" |
| 36 #include "core/dom/CustomElementDefinition.h" | 36 #include "core/dom/CustomElementDefinition.h" |
| 37 #include "core/dom/CustomElementRegistry.h" | 37 #include "core/dom/CustomElementRegistry.h" |
| 38 #include "core/dom/Element.h" | 38 #include "core/dom/Element.h" |
| 39 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 40 #include "wtf/HashSet.h" | 40 #include "wtf/HashSet.h" |
| 41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
| 42 #include "wtf/text/AtomicString.h" |
| 42 | 43 |
| 43 namespace WebCore { | 44 namespace WebCore { |
| 44 | 45 |
| 45 class CustomElementConstructor; | |
| 46 class CustomElementInvocation; | 46 class CustomElementInvocation; |
| 47 class Document; |
| 47 class HTMLElement; | 48 class HTMLElement; |
| 48 class QualifiedName; | 49 class QualifiedName; |
| 49 class SVGElement; | 50 class SVGElement; |
| 50 class ScriptState; | 51 class ScriptState; |
| 51 | 52 |
| 52 class CustomElementHelpers { | 53 class CustomElementHelpers { |
| 53 public: | 54 public: |
| 54 static void didRegisterDefinition(CustomElementDefinition*, ScriptExecutionC
ontext*, const HashSet<Element*>& upgradeCandidates, const ScriptValue& prototyp
eValue); | 55 static void didRegisterDefinition(CustomElementDefinition*, ScriptExecutionC
ontext*, const HashSet<Element*>& upgradeCandidates, const ScriptValue& prototyp
eValue); |
| 55 | 56 |
| 56 static bool initializeConstructorWrapper(CustomElementConstructor*, const Sc
riptValue& prototype, ScriptState*); | 57 static ScriptValue createConstructor(ScriptState*, const ScriptValue& protot
ype, Document*, const AtomicString& namespaceURI, const AtomicString& name, cons
t AtomicString& type); |
| 57 | 58 |
| 58 static bool isValidPrototypeParameter(const ScriptValue&, ScriptState*, Atom
icString& namespaceURI); | 59 static bool isValidPrototypeParameter(const ScriptValue&, ScriptState*, Atom
icString& namespaceURI); |
| 59 static bool isValidPrototypeParameter(const ScriptValue&, ScriptState*); | 60 static bool isValidPrototypeParameter(const ScriptValue&, ScriptState*); |
| 60 | 61 |
| 61 static bool isFeatureAllowed(ScriptState*); | 62 static bool isFeatureAllowed(ScriptState*); |
| 62 static bool isFeatureAllowed(v8::Handle<v8::Context>); | 63 static bool isFeatureAllowed(v8::Handle<v8::Context>); |
| 63 | 64 |
| 64 static WrapperTypeInfo* findWrapperType(v8::Handle<v8::Value> chain); | 65 static WrapperTypeInfo* findWrapperType(v8::Handle<v8::Value> chain); |
| 65 | 66 |
| 66 static const QualifiedName* findLocalName(v8::Handle<v8::Object> chain); | 67 static const QualifiedName* findLocalName(v8::Handle<v8::Object> chain); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 112 |
| 112 inline bool CustomElementHelpers::isValidPrototypeParameter(const ScriptValue& v
alue, ScriptState* state) | 113 inline bool CustomElementHelpers::isValidPrototypeParameter(const ScriptValue& v
alue, ScriptState* state) |
| 113 { | 114 { |
| 114 AtomicString namespaceURI; | 115 AtomicString namespaceURI; |
| 115 return isValidPrototypeParameter(value, state, namespaceURI); | 116 return isValidPrototypeParameter(value, state, namespaceURI); |
| 116 } | 117 } |
| 117 | 118 |
| 118 } // namespace WebCore | 119 } // namespace WebCore |
| 119 | 120 |
| 120 #endif // CustomElementHelpers_h | 121 #endif // CustomElementHelpers_h |
| OLD | NEW |