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 | <?xml version="1.0"?> |
michael@0 | 2 | |
michael@0 | 3 | <!-- This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | - License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
michael@0 | 6 | |
michael@0 | 7 | <!DOCTYPE bindings [ |
michael@0 | 8 | <!ENTITY % downloadDTD SYSTEM "chrome://mozapps/locale/downloads/downloads.dtd" > |
michael@0 | 9 | %downloadDTD; |
michael@0 | 10 | ]> |
michael@0 | 11 | |
michael@0 | 12 | <bindings id="downloadBindings" |
michael@0 | 13 | xmlns="http://www.mozilla.org/xbl" |
michael@0 | 14 | xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 15 | xmlns:xbl="http://www.mozilla.org/xbl"> |
michael@0 | 16 | |
michael@0 | 17 | <binding id="download-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem"> |
michael@0 | 18 | <resources> |
michael@0 | 19 | <stylesheet src="chrome://mozapps/skin/downloads/downloads.css"/> |
michael@0 | 20 | </resources> |
michael@0 | 21 | <implementation> |
michael@0 | 22 | <property name="paused"> |
michael@0 | 23 | <getter> |
michael@0 | 24 | <![CDATA[ |
michael@0 | 25 | return parseInt(this.getAttribute("state")) == Components.interfaces.nsIDownloadManager.DOWNLOAD_PAUSED; |
michael@0 | 26 | ]]> |
michael@0 | 27 | </getter> |
michael@0 | 28 | </property> |
michael@0 | 29 | <property name="openable"> |
michael@0 | 30 | <getter> |
michael@0 | 31 | <![CDATA[ |
michael@0 | 32 | return parseInt(this.getAttribute("state")) == Components.interfaces.nsIDownloadManager.DOWNLOAD_FINISHED; |
michael@0 | 33 | ]]> |
michael@0 | 34 | </getter> |
michael@0 | 35 | </property> |
michael@0 | 36 | <property name="inProgress"> |
michael@0 | 37 | <getter> |
michael@0 | 38 | <![CDATA[ |
michael@0 | 39 | var state = parseInt(this.getAttribute("state")); |
michael@0 | 40 | const dl = Components.interfaces.nsIDownloadManager; |
michael@0 | 41 | return state == dl.DOWNLOAD_NOTSTARTED || |
michael@0 | 42 | state == dl.DOWNLOAD_QUEUED || |
michael@0 | 43 | state == dl.DOWNLOAD_DOWNLOADING || |
michael@0 | 44 | state == dl.DOWNLOAD_PAUSED || |
michael@0 | 45 | state == dl.DOWNLOAD_SCANNING; |
michael@0 | 46 | ]]> |
michael@0 | 47 | </getter> |
michael@0 | 48 | </property> |
michael@0 | 49 | <property name="removable"> |
michael@0 | 50 | <getter> |
michael@0 | 51 | <![CDATA[ |
michael@0 | 52 | var state = parseInt(this.getAttribute("state")); |
michael@0 | 53 | const dl = Components.interfaces.nsIDownloadManager; |
michael@0 | 54 | return state == dl.DOWNLOAD_FINISHED || |
michael@0 | 55 | state == dl.DOWNLOAD_CANCELED || |
michael@0 | 56 | state == dl.DOWNLOAD_BLOCKED_PARENTAL || |
michael@0 | 57 | state == dl.DOWNLOAD_BLOCKED_POLICY || |
michael@0 | 58 | state == dl.DOWNLOAD_DIRTY || |
michael@0 | 59 | state == dl.DOWNLOAD_FAILED; |
michael@0 | 60 | ]]> |
michael@0 | 61 | </getter> |
michael@0 | 62 | </property> |
michael@0 | 63 | <property name="buttons"> |
michael@0 | 64 | <getter> |
michael@0 | 65 | <![CDATA[ |
michael@0 | 66 | var startEl = document.getAnonymousNodes(this); |
michael@0 | 67 | if (!startEl.length) |
michael@0 | 68 | startEl = [this]; |
michael@0 | 69 | |
michael@0 | 70 | const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; |
michael@0 | 71 | return startEl[0].getElementsByTagNameNS(XULNS, "button"); |
michael@0 | 72 | ]]> |
michael@0 | 73 | </getter> |
michael@0 | 74 | </property> |
michael@0 | 75 | </implementation> |
michael@0 | 76 | </binding> |
michael@0 | 77 | |
michael@0 | 78 | <binding id="download-starting" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 79 | <content> |
michael@0 | 80 | <xul:hbox flex="1"> |
michael@0 | 81 | <xul:vbox pack="center"> |
michael@0 | 82 | <xul:image class="downloadTypeIcon" validate="always" |
michael@0 | 83 | xbl:inherits="src=image"/> |
michael@0 | 84 | </xul:vbox> |
michael@0 | 85 | <xul:vbox pack="start" flex="1"> |
michael@0 | 86 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 87 | crop="center" class="name"/> |
michael@0 | 88 | <xul:progressmeter mode="normal" value="0" flex="1" |
michael@0 | 89 | anonid="progressmeter"/> |
michael@0 | 90 | <xul:label value="&starting.label;" class="status"/> |
michael@0 | 91 | <xul:spacer flex="1"/> |
michael@0 | 92 | </xul:vbox> |
michael@0 | 93 | <xul:vbox pack="center"> |
michael@0 | 94 | <xul:button class="cancel mini-button" tooltiptext="&cmd.cancel.label;" |
michael@0 | 95 | cmd="cmd_cancel" ondblclick="event.stopPropagation();" |
michael@0 | 96 | oncommand="performCommand('cmd_cancel', this);"/> |
michael@0 | 97 | </xul:vbox> |
michael@0 | 98 | </xul:hbox> |
michael@0 | 99 | </content> |
michael@0 | 100 | </binding> |
michael@0 | 101 | |
michael@0 | 102 | <binding id="download-downloading" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 103 | <content> |
michael@0 | 104 | <xul:hbox flex="1" class="downloadContentBox"> |
michael@0 | 105 | <xul:vbox pack="center"> |
michael@0 | 106 | <xul:image class="downloadTypeIcon" validate="always" |
michael@0 | 107 | xbl:inherits="src=image"/> |
michael@0 | 108 | </xul:vbox> |
michael@0 | 109 | <xul:vbox flex="1"> |
michael@0 | 110 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 111 | crop="center" flex="2" class="name"/> |
michael@0 | 112 | <xul:hbox> |
michael@0 | 113 | <xul:vbox flex="1"> |
michael@0 | 114 | <xul:progressmeter mode="normal" value="0" flex="1" |
michael@0 | 115 | anonid="progressmeter" |
michael@0 | 116 | xbl:inherits="value=progress,mode=progressmode"/> |
michael@0 | 117 | </xul:vbox> |
michael@0 | 118 | <xul:button class="pause mini-button" tooltiptext="&cmd.pause.label;" |
michael@0 | 119 | cmd="cmd_pause" ondblclick="event.stopPropagation();" |
michael@0 | 120 | oncommand="performCommand('cmd_pause', this);"/> |
michael@0 | 121 | <xul:button class="cancel mini-button" tooltiptext="&cmd.cancel.label;" |
michael@0 | 122 | cmd="cmd_cancel" ondblclick="event.stopPropagation();" |
michael@0 | 123 | oncommand="performCommand('cmd_cancel', this);"/> |
michael@0 | 124 | </xul:hbox> |
michael@0 | 125 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" flex="1" |
michael@0 | 126 | crop="right" class="status"/> |
michael@0 | 127 | <xul:spacer flex="1"/> |
michael@0 | 128 | </xul:vbox> |
michael@0 | 129 | </xul:hbox> |
michael@0 | 130 | </content> |
michael@0 | 131 | </binding> |
michael@0 | 132 | |
michael@0 | 133 | <binding id="download-paused" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 134 | <content> |
michael@0 | 135 | <xul:hbox flex="1"> |
michael@0 | 136 | <xul:vbox pack="center"> |
michael@0 | 137 | <xul:image class="downloadTypeIcon" validate="always" |
michael@0 | 138 | xbl:inherits="src=image"/> |
michael@0 | 139 | </xul:vbox> |
michael@0 | 140 | <xul:vbox flex="1"> |
michael@0 | 141 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 142 | crop="center" flex="2" class="name"/> |
michael@0 | 143 | <xul:hbox> |
michael@0 | 144 | <xul:vbox flex="1"> |
michael@0 | 145 | <xul:progressmeter mode="normal" value="0" flex="1" |
michael@0 | 146 | anonid="progressmeter" |
michael@0 | 147 | xbl:inherits="value=progress,mode=progressmode"/> |
michael@0 | 148 | </xul:vbox> |
michael@0 | 149 | <xul:button class="resume mini-button" tooltiptext="&cmd.resume.label;" |
michael@0 | 150 | cmd="cmd_resume" ondblclick="event.stopPropagation();" |
michael@0 | 151 | oncommand="performCommand('cmd_resume', this);"/> |
michael@0 | 152 | <xul:button class="cancel mini-button" tooltiptext="&cmd.cancel.label;" |
michael@0 | 153 | cmd="cmd_cancel" ondblclick="event.stopPropagation();" |
michael@0 | 154 | oncommand="performCommand('cmd_cancel', this);"/> |
michael@0 | 155 | </xul:hbox> |
michael@0 | 156 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" flex="1" |
michael@0 | 157 | crop="right" class="status"/> |
michael@0 | 158 | <xul:spacer flex="1"/> |
michael@0 | 159 | </xul:vbox> |
michael@0 | 160 | </xul:hbox> |
michael@0 | 161 | </content> |
michael@0 | 162 | </binding> |
michael@0 | 163 | |
michael@0 | 164 | <binding id="download-done" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 165 | <content> |
michael@0 | 166 | <xul:hbox flex="1"> |
michael@0 | 167 | <xul:vbox pack="center"> |
michael@0 | 168 | <xul:image class="downloadTypeIcon" validate="always" |
michael@0 | 169 | xbl:inherits="src=image"/> |
michael@0 | 170 | </xul:vbox> |
michael@0 | 171 | <xul:vbox pack="start" flex="1"> |
michael@0 | 172 | <xul:hbox align="center" flex="1"> |
michael@0 | 173 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 174 | crop="center" flex="1" class="name"/> |
michael@0 | 175 | <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip" |
michael@0 | 176 | class="dateTime"/> |
michael@0 | 177 | </xul:hbox> |
michael@0 | 178 | <xul:hbox align="center" flex="1"> |
michael@0 | 179 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" |
michael@0 | 180 | crop="end" flex="1" class="status"/> |
michael@0 | 181 | </xul:hbox> |
michael@0 | 182 | </xul:vbox> |
michael@0 | 183 | </xul:hbox> |
michael@0 | 184 | </content> |
michael@0 | 185 | </binding> |
michael@0 | 186 | |
michael@0 | 187 | <binding id="download-canceled" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 188 | <content> |
michael@0 | 189 | <xul:hbox flex="1"> |
michael@0 | 190 | <xul:vbox pack="center"> |
michael@0 | 191 | <xul:image class="downloadTypeIcon" validate="always" |
michael@0 | 192 | xbl:inherits="src=image"/> |
michael@0 | 193 | </xul:vbox> |
michael@0 | 194 | <xul:vbox pack="start" flex="1"> |
michael@0 | 195 | <xul:hbox align="center" flex="1"> |
michael@0 | 196 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 197 | crop="center" flex="1" class="name"/> |
michael@0 | 198 | <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip" |
michael@0 | 199 | class="dateTime"/> |
michael@0 | 200 | </xul:hbox> |
michael@0 | 201 | <xul:hbox align="center" flex="1"> |
michael@0 | 202 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" |
michael@0 | 203 | crop="end" flex="1" class="status"/> |
michael@0 | 204 | <xul:button class="retry mini-button" tooltiptext="&cmd.retry.label;" |
michael@0 | 205 | cmd="cmd_retry" ondblclick="event.stopPropagation();" |
michael@0 | 206 | oncommand="performCommand('cmd_retry', this);"/> |
michael@0 | 207 | </xul:hbox> |
michael@0 | 208 | </xul:vbox> |
michael@0 | 209 | </xul:hbox> |
michael@0 | 210 | </content> |
michael@0 | 211 | </binding> |
michael@0 | 212 | |
michael@0 | 213 | <binding id="download-failed" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 214 | <content> |
michael@0 | 215 | <xul:hbox flex="1"> |
michael@0 | 216 | <xul:vbox pack="center"> |
michael@0 | 217 | <xul:image class="downloadTypeIcon" validate="always" |
michael@0 | 218 | xbl:inherits="src=image"/> |
michael@0 | 219 | </xul:vbox> |
michael@0 | 220 | <xul:vbox pack="start" flex="1"> |
michael@0 | 221 | <xul:hbox align="center" flex="1"> |
michael@0 | 222 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 223 | crop="center" flex="1" class="name"/> |
michael@0 | 224 | <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip" |
michael@0 | 225 | class="dateTime"/> |
michael@0 | 226 | </xul:hbox> |
michael@0 | 227 | <xul:hbox align="center" flex="1"> |
michael@0 | 228 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" |
michael@0 | 229 | crop="end" flex="1" class="status"/> |
michael@0 | 230 | <xul:button class="retry mini-button" tooltiptext="&cmd.retry.label;" |
michael@0 | 231 | cmd="cmd_retry" ondblclick="event.stopPropagation();" |
michael@0 | 232 | oncommand="performCommand('cmd_retry', this);"/> |
michael@0 | 233 | </xul:hbox> |
michael@0 | 234 | </xul:vbox> |
michael@0 | 235 | </xul:hbox> |
michael@0 | 236 | </content> |
michael@0 | 237 | </binding> |
michael@0 | 238 | |
michael@0 | 239 | <binding id="download-blocked-parental" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 240 | <content> |
michael@0 | 241 | <xul:hbox flex="1"> |
michael@0 | 242 | <xul:vbox pack="center"> |
michael@0 | 243 | <xul:image class="downloadTypeIcon blockedIcon"/> |
michael@0 | 244 | </xul:vbox> |
michael@0 | 245 | <xul:vbox pack="start" flex="1"> |
michael@0 | 246 | <xul:hbox align="center" flex="1"> |
michael@0 | 247 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 248 | crop="center" flex="1" class="name"/> |
michael@0 | 249 | <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip" |
michael@0 | 250 | class="dateTime"/> |
michael@0 | 251 | </xul:hbox> |
michael@0 | 252 | <xul:hbox align="center" flex="1"> |
michael@0 | 253 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" |
michael@0 | 254 | crop="end" flex="1" class="status"/> |
michael@0 | 255 | </xul:hbox> |
michael@0 | 256 | </xul:vbox> |
michael@0 | 257 | </xul:hbox> |
michael@0 | 258 | </content> |
michael@0 | 259 | </binding> |
michael@0 | 260 | |
michael@0 | 261 | <binding id="download-blocked-policy" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 262 | <content> |
michael@0 | 263 | <xul:hbox flex="1"> |
michael@0 | 264 | <xul:vbox pack="center"> |
michael@0 | 265 | <xul:image class="downloadTypeIcon blockedIcon"/> |
michael@0 | 266 | </xul:vbox> |
michael@0 | 267 | <xul:vbox pack="start" flex="1"> |
michael@0 | 268 | <xul:hbox align="center" flex="1"> |
michael@0 | 269 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 270 | crop="center" flex="1" class="name"/> |
michael@0 | 271 | <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip" |
michael@0 | 272 | class="dateTime"/> |
michael@0 | 273 | </xul:hbox> |
michael@0 | 274 | <xul:hbox align="center" flex="1"> |
michael@0 | 275 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" |
michael@0 | 276 | crop="end" flex="1" class="status"/> |
michael@0 | 277 | </xul:hbox> |
michael@0 | 278 | </xul:vbox> |
michael@0 | 279 | </xul:hbox> |
michael@0 | 280 | </content> |
michael@0 | 281 | </binding> |
michael@0 | 282 | |
michael@0 | 283 | <binding id="download-scanning" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 284 | <content> |
michael@0 | 285 | <xul:hbox flex="1"> |
michael@0 | 286 | <xul:vbox pack="center"> |
michael@0 | 287 | <xul:image class="downloadTypeIcon" validate="always" |
michael@0 | 288 | xbl:inherits="src=image"/> |
michael@0 | 289 | </xul:vbox> |
michael@0 | 290 | <xul:vbox pack="start" flex="1"> |
michael@0 | 291 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 292 | crop="center" flex="2" class="name"/> |
michael@0 | 293 | <xul:hbox> |
michael@0 | 294 | <xul:vbox flex="1"> |
michael@0 | 295 | <xul:progressmeter mode="undetermined" flex="1" /> |
michael@0 | 296 | </xul:vbox> |
michael@0 | 297 | </xul:hbox> |
michael@0 | 298 | <xul:label value="&scanning.label;" class="status"/> |
michael@0 | 299 | <xul:spacer flex="1"/> |
michael@0 | 300 | </xul:vbox> |
michael@0 | 301 | </xul:hbox> |
michael@0 | 302 | </content> |
michael@0 | 303 | </binding> |
michael@0 | 304 | |
michael@0 | 305 | <binding id="download-dirty" extends="chrome://mozapps/content/downloads/download.xml#download-base"> |
michael@0 | 306 | <content> |
michael@0 | 307 | <xul:hbox flex="1"> |
michael@0 | 308 | <xul:vbox pack="center"> |
michael@0 | 309 | <xul:image class="downloadTypeIcon blockedIcon"/> |
michael@0 | 310 | </xul:vbox> |
michael@0 | 311 | <xul:vbox pack="start" flex="1"> |
michael@0 | 312 | <xul:hbox align="center" flex="1"> |
michael@0 | 313 | <xul:label xbl:inherits="value=target,tooltiptext=target" |
michael@0 | 314 | crop="center" flex="1" class="name"/> |
michael@0 | 315 | <xul:label xbl:inherits="value=dateTime,tooltiptext=dateTimeTip" |
michael@0 | 316 | class="dateTime"/> |
michael@0 | 317 | </xul:hbox> |
michael@0 | 318 | <xul:hbox align="center" flex="1"> |
michael@0 | 319 | <xul:label xbl:inherits="value=status,tooltiptext=statusTip" |
michael@0 | 320 | crop="end" flex="1" class="status"/> |
michael@0 | 321 | </xul:hbox> |
michael@0 | 322 | </xul:vbox> |
michael@0 | 323 | </xul:hbox> |
michael@0 | 324 | </content> |
michael@0 | 325 | </binding> |
michael@0 | 326 | |
michael@0 | 327 | </bindings> |