Title: [235422] trunk/Source/WebCore
Revision
235422
Author
eric.carl...@apple.com
Date
2018-08-28 06:29:36 -0700 (Tue, 28 Aug 2018)

Log Message

Revert changes to RealtimeMediaSource.cpp made in r235086
https://bugs.webkit.org/show_bug.cgi?id=189046
<rdar://problem/43794875>

Unreviewed, reverting an accidental change.


* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::supportsSizeAndFrameRate):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (235421 => 235422)


--- trunk/Source/WebCore/ChangeLog	2018-08-28 07:49:14 UTC (rev 235421)
+++ trunk/Source/WebCore/ChangeLog	2018-08-28 13:29:36 UTC (rev 235422)
@@ -1,3 +1,14 @@
+2018-08-28  Eric Carlson  <eric.carl...@apple.com>
+
+        Revert changes to RealtimeMediaSource.cpp made in r235086
+        https://bugs.webkit.org/show_bug.cgi?id=189046
+        <rdar://problem/43794875>
+
+        Unreviewed, reverting an accidental change.
+
+        * platform/mediastream/RealtimeMediaSource.cpp:
+        (WebCore::RealtimeMediaSource::supportsSizeAndFrameRate): 
+
 2018-08-28  Alejandro G. Castro  <a...@igalia.com>
 
         Fix gcc compilation warnings after r235230

Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp (235421 => 235422)


--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp	2018-08-28 07:49:14 UTC (rev 235421)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp	2018-08-28 13:29:36 UTC (rev 235422)
@@ -246,8 +246,10 @@
         }
 
         distance = std::min(distance, constraintDistance);
-        auto range = capabilities.width();
-        width = widthConstraint->valueForCapabilityRange(size().width(), range.rangeMin().asInt, range.rangeMax().asInt);
+        if (widthConstraint->isMandatory()) {
+            auto range = capabilities.width();
+            width = widthConstraint->valueForCapabilityRange(size().width(), range.rangeMin().asInt, range.rangeMax().asInt);
+        }
     }
 
     std::optional<int> height;
@@ -259,8 +261,10 @@
         }
 
         distance = std::min(distance, constraintDistance);
-        auto range = capabilities.height();
-        height = heightConstraint->valueForCapabilityRange(size().height(), range.rangeMin().asInt, range.rangeMax().asInt);
+        if (heightConstraint->isMandatory()) {
+            auto range = capabilities.height();
+            height = heightConstraint->valueForCapabilityRange(size().height(), range.rangeMin().asInt, range.rangeMax().asInt);
+        }
     }
 
     std::optional<double> frameRate;
@@ -272,8 +276,10 @@
         }
 
         distance = std::min(distance, constraintDistance);
-        auto range = capabilities.frameRate();
-        frameRate = frameRateConstraint->valueForCapabilityRange(this->frameRate(), range.rangeMin().asDouble, range.rangeMax().asDouble);
+        if (frameRateConstraint->isMandatory()) {
+            auto range = capabilities.frameRate();
+            frameRate = frameRateConstraint->valueForCapabilityRange(this->frameRate(), range.rangeMin().asDouble, range.rangeMax().asDouble);
+        }
     }
 
     // Each of the non-null values is supported individually, see if they all can be applied at the same time.
@@ -286,7 +292,7 @@
             badConstraint = frameRateConstraint->name();
         return false;
     }
-    
+
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to