Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2771)

Unified Diff: chrome/browser/resources/md_history/history_item.js

Issue 2215613002: MD History: Improve dom-if usage in history-item (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@history_improve_collapse_button
Patch Set: Fix tests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_history/history_item.js
diff --git a/chrome/browser/resources/md_history/history_item.js b/chrome/browser/resources/md_history/history_item.js
index 5a3fa265364c27cd8df7618ddb807c0c770451e1..314635932f81e43526256676edc04a0a2ce310ef 100644
--- a/chrome/browser/resources/md_history/history_item.js
+++ b/chrome/browser/resources/md_history/history_item.js
@@ -11,9 +11,6 @@ cr.define('md_history', function() {
// from the history backend, as well as fields computed by history-list.
item: {type: Object, observer: 'showIcon_'},
- // True if the website is a bookmarked page.
- starred: {type: Boolean, reflectToAttribute: true},
-
// Search term used to obtain this history-item.
searchTerm: {type: String},
@@ -50,7 +47,10 @@ cr.define('md_history', function() {
* @private
*/
onRemoveBookmarkTap_: function() {
- if (this.$['bookmark-star'] == this.root.activeElement)
+ if (!this.item.starred)
+ return;
+
+ if (this.$$('#bookmark-star') == this.root.activeElement)
this.$['menu-button'].focus();
md_history.BrowserService.getInstance()

Powered by Google App Engine
This is Rietveld 408576698