mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 457677 - PlacesUtils ignores dynamic containers, r=dietrich
This commit is contained in:
parent
12436dcf0c
commit
b1351fc910
@ -217,10 +217,9 @@ var PlacesUtils = {
|
|||||||
* @returns true if the node is a visit item, false otherwise
|
* @returns true if the node is a visit item, false otherwise
|
||||||
*/
|
*/
|
||||||
nodeIsVisit: function PU_nodeIsVisit(aNode) {
|
nodeIsVisit: function PU_nodeIsVisit(aNode) {
|
||||||
const NHRN = Ci.nsINavHistoryResultNode;
|
|
||||||
var type = aNode.type;
|
var type = aNode.type;
|
||||||
return type == NHRN.RESULT_TYPE_VISIT ||
|
return type == Ci.nsINavHistoryResultNode.RESULT_TYPE_VISIT ||
|
||||||
type == NHRN.RESULT_TYPE_FULL_VISIT;
|
type == Ci.nsINavHistoryResultNode.RESULT_TYPE_FULL_VISIT;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -254,8 +253,8 @@ var PlacesUtils = {
|
|||||||
* @returns true if the node is readonly, false otherwise
|
* @returns true if the node is readonly, false otherwise
|
||||||
*/
|
*/
|
||||||
nodeIsReadOnly: function PU_nodeIsReadOnly(aNode) {
|
nodeIsReadOnly: function PU_nodeIsReadOnly(aNode) {
|
||||||
if (this.nodeIsFolder(aNode))
|
if (this.nodeIsFolder(aNode) || this.nodeIsDynamicContainer(aNode))
|
||||||
return this.bookmarks.getFolderReadonly(asQuery(aNode).folderItemId);
|
return this.bookmarks.getFolderReadonly(this.getConcreteItemId(aNode));
|
||||||
if (this.nodeIsQuery(aNode) &&
|
if (this.nodeIsQuery(aNode) &&
|
||||||
asQuery(aNode).queryOptions.resultType !=
|
asQuery(aNode).queryOptions.resultType !=
|
||||||
Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_CONTENTS)
|
Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_CONTENTS)
|
||||||
@ -344,7 +343,7 @@ var PlacesUtils = {
|
|||||||
* @returns true if the node is a dynamic container item, false otherwise
|
* @returns true if the node is a dynamic container item, false otherwise
|
||||||
*/
|
*/
|
||||||
nodeIsDynamicContainer: function PU_nodeIsDynamicContainer(aNode) {
|
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 true;
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user