зеркало из https://github.com/mozilla/gecko-dev.git
Bug 457677 - PlacesUtils ignores dynamic containers, r=dietrich
This commit is contained in:
Родитель
bc7771fdb0
Коммит
8f29aaecf4
|
@ -217,10 +217,9 @@ var PlacesUtils = {
|
|||
* @returns true if the node is a visit item, false otherwise
|
||||
*/
|
||||
nodeIsVisit: function PU_nodeIsVisit(aNode) {
|
||||
const NHRN = Ci.nsINavHistoryResultNode;
|
||||
var type = aNode.type;
|
||||
return type == NHRN.RESULT_TYPE_VISIT ||
|
||||
type == NHRN.RESULT_TYPE_FULL_VISIT;
|
||||
return type == Ci.nsINavHistoryResultNode.RESULT_TYPE_VISIT ||
|
||||
type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FULL_VISIT;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -254,8 +253,8 @@ var PlacesUtils = {
|
|||
* @returns true if the node is readonly, false otherwise
|
||||
*/
|
||||
nodeIsReadOnly: function PU_nodeIsReadOnly(aNode) {
|
||||
if (this.nodeIsFolder(aNode))
|
||||
return this.bookmarks.getFolderReadonly(asQuery(aNode).folderItemId);
|
||||
if (this.nodeIsFolder(aNode) || this.nodeIsDynamicContainer(aNode))
|
||||
return this.bookmarks.getFolderReadonly(this.getConcreteItemId(aNode));
|
||||
if (this.nodeIsQuery(aNode) &&
|
||||
asQuery(aNode).queryOptions.resultType !=
|
||||
Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_CONTENTS)
|
||||
|
@ -344,7 +343,7 @@ var PlacesUtils = {
|
|||
* @returns true if the node is a dynamic container item, false otherwise
|
||||
*/
|
||||
nodeIsDynamicContainer: function PU_nodeIsDynamicContainer(aNode) {
|
||||
if (aNode.type == NHRN.RESULT_TYPE_DYNAMIC_CONTAINER)
|
||||
if (aNode.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_DYNAMIC_CONTAINER)
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче