Title: [218367] trunk/Source/WebCore
- Revision
- 218367
- Author
- commit-qu...@webkit.org
- Date
- 2017-06-15 16:34:15 -0700 (Thu, 15 Jun 2017)
Log Message
Modern media controls tests error in Button.js
https://bugs.webkit.org/show_bug.cgi?id=173439
Patch by Antoine Quint <grao...@apple.com> on 2017-06-15
Reviewed by Dean Jackson.
Tests would sometime yield an error when commit() would be called and the _imageSource
ivar hadn't been set. To more safely commit the mask image when it's loaded, we now use
a markDirtyProperty() call and a commitProperty() override to ensure that we cover the
case where we want to commit the mask image, and for other commits not to have to worry
about the mask image being defined.
* Modules/modern-media-controls/controls/button.js:
(Button.prototype.commitProperty):
(Button.prototype._updateImage):
(Button.prototype.commit): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (218366 => 218367)
--- trunk/Source/WebCore/ChangeLog 2017-06-15 22:54:03 UTC (rev 218366)
+++ trunk/Source/WebCore/ChangeLog 2017-06-15 23:34:15 UTC (rev 218367)
@@ -1,3 +1,21 @@
+2017-06-15 Antoine Quint <grao...@apple.com>
+
+ Modern media controls tests error in Button.js
+ https://bugs.webkit.org/show_bug.cgi?id=173439
+
+ Reviewed by Dean Jackson.
+
+ Tests would sometime yield an error when commit() would be called and the _imageSource
+ ivar hadn't been set. To more safely commit the mask image when it's loaded, we now use
+ a markDirtyProperty() call and a commitProperty() override to ensure that we cover the
+ case where we want to commit the mask image, and for other commits not to have to worry
+ about the mask image being defined.
+
+ * Modules/modern-media-controls/controls/button.js:
+ (Button.prototype.commitProperty):
+ (Button.prototype._updateImage):
+ (Button.prototype.commit): Deleted.
+
2017-06-15 Jer Noble <jer.no...@apple.com>
[WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/button.js (218366 => 218367)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/button.js 2017-06-15 22:54:03 UTC (rev 218366)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/button.js 2017-06-15 23:34:15 UTC (rev 218367)
@@ -148,11 +148,12 @@
this._notifyDelegateOfActivation();
}
- commit()
+ commitProperty(propertyName)
{
- super.commit();
-
- this.image.element.style.webkitMaskImage = `url(${this._imageSource.src})`;
+ if (propertyName === "maskImage")
+ this.image.element.style.webkitMaskImage = `url(${this._imageSource.src})`;
+ else
+ super.commitProperty(propertyName);
}
// Private
@@ -188,7 +189,7 @@
_updateImage()
{
- this.needsLayout = true;
+ this.markDirtyProperty("maskImage");
this._updateImageMetrics();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes