| Index: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
|
| diff --git a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
|
| index 241ac7cd5075f7965115e0e04510165fc75d4512..8e7c4be1724b44e03374b0074f8d7b0204eec52b 100644
|
| --- a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
|
| +++ b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
|
| @@ -11,8 +11,7 @@
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/html/HTMLImageElement.h"
|
| #include "core/html/HTMLVideoElement.h"
|
| -#include "core/html/ImageData.h"
|
| -#include "core/loader/resource/ImageResourceContent.h"
|
| +#include "core/html/canvas/CanvasImageSource.h"
|
| #include "platform/graphics/Image.h"
|
| #include "third_party/skia/include/core/SkImage.h"
|
| #include "third_party/skia/include/core/SkImageInfo.h"
|
| @@ -48,6 +47,7 @@ mojo::ScopedSharedBufferHandle getSharedBufferOnData(
|
|
|
| } // anonymous namespace
|
|
|
| +// TODO(xianglu): We don't need a service per frame. Remove this argument.
|
| ShapeDetector::ShapeDetector(LocalFrame& frame) {
|
| DCHECK(frame.interfaceProvider());
|
| }
|
| @@ -79,12 +79,12 @@ ScriptPromise ShapeDetector::detect(ScriptState* scriptState,
|
| return promise;
|
| }
|
|
|
| - if (canvasImageSource->wouldTaintOrigin(
|
| - scriptState->getExecutionContext()->getSecurityOrigin())) {
|
| - resolver->reject(
|
| - DOMException::create(SecurityError, "Source would taint origin."));
|
| - return promise;
|
| - }
|
| + // if (canvasImageSource->wouldTaintOrigin(
|
| + // scriptState->getExecutionContext()->getSecurityOrigin())) {
|
| + // resolver->reject(
|
| + // DOMException::create(SecurityError, "Source would taint origin."));
|
| + // return promise;
|
| + // }
|
|
|
| if (imageSource.isHTMLImageElement()) {
|
| return detectShapesOnImageElement(resolver,
|
|
|