summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/shapedetection/text_detector.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/shapedetection/text_detector.cc')
-rw-r--r--chromium/third_party/blink/renderer/modules/shapedetection/text_detector.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chromium/third_party/blink/renderer/modules/shapedetection/text_detector.cc b/chromium/third_party/blink/renderer/modules/shapedetection/text_detector.cc
index f018a15d7f2..9dc25067788 100644
--- a/chromium/third_party/blink/renderer/modules/shapedetection/text_detector.cc
+++ b/chromium/third_party/blink/renderer/modules/shapedetection/text_detector.cc
@@ -33,8 +33,9 @@ ScriptPromise TextDetector::DoDetect(ScriptPromiseResolver* resolver,
SkBitmap bitmap) {
ScriptPromise promise = resolver->Promise();
if (!text_service_) {
- resolver->Reject(DOMException::Create(
- kNotSupportedError, "Text detection service unavailable."));
+ resolver->Reject(
+ DOMException::Create(DOMExceptionCode::kNotSupportedError,
+ "Text detection service unavailable."));
return promise;
}
text_service_requests_.insert(resolver);
@@ -63,8 +64,9 @@ void TextDetector::OnDetectText(
}
detected_text.push_back(DetectedText::Create(
text->raw_value,
- DOMRect::Create(text->bounding_box.x, text->bounding_box.y,
- text->bounding_box.width, text->bounding_box.height),
+ DOMRectReadOnly::Create(text->bounding_box.x, text->bounding_box.y,
+ text->bounding_box.width,
+ text->bounding_box.height),
corner_points));
}
@@ -73,7 +75,7 @@ void TextDetector::OnDetectText(
void TextDetector::OnTextServiceConnectionError() {
for (const auto& request : text_service_requests_) {
- request->Reject(DOMException::Create(kNotSupportedError,
+ request->Reject(DOMException::Create(DOMExceptionCode::kNotSupportedError,
"Text Detection not implemented."));
}
text_service_requests_.clear();