toolkit/components/viewsource/content/viewPartialSource.xul

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 # -*- Mode: HTML -*-
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 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
michael@0 8 <?xml-stylesheet href="chrome://global/content/viewSource.css" type="text/css"?>
michael@0 9 <?xml-stylesheet href="chrome://mozapps/skin/viewsource/viewsource.css" type="text/css"?>
michael@0 10 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
michael@0 11
michael@0 12 <!DOCTYPE window [
michael@0 13 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
michael@0 14 %brandDTD;
michael@0 15 <!ENTITY % sourceDTD SYSTEM "chrome://global/locale/viewSource.dtd" >
michael@0 16 %sourceDTD;
michael@0 17 ]>
michael@0 18
michael@0 19 <window id="viewSource"
michael@0 20 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 21 onload="onLoadViewPartialSource();"
michael@0 22 contenttitlesetting="true"
michael@0 23 title="&mainWindow.title;"
michael@0 24 titlemodifier="&mainWindow.titlemodifier;"
michael@0 25 titlepreface=""
michael@0 26 titlemenuseparator ="&mainWindow.titlemodifierseparator;"
michael@0 27 windowtype="navigator:view-source"
michael@0 28 width="500" height="300"
michael@0 29 screenX="10" screenY="10"
michael@0 30 persist="screenX screenY width height sizemode">
michael@0 31
michael@0 32 <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
michael@0 33 <script type="application/javascript" src="chrome://global/content/printUtils.js"/>
michael@0 34 <script type="application/javascript" src="chrome://global/content/viewSource.js"/>
michael@0 35 <script type="application/javascript" src="chrome://global/content/viewPartialSource.js"/>
michael@0 36 <script type="application/javascript" src="chrome://global/content/viewZoomOverlay.js"/>
michael@0 37 <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
michael@0 38
michael@0 39 <stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/>
michael@0 40
michael@0 41 <command id="cmd_savePage" oncommand="ViewSourceSavePage();"/>
michael@0 42 <command id="cmd_print" oncommand="PrintUtils.print();"/>
michael@0 43 <command id="cmd_printpreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
michael@0 44 <command id="cmd_pagesetup" oncommand="PrintUtils.showPageSetup();"/>
michael@0 45 <command id="cmd_close" oncommand="window.close();"/>
michael@0 46 <commandset id="editMenuCommands"/>
michael@0 47 <command id="cmd_find"
michael@0 48 oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
michael@0 49 <command id="cmd_findAgain"
michael@0 50 oncommand="document.getElementById('FindToolbar').onFindAgainCommand(false);"/>
michael@0 51 <command id="cmd_findPrevious"
michael@0 52 oncommand="document.getElementById('FindToolbar').onFindAgainCommand(true);"/>
michael@0 53 <command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/>
michael@0 54 <command id="cmd_highlightSyntax" oncommand="highlightSyntax();"/>
michael@0 55 <command id="cmd_wrapLongLines" oncommand="wrapLongLines()"/>
michael@0 56 <command id="cmd_textZoomReduce" oncommand="ZoomManager.reduce();"/>
michael@0 57 <command id="cmd_textZoomEnlarge" oncommand="ZoomManager.enlarge();"/>
michael@0 58 <command id="cmd_textZoomReset" oncommand="ZoomManager.reset();"/>
michael@0 59
michael@0 60 <keyset id="editMenuKeys"/>
michael@0 61 <keyset id="viewSourceKeys">
michael@0 62 <key id="key_savePage" key="&savePageCmd.commandkey;" modifiers="accel" command="cmd_savePage"/>
michael@0 63 <key id="key_print" key="&printCmd.commandkey;" modifiers="accel" command="cmd_print"/>
michael@0 64 <key id="key_close" key="&closeCmd.commandkey;" modifiers="accel" command="cmd_close"/>
michael@0 65 <key keycode="VK_ESCAPE" command="cmd_close"/>
michael@0 66
michael@0 67 <key id="key_textZoomEnlarge" key="&textEnlarge.commandkey;" command="cmd_textZoomEnlarge" modifiers="accel"/>
michael@0 68 <key id="key_textZoomEnlarge2" key="&textEnlarge.commandkey2;" command="cmd_textZoomEnlarge" modifiers="accel"/>
michael@0 69 <key id="key_textZoomEnlarge3" key="&textEnlarge.commandkey3;" command="cmd_textZoomEnlarge" modifiers="accel"/>
michael@0 70 <key id="key_textZoomReduce" key="&textReduce.commandkey;" command="cmd_textZoomReduce" modifiers="accel"/>
michael@0 71 <key id="key_textZoomReduce2" key="&textReduce.commandkey2;" command="cmd_textZoomReduce" modifiers="accel"/>
michael@0 72 <key id="key_textZoomReset" key="&textReset.commandkey;" command="cmd_textZoomReset" modifiers="accel"/>
michael@0 73 <key id="key_textZoomReset2" key="&textReset.commandkey2;" command="cmd_textZoomReset" modifiers="accel"/>
michael@0 74 </keyset>
michael@0 75
michael@0 76 <menupopup id="viewSourceContextMenu"
michael@0 77 onpopupshowing="contextMenuShowing();">
michael@0 78 <menuitem id="cMenu_findAgain"/>
michael@0 79 <menuseparator/>
michael@0 80 <menuitem id="cMenu_copy"/>
michael@0 81 <menuitem id="context-copyLink"
michael@0 82 label="&copyLinkCmd.label;"
michael@0 83 accesskey="&copyLinkCmd.accesskey;"
michael@0 84 oncommand="contextMenuCopyLinkOrEmail();"/>
michael@0 85 <menuitem id="context-copyEmail"
michael@0 86 label="&copyEmailCmd.label;"
michael@0 87 accesskey="&copyEmailCmd.accesskey;"
michael@0 88 oncommand="contextMenuCopyLinkOrEmail();"/>
michael@0 89 <menuseparator/>
michael@0 90 <menuitem id="cMenu_selectAll"/>
michael@0 91 </menupopup>
michael@0 92
michael@0 93 <!-- Menu -->
michael@0 94 <toolbox id="viewSource-toolbox">
michael@0 95 <menubar id="viewSource-main-menubar">
michael@0 96
michael@0 97 <menu id="menu_file" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
michael@0 98 <menupopup id="menu_FilePopup">
michael@0 99 <menuitem key="key_savePage" command="cmd_savePage" id="menu_savePage"
michael@0 100 label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;"/>
michael@0 101 <menuitem command="cmd_pagesetup" id="menu_pageSetup"
michael@0 102 label="&pageSetupCmd.label;" accesskey="&pageSetupCmd.accesskey;"/>
michael@0 103 #ifndef XP_MACOSX
michael@0 104 <menuitem command="cmd_printpreview" id="menu_printPreview"
michael@0 105 label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"/>
michael@0 106 #endif
michael@0 107 <menuitem key="key_print" command="cmd_print" id="menu_print"
michael@0 108 label="&printCmd.label;" accesskey="&printCmd.accesskey;"/>
michael@0 109 <menuseparator/>
michael@0 110 <menuitem key="key_close" command="cmd_close" id="menu_close"
michael@0 111 label="&closeCmd.label;" accesskey="&closeCmd.accesskey;"/>
michael@0 112 </menupopup>
michael@0 113 </menu>
michael@0 114
michael@0 115 <menu id="menu_edit">
michael@0 116 <menupopup id="editmenu-popup">
michael@0 117 <menuitem id="menu_undo"/>
michael@0 118 <menuitem id="menu_redo"/>
michael@0 119 <menuseparator/>
michael@0 120 <menuitem id="menu_cut"/>
michael@0 121 <menuitem id="menu_copy"/>
michael@0 122 <menuitem id="menu_paste"/>
michael@0 123 <menuitem id="menu_delete"/>
michael@0 124 <menuseparator/>
michael@0 125 <menuitem id="menu_selectAll"/>
michael@0 126 <menuseparator/>
michael@0 127 <menuitem id="menu_find"/>
michael@0 128 <menuitem id="menu_findAgain"/>
michael@0 129 </menupopup>
michael@0 130 </menu>
michael@0 131
michael@0 132 <menu id="menu_view" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;">
michael@0 133 <menupopup id="viewmenu-popup">
michael@0 134 <menu id="viewTextZoomMenu" label="&menu_textSize.label;" accesskey="&menu_textSize.accesskey;">
michael@0 135 <menupopup>
michael@0 136 <menuitem id="menu_textEnlarge" command="cmd_textZoomEnlarge"
michael@0 137 label="&menu_textEnlarge.label;" accesskey="&menu_textEnlarge.accesskey;"
michael@0 138 key="key_textZoomEnlarge"/>
michael@0 139 <menuitem id="menu_textReduce" command="cmd_textZoomReduce"
michael@0 140 label="&menu_textReduce.label;" accesskey="&menu_textReduce.accesskey;"
michael@0 141 key="key_textZoomReduce"/>
michael@0 142 <menuseparator/>
michael@0 143 <menuitem id="menu_textReset" command="cmd_textZoomReset"
michael@0 144 label="&menu_textReset.label;" accesskey="&menu_textReset.accesskey;"
michael@0 145 key="key_textZoomReset"/>
michael@0 146 </menupopup>
michael@0 147 </menu>
michael@0 148 <menuseparator/>
michael@0 149 <menuitem id="menu_wrapLongLines" type="checkbox" command="cmd_wrapLongLines"
michael@0 150 label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/>
michael@0 151 <menuitem type="checkbox" id="menu_highlightSyntax" command="cmd_highlightSyntax"
michael@0 152 label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
michael@0 153 </menupopup>
michael@0 154 </menu>
michael@0 155 </menubar>
michael@0 156 </toolbox>
michael@0 157
michael@0 158 <vbox id="appcontent" flex="1">
michael@0 159 <browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
michael@0 160 disablehistory="true" context="viewSourceContextMenu"/>
michael@0 161 <findbar id="FindToolbar" browserid="content"/>
michael@0 162 </vbox>
michael@0 163
michael@0 164 </window>

mercurial