Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsISupports.idl" |
michael@0 | 6 | |
michael@0 | 7 | [scriptable, uuid(9203c031-c4e7-4537-a4ec-81443d623d5a)] |
michael@0 | 8 | interface nsIAutoCompleteResult : nsISupports |
michael@0 | 9 | { |
michael@0 | 10 | /** |
michael@0 | 11 | * Possible values for the searchResult attribute |
michael@0 | 12 | */ |
michael@0 | 13 | const unsigned short RESULT_IGNORED = 1; /* indicates invalid searchString */ |
michael@0 | 14 | const unsigned short RESULT_FAILURE = 2; /* indicates failure */ |
michael@0 | 15 | const unsigned short RESULT_NOMATCH = 3; /* indicates success with no matches |
michael@0 | 16 | and that the search is complete */ |
michael@0 | 17 | const unsigned short RESULT_SUCCESS = 4; /* indicates success with matches |
michael@0 | 18 | and that the search is complete */ |
michael@0 | 19 | const unsigned short RESULT_NOMATCH_ONGOING = 5; /* indicates success |
michael@0 | 20 | with no matches |
michael@0 | 21 | and that the search |
michael@0 | 22 | is still ongoing */ |
michael@0 | 23 | const unsigned short RESULT_SUCCESS_ONGOING = 6; /* indicates success |
michael@0 | 24 | with matches |
michael@0 | 25 | and that the search |
michael@0 | 26 | is still ongoing */ |
michael@0 | 27 | /** |
michael@0 | 28 | * The original search string |
michael@0 | 29 | */ |
michael@0 | 30 | readonly attribute AString searchString; |
michael@0 | 31 | |
michael@0 | 32 | /** |
michael@0 | 33 | * The result of the search |
michael@0 | 34 | */ |
michael@0 | 35 | readonly attribute unsigned short searchResult; |
michael@0 | 36 | |
michael@0 | 37 | /** |
michael@0 | 38 | * Index of the default item that should be entered if none is selected |
michael@0 | 39 | */ |
michael@0 | 40 | readonly attribute long defaultIndex; |
michael@0 | 41 | |
michael@0 | 42 | /** |
michael@0 | 43 | * A string describing the cause of a search failure |
michael@0 | 44 | */ |
michael@0 | 45 | readonly attribute AString errorDescription; |
michael@0 | 46 | |
michael@0 | 47 | /** |
michael@0 | 48 | * The number of matches |
michael@0 | 49 | */ |
michael@0 | 50 | readonly attribute unsigned long matchCount; |
michael@0 | 51 | |
michael@0 | 52 | /** |
michael@0 | 53 | * If true, the results will not be displayed in the popup. However, |
michael@0 | 54 | * if a default index is specified, the default item will still be |
michael@0 | 55 | * completed in the input. |
michael@0 | 56 | */ |
michael@0 | 57 | readonly attribute boolean typeAheadResult; |
michael@0 | 58 | |
michael@0 | 59 | /** |
michael@0 | 60 | * Get the value of the result at the given index |
michael@0 | 61 | */ |
michael@0 | 62 | AString getValueAt(in long index); |
michael@0 | 63 | |
michael@0 | 64 | /** |
michael@0 | 65 | * This returns the string that is displayed in the dropdown |
michael@0 | 66 | */ |
michael@0 | 67 | AString getLabelAt(in long index); |
michael@0 | 68 | |
michael@0 | 69 | /** |
michael@0 | 70 | * Get the comment of the result at the given index |
michael@0 | 71 | */ |
michael@0 | 72 | AString getCommentAt(in long index); |
michael@0 | 73 | |
michael@0 | 74 | /** |
michael@0 | 75 | * Get the style hint for the result at the given index |
michael@0 | 76 | */ |
michael@0 | 77 | AString getStyleAt(in long index); |
michael@0 | 78 | |
michael@0 | 79 | /** |
michael@0 | 80 | * Get the image of the result at the given index |
michael@0 | 81 | */ |
michael@0 | 82 | AString getImageAt(in long index); |
michael@0 | 83 | |
michael@0 | 84 | /** |
michael@0 | 85 | * Get the final value that should be completed when the user confirms |
michael@0 | 86 | * the match at the given index. |
michael@0 | 87 | */ |
michael@0 | 88 | AString getFinalCompleteValueAt(in long index); |
michael@0 | 89 | |
michael@0 | 90 | /** |
michael@0 | 91 | * Remove the value at the given index from the autocomplete results. |
michael@0 | 92 | * If removeFromDb is set to true, the value should be removed from |
michael@0 | 93 | * persistent storage as well. |
michael@0 | 94 | */ |
michael@0 | 95 | void removeValueAt(in long rowIndex, in boolean removeFromDb); |
michael@0 | 96 | }; |