From c039a18e1225882dc69a344b48b02d732d87234c Mon Sep 17 00:00:00 2001 From: "sspitzer@mozilla.org" Date: Thu, 10 May 2007 23:17:18 -0700 Subject: [PATCH] supplimental patch for bug #334669: "bookmark separators have an icon overlaid over it". the supplimental patch keeps favicons at 16 px x 16 px (see bug #364316).r=manothanks to onemen.one@gmail for the patch --- browser/components/places/content/treeView.js | 28 +++++++++++-------- .../winstripe/browser/places/places.css | 10 +++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/browser/components/places/content/treeView.js b/browser/components/places/content/treeView.js index 3b806644a1e9..98c60ea71e40 100644 --- a/browser/components/places/content/treeView.js +++ b/browser/components/places/content/treeView.js @@ -44,12 +44,12 @@ PlacesTreeView.prototype = { getAtom(aString); }, - __containerAtom: null, - get _containerAtom() { - if (!this.__containerAtom) - this.__containerAtom = this._makeAtom("container"); + __separatorAtom: null, + get _separatorAtom() { + if (!this.__separatorAtom) + this.__separatorAtom = this._makeAtom("separator"); - return this.__containerAtom; + return this.__separatorAtom; }, __sessionStartAtom: null, @@ -782,11 +782,7 @@ PlacesTreeView.prototype = { this._ensureValidRow(aRow); var node = this._visibleElements[aRow]; - // Add the container property if it's applicable for this row. - if (PlacesUtils.nodeIsContainer(node)) - aProperties.AppendElement(this._containerAtom); - - // Next handle properties for session information. + // Handle properties for session information. if (!this._showSessions) return; @@ -802,7 +798,17 @@ PlacesTreeView.prototype = { } }, - getCellProperties: function(aRow, aColumn, aProperties) { }, + getCellProperties: function PTV_getCellProperties(aRow, aColumn, aProperties) { + if (aColumn.id != "title") + return; + + this._ensureValidRow(aRow); + var node = this._visibleElements[aRow]; + + if (PlacesUtils.nodeIsSeparator(node)) + aProperties.AppendElement(this._separatorAtom); + }, + getColumnProperties: function(aColumn, aProperties) { }, isContainer: function PTV_isContainer(aRow) { diff --git a/browser/themes/winstripe/browser/places/places.css b/browser/themes/winstripe/browser/places/places.css index c44ad5a67d19..5c0a60453e4e 100755 --- a/browser/themes/winstripe/browser/places/places.css +++ b/browser/themes/winstripe/browser/places/places.css @@ -35,6 +35,16 @@ treechildren::-moz-tree-image { margin: 0px 2px; } +treechildren::-moz-tree-image(title) { + width: 16px; + height: 16px; +} + +treechildren::-moz-tree-image(title, separator) { + width: 0; + height: 0; +} + treechildren::-moz-tree-image(title, livemark\/bookmarkFeedURI) { list-style-image: url("chrome://browser/skin/livemark-item.png") !important; -moz-image-region: rect(0px, 16px, 16px, 0px);