| Index: Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
|
| diff --git a/Source/core/svg/SVGAnimatedEnumerationBase.cpp b/Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
|
| similarity index 62%
|
| copy from Source/core/svg/SVGAnimatedEnumerationBase.cpp
|
| copy to Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
|
| index 394e71629da21ba5082f6b811c7a4ae1a7ac0997..2508a3cff13ecb16458bafa314715e576aed8f01 100644
|
| --- a/Source/core/svg/SVGAnimatedEnumerationBase.cpp
|
| +++ b/Source/bindings/core/dart/shared_lib/DartNativeExtensionsWin.cpp
|
| @@ -29,33 +29,39 @@
|
| */
|
|
|
| #include "config.h"
|
| +#include "bindings/core/dart/shared_lib/DartNativeExtensions.h"
|
|
|
| -#include "core/svg/SVGAnimatedEnumerationBase.h"
|
| +#if defined(ENABLE_DART_NATIVE_EXTENSIONS)
|
| +#if OS(WIN)
|
| +#include "wtf/text/StringUTF8Adaptor.h"
|
| +#include <string>
|
|
|
| -#include "core/svg/SVGElement.h"
|
|
|
| namespace blink {
|
|
|
| -SVGAnimatedEnumerationBase::~SVGAnimatedEnumerationBase()
|
| +Dart_Handle DartNativeExtensions::loadExtensionLibrary(const String& libraryPath, const String& libraryName, void** libraryHandle)
|
| {
|
| + String libraryFile = libraryPath;
|
| + libraryFile.append(libraryName);
|
| + libraryFile.append(".dll");
|
| +
|
| + *libraryHandle = LoadLibraryW(libraryFile.characters16());
|
| + if (!*libraryHandle) {
|
| + return Dart_NewApiError("Error loading library.");
|
| + }
|
| + return Dart_Null();
|
| }
|
|
|
| -void SVGAnimatedEnumerationBase::setBaseVal(unsigned short value, ExceptionState& exceptionState)
|
| +Dart_Handle DartNativeExtensions::resolveSymbol(void* libHandle, const String& symbolName, void** symbol)
|
| {
|
| - if (this->isReadOnly()) {
|
| - exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
|
| - return;
|
| + *symbol = GetProcAddress(reinterpret_cast<HMODULE>(libHandle), symbolName.characters16());
|
| + if (!*symbol) {
|
| + return Dart_NewApiError("Error resolving symbol.");
|
| }
|
| -
|
| - baseValue()->setValue(value, exceptionState);
|
| - if (exceptionState.hadException())
|
| - return;
|
| -
|
| - m_baseValueUpdated = true;
|
| -
|
| - ASSERT(this->attributeName() != QualifiedName::null());
|
| - contextElement()->invalidateSVGAttributes();
|
| - contextElement()->svgAttributeChanged(this->attributeName());
|
| + return Dart_Null();
|
| }
|
|
|
| }
|
| +
|
| +#endif // OS(WIN)
|
| +#endif // defined(ENABLE_DART_NATIVE_EXTENSIONS)
|
|
|