Title: [203736] trunk/Websites/perf.webkit.org
- Revision
- 203736
- Author
- [email protected]
- Date
- 2016-07-26 14:01:07 -0700 (Tue, 26 Jul 2016)
Log Message
REGRESSION: The arrow indicating the current page doesn't get updated
https://bugs.webkit.org/show_bug.cgi?id=160185
Reviewed by Chris Dumez.
The bug was caused by Heading's render() function not updating the DOM more than once. I don't understand
how this has ever worked. Fixed the bug by rendering DOM whenever the current page has changed.
* public/v3/pages/heading.js:
(Heading):
(Heading.prototype.render):
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (203735 => 203736)
--- trunk/Websites/perf.webkit.org/ChangeLog 2016-07-26 20:59:36 UTC (rev 203735)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2016-07-26 21:01:07 UTC (rev 203736)
@@ -1,3 +1,17 @@
+2016-07-26 Ryosuke Niwa <[email protected]>
+
+ REGRESSION: The arrow indicating the current page doesn't get updated
+ https://bugs.webkit.org/show_bug.cgi?id=160185
+
+ Reviewed by Chris Dumez.
+
+ The bug was caused by Heading's render() function not updating the DOM more than once. I don't understand
+ how this has ever worked. Fixed the bug by rendering DOM whenever the current page has changed.
+
+ * public/v3/pages/heading.js:
+ (Heading):
+ (Heading.prototype.render):
+
2016-07-25 Ryosuke Niwa <[email protected]>
Build fix for Safari 9.
Modified: trunk/Websites/perf.webkit.org/public/v3/pages/heading.js (203735 => 203736)
--- trunk/Websites/perf.webkit.org/public/v3/pages/heading.js 2016-07-26 20:59:36 UTC (rev 203735)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/heading.js 2016-07-26 21:01:07 UTC (rev 203736)
@@ -5,7 +5,7 @@
super('page-heading');
this._title = '';
this._pageGroups = [];
- this._renderedOnce = false;
+ this._renderedCurrentPage = null;
this._toolbar = null;
this._toolbarChanged = false;
this._router = null;
@@ -52,8 +52,10 @@
if (this._toolbar)
this._toolbar.render();
- if (this._renderedOnce)
+ var currentPage = this._router.currentPage();
+ if (this._renderedCurrentPage == currentPage)
return;
+ this._renderedCurrentPage = currentPage;
var title = this.content().querySelector('.heading-title a');
title.textContent = this._title;
@@ -62,7 +64,6 @@
var link = ComponentBase.createLink;
var router = this._router;
- var currentPage = this._router.currentPage();
this.renderReplace(this.content().querySelector('.heading-navigation-list'),
this._pageGroups.map(function (group) {
return element('ul', group.map(function (page) {
@@ -71,8 +72,6 @@
link(page.name(), router.url(page.routeName(), page.serializeState())));
}));
}));
-
- this._renderedOnce = true;
}
static htmlTemplate()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes