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

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

Issue 2887913005: Image Capture: reject applyConstraints() if there isn't any recognized member (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-reject.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5b8d859adce413420b726064bce672f65fa33b9b..78dbd675848c96baf5f5b98b58438e40c36528ce 100644
--- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
+++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
@@ -566,16 +566,13 @@ bool ImageCapture::HasNonImageCaptureConstraints(
const auto& advanced_constraints = constraints.advanced();
for (const auto& constraint : advanced_constraints) {
- if (constraint.hasWidth() || constraint.hasHeight() ||
- constraint.hasAspectRatio() || constraint.hasFrameRate() ||
- constraint.hasFacingMode() || constraint.hasVolume() ||
- constraint.hasSampleRate() || constraint.hasSampleSize() ||
- constraint.hasEchoCancellation() || constraint.hasLatency() ||
- constraint.hasChannelCount() || constraint.hasDeviceId() ||
- constraint.hasGroupId() || constraint.hasVideoKind() ||
- constraint.hasDepthNear() || constraint.hasDepthFar() ||
- constraint.hasFocalLengthX() || constraint.hasFocalLengthY() ||
- constraint.hasMandatory() || constraint.hasOptional()) {
+ if (!constraint.hasWhiteBalanceMode() && !constraint.hasExposureMode() &&
+ !constraint.hasFocusMode() && !constraint.hasPointsOfInterest() &&
+ !constraint.hasExposureCompensation() &&
+ !constraint.hasColorTemperature() && !constraint.hasIso() &&
+ !constraint.hasBrightness() && !constraint.hasContrast() &&
+ !constraint.hasSaturation() && !constraint.hasSharpness() &&
+ !constraint.hasZoom() && !constraint.hasTorch()) {
return true;
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/imagecapture/MediaStreamTrack-applyConstraints-reject.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698