Title: [250647] trunk/Websites/perf.webkit.org
- Revision
- 250647
- Author
- dewei_...@apple.com
- Date
- 2019-10-03 01:39:53 -0700 (Thu, 03 Oct 2019)
Log Message
Fix a bug that warning icon causes infinite rendering when it has warning message.
https://bugs.webkit.org/show_bug.cgi?id=202502
Reviewed by Ryosuke Niwa.
Fix the problem that a warning icon with a warning message will result in infinite rendering.
* public/v3/components/button-base.js:
(ButtonBase):
(ButtonBase.prototype.setButtonTitle): Fixed a typo in function name and moved the title update to
render function.
(ButtonBase.prototype.render): Added the logic to render title.
* public/v3/components/test-group-revision-table.js: Set warning message by invoking setButtonTitle.
* public/v3/components/warning-icon.js: Removed the warning messge related code and leave the responsibility
to ButtonBase.
(WarningIcon):
(WarningIcon.prototype.render):
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (250646 => 250647)
--- trunk/Websites/perf.webkit.org/ChangeLog 2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2019-10-03 08:39:53 UTC (rev 250647)
@@ -1,3 +1,23 @@
+2019-10-02 Dewei Zhu <dewei_...@apple.com>
+
+ Fix a bug that warning icon causes infinite rendering when it has warning message.
+ https://bugs.webkit.org/show_bug.cgi?id=202502
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix the problem that a warning icon with a warning message will result in infinite rendering.
+
+ * public/v3/components/button-base.js:
+ (ButtonBase):
+ (ButtonBase.prototype.setButtonTitle): Fixed a typo in function name and moved the title update to
+ render function.
+ (ButtonBase.prototype.render): Added the logic to render title.
+ * public/v3/components/test-group-revision-table.js: Set warning message by invoking setButtonTitle.
+ * public/v3/components/warning-icon.js: Removed the warning messge related code and leave the responsibility
+ to ButtonBase.
+ (WarningIcon):
+ (WarningIcon.prototype.render):
+
2019-07-30 Dewei Zhu <dewei_...@apple.com>
Provide build request status description information on dashboard.
Modified: trunk/Websites/perf.webkit.org/public/v3/components/button-base.js (250646 => 250647)
--- trunk/Websites/perf.webkit.org/public/v3/components/button-base.js 2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/public/v3/components/button-base.js 2019-10-03 08:39:53 UTC (rev 250647)
@@ -5,6 +5,7 @@
{
super(name);
this._disabled = false;
+ this._title = null;
}
setDisabled(disabled)
@@ -15,8 +16,8 @@
setButtonTitle(title)
{
- this.content('button').title = title;
- this.enqueToRender();
+ this._title = title;
+ this.enqueueToRender();
}
didConstructShadowTree()
@@ -33,6 +34,10 @@
this.content('button').setAttribute('disabled', '');
else
this.content('button').removeAttribute('disabled');
+ if (this._title)
+ this.content('button').setAttribute('title', this._title);
+ else
+ this.content('button').removeAttribute('title');
}
static htmlTemplate()
Modified: trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js (250646 => 250647)
--- trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js 2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/public/v3/components/test-group-revision-table.js 2019-10-03 08:39:53 UTC (rev 250647)
@@ -117,8 +117,11 @@
const element = ComponentBase.createElement;
const showWarningIcon = request.hasFinished() && request.statusDescription();
const cellContent = [];
- if (showWarningIcon)
- cellContent.push(element('div', {class: 'warning-icon-container'}, new WarningIcon(`Last status: ${request.statusDescription()}`)));
+ if (showWarningIcon) {
+ const warningIcon = new WarningIcon;
+ warningIcon.setWarning(`Last status: ${request.statusDescription()}`);
+ cellContent.push(element('div', {class: 'warning-icon-container'}, warningIcon));
+ }
cellContent.push(request.statusUrl() ? link(request.statusLabel(), request.statusDescription(), request.statusUrl()) : request.statusLabel());
Modified: trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js (250646 => 250647)
--- trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js 2019-10-03 08:25:46 UTC (rev 250646)
+++ trunk/Websites/perf.webkit.org/public/v3/components/warning-icon.js 2019-10-03 08:39:53 UTC (rev 250647)
@@ -1,18 +1,20 @@
class WarningIcon extends ButtonBase {
- constructor(warningMessage)
+ constructor()
{
super('warning-icon');
- this._warningMessage = warningMessage;
}
render()
{
super.render();
- if (this._warningMessage)
- this.setButtonTitle(this._warningMessage);
}
+ setWarning(warning)
+ {
+ this.setButtonTitle(warning);
+ }
+
static sizeFactor() { return 0.7; }
static buttonContent()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes