| 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 58a274f5ad3f3b070ef55754df2a5a55186b3831..083e5955c86a1d71a6d73569ee885e239cba9431 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);
|
|
|