[Media] Reduce style updates (painting) in controls
[WebKit-https.git] / Source / WebCore / Modules / mediacontrols / mediaControlsiOS.js
index 080a84e3daed7701505d6ef38d2ec71bd18aa9bd..a95d76b7b117a8de3eb1e536f420da452745548d 100644 (file)
@@ -238,8 +238,11 @@ ControllerIOS.prototype = {
         return 'rgba(0, 0, 0, 0.5)';
     },
 
-    updateProgress: function() {
-        Controller.prototype.updateProgress.call(this);
+    updateProgress: function(forceUpdate) {
+        Controller.prototype.updateProgress.call(this, forceUpdate);
+
+        if (!forceUpdate && this.controlsAreHidden())
+            return;
 
         var width = this.timelineWidth;
         var height = this.timelineHeight;