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

Unified Diff: chrome/browser/resources/history/history.js

Issue 12039045: History: Fix RTL layout in grouped history and some other minor fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « chrome/browser/resources/history/history.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index ea13c540614ebf93841463be8ab4b8f23b47d034..fa6743fbcbe324fdb5b5a28897e49fa2c42fdb67 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -72,10 +72,8 @@ function Visit(result, continued, model, id) {
* Returns a dom structure for a browse page result or a search page result.
* @param {Object} propertyBag A bag of configuration properties, false by
* default:
- * <ul>
- * <li>isSearchResult: Whether or not the result is a search result.</li>
- * <li>addTitleFavicon: Whether or not the favicon should be added.</li>
- * </ul>
+ * - isSearchResult: Whether or not the result is a search result.
+ * - addTitleFavicon: Whether or not the favicon should be added.
* @return {Node} A DOM node to represent the history entry or search result.
*/
Visit.prototype.getResultDOM = function(propertyBag) {
@@ -379,8 +377,8 @@ HistoryModel.prototype.addResults = function(info, results) {
this.isQueryFinished_ = info.finished;
this.queryCursor_ = info.cursor;
- // If the results are not for the current search term there's nothing more
- // to do.
+ // If the results are not for the current search term then there is nothing
Patrick Dubroy 2013/01/25 15:29:59 Didn't want to do what James suggested? ;-)
Sergiu 2013/01/28 17:24:52 I realized that I didn't like the sentence with or
+ // more to do.
if (info.term != this.searchText_)
return;
@@ -698,9 +696,9 @@ HistoryView.prototype.setVisitRendered_ = function(visit) {
};
/**
- * This function generates and adds the grouped visits DOM for a certain
- * domain. This includes the clickable arrow and domain name and the visit
- * entries for that domain.
+ * Generates and adds the grouped visits DOM for a certain domain. This
+ * includes the clickable arrow and domain name and the visit entries for
+ * that domain.
* @param {Element} results DOM object to which to add the elements.
* @param {string} domain Current domain name.
* @param {Array} domainVisits Array of visits for this domain.
@@ -722,7 +720,7 @@ HistoryView.prototype.getGroupedVisitsDOM_ = function(
var numberOfVisits = createElementWithClassName('span', 'number-visits');
numberOfVisits.textContent = loadTimeData.getStringF('numbervisits',
domainVisits.length);
- siteDomain.textContent = domain;
+ siteDomain.textContent = ' ' + domain + ' ';
Patrick Dubroy 2013/01/25 15:29:59 Why are you adding space to both sides of the doma
Sergiu 2013/01/28 17:24:52 Put in a -webkit-margin-end but it may still not w
siteDomain.appendChild(numberOfVisits);
siteResults.appendChild(siteDomainWrapper);
var resultsList = siteResults.appendChild(
@@ -765,9 +763,8 @@ HistoryView.prototype.groupVisitsByDomain_ = function(visits, results) {
};
domains.sort(sortByVisits);
- for (var i = 0, domain; domain = domains[i]; i++) {
+ for (var i = 0, domain; domain = domains[i]; i++)
this.getGroupedVisitsDOM_(results, domain, visitsByDomain[domain]);
- }
};
/**
@@ -969,11 +966,10 @@ PageState.prototype.getHashData = function() {
PageState.prototype.setUIState = function(term, page, grouped) {
// Make sure the form looks pretty.
$('search-field').value = term;
- if (grouped) {
+ if (grouped)
$('display-filter-sites').checked = true;
- } else {
+ else
$('display-filter-sites').checked = false;
- }
var hash = this.getHashData();
if (hash.q != term || hash.p != page || hash.g != grouped) {
window.location.hash = PageState.getHashString(
« no previous file with comments | « chrome/browser/resources/history/history.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698