Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(895)

Unified Diff: third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp

Issue 2842103002: Image Capture: two small nits (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 083e5955c86a1d71a6d73569ee885e239cba9431..bae8afe121052ef09b1d3687a825ecb1847b99c6 100644
--- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
+++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
@@ -412,8 +412,10 @@ void ImageCapture::GetMediaTrackSettings(MediaTrackSettings& settings) const {
if (settings_.hasFocusMode())
settings.setFocusMode(settings_.focusMode());
- if (settings_.hasPointsOfInterest())
+ if (settings_.hasPointsOfInterest() &&
+ !settings_.pointsOfInterest().IsEmpty()) {
settings.setPointsOfInterest(settings_.pointsOfInterest());
+ }
if (settings_.hasExposureCompensation())
settings.setExposureCompensation(settings_.exposureCompensation());
@@ -504,7 +506,9 @@ void ImageCapture::OnPhotoCapabilities(
caps->SetImageWidth(
MediaSettingsRange::Create(std::move(capabilities->width)));
}
- caps->SetFillLightMode(capabilities->fill_light_mode);
+
+ if (!capabilities->fill_light_mode.IsEmpty())
+ caps->SetFillLightMode(capabilities->fill_light_mode);
resolver->Resolve(caps);
}

Powered by Google App Engine
This is Rietveld 408576698