| Index: third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
|
| diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
|
| index 6832f67d461840f1c59eb1f5cc6b14290a208b02..0e24ed628ba43d180fc7195b30eb33d30d81af72 100644
|
| --- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
|
| +++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
|
| @@ -496,10 +496,14 @@ void ImageCapture::OnPhotoCapabilities(
|
| // TODO(mcasas): Remove the explicit MediaSettingsRange::create() when
|
| // mojo::StructTraits supports garbage-collected mappings,
|
| // https://crbug.com/700180.
|
| - caps->SetImageHeight(
|
| - MediaSettingsRange::Create(std::move(capabilities->height)));
|
| - caps->SetImageWidth(
|
| - MediaSettingsRange::Create(std::move(capabilities->width)));
|
| + if (capabilities->height->min != 0 || capabilities->height->max != 0) {
|
| + caps->SetImageHeight(
|
| + MediaSettingsRange::Create(std::move(capabilities->height)));
|
| + }
|
| + if (capabilities->width->min != 0 || capabilities->width->max != 0) {
|
| + caps->SetImageWidth(
|
| + MediaSettingsRange::Create(std::move(capabilities->width)));
|
| + }
|
| caps->SetFillLightMode(capabilities->fill_light_mode);
|
|
|
| resolver->Resolve(caps);
|
|
|