Chromium Code Reviews| Index: Source/core/dom/custom/CustomElementResolutionStep.cpp |
| diff --git a/Source/modules/mediastream/NavigatorUserMediaError.cpp b/Source/core/dom/custom/CustomElementResolutionStep.cpp |
| similarity index 77% |
| copy from Source/modules/mediastream/NavigatorUserMediaError.cpp |
| copy to Source/core/dom/custom/CustomElementResolutionStep.cpp |
| index e9cef28d55f28832dcf3cf43e3528dda82d29eec..24bc8d44d45ce46e5f24da72b160ceac1a339ffe 100644 |
| --- a/Source/modules/mediastream/NavigatorUserMediaError.cpp |
| +++ b/Source/core/dom/custom/CustomElementResolutionStep.cpp |
| @@ -29,22 +29,21 @@ |
| */ |
| #include "config.h" |
| -#include "modules/mediastream/NavigatorUserMediaError.h" |
| +#include "core/dom/custom/CustomElementResolutionStep.h" |
| + |
| +#include "core/dom/Element.h" |
| +#include "core/dom/custom/CustomElementRegistrationContext.h" |
| namespace WebCore { |
| -String NavigatorUserMediaError::name() const |
| +PassOwnPtr<CustomElementResolutionStep> CustomElementResolutionStep::create(const CustomElementDescriptor& descriptor) |
| { |
| - switch (m_name) { |
| - case NamePermissionDenied: |
| - return "PermissionDeniedError"; |
| - |
| - case NameConstraintNotSatisfied: |
| - return "ConstraintNotSatisfiedError"; |
| - } |
| + return adoptPtr(new CustomElementResolutionStep(descriptor)); |
| +} |
| - ASSERT_NOT_REACHED(); |
| - return String(); |
| +void CustomElementResolutionStep::dispatch(Element* element) |
| +{ |
| + element->document().registrationContext()->resolve(element, m_descriptor); |
|
dominicc (has gone to gerrit)
2013/12/14 02:42:39
Looking up the registration context this way will
Hajime Morrita
2013/12/16 09:00:34
Done, added a test also.
|
| } |
| } // namespace WebCore |