Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
michael@0 | 2 | "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> |
michael@0 | 3 | <html> |
michael@0 | 4 | <head> |
michael@0 | 5 | <title>Control Frame</title> |
michael@0 | 6 | </head> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript"> |
michael@0 | 9 | |
michael@0 | 10 | const nsILayoutDebuggingTools = Components.interfaces.nsILayoutDebuggingTools; |
michael@0 | 11 | var gDebugTools; |
michael@0 | 12 | |
michael@0 | 13 | function Init() |
michael@0 | 14 | { |
michael@0 | 15 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 16 | gDebugTools = Components.classes["@mozilla.org/layout-debug/layout-debuggingtools;1"].createInstance(nsILayoutDebuggingTools); |
michael@0 | 17 | gDebugTools.init(window.frames.pageframe); |
michael@0 | 18 | } |
michael@0 | 19 | |
michael@0 | 20 | function SetShowFrameBorders(inShow) |
michael@0 | 21 | { |
michael@0 | 22 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 23 | gDebugTools.visualDebugging = inShow; |
michael@0 | 24 | } |
michael@0 | 25 | |
michael@0 | 26 | function SetShowEventTargetBorders(inShow) |
michael@0 | 27 | { |
michael@0 | 28 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 29 | gDebugTools.visualEventDebugging = inShow; |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | function SetShowReflowStats(inShow) |
michael@0 | 33 | { |
michael@0 | 34 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 35 | gDebugTools.reflowCounts = inShow; |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | function DumpFrames() |
michael@0 | 39 | { |
michael@0 | 40 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 41 | gDebugTools.dumpFrames(); |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | function DumpContent() |
michael@0 | 45 | { |
michael@0 | 46 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 47 | gDebugTools.dumpContent(); |
michael@0 | 48 | } |
michael@0 | 49 | |
michael@0 | 50 | function DumpViews() |
michael@0 | 51 | { |
michael@0 | 52 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 53 | gDebugTools.dumpViews(); |
michael@0 | 54 | } |
michael@0 | 55 | |
michael@0 | 56 | function DumpWebShells() |
michael@0 | 57 | { |
michael@0 | 58 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 59 | gDebugTools.dumpWebShells(); |
michael@0 | 60 | } |
michael@0 | 61 | |
michael@0 | 62 | function InputKey(inEvent) |
michael@0 | 63 | { |
michael@0 | 64 | if (inEvent.keyCode == KeyEvent.DOM_VK_RETURN) |
michael@0 | 65 | { |
michael@0 | 66 | var pageFrame = window.frames.pageframe; |
michael@0 | 67 | pageFrame.location.href = document.dumpform.urlfield.value; |
michael@0 | 68 | inEvent.preventDefault(); // avoid form submit on hitting return |
michael@0 | 69 | } |
michael@0 | 70 | } |
michael@0 | 71 | |
michael@0 | 72 | function IframeLoaded() |
michael@0 | 73 | { |
michael@0 | 74 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 75 | document.dumpform.urlfield.value = window.frames.pageframe.location.href; |
michael@0 | 76 | } |
michael@0 | 77 | </script> |
michael@0 | 78 | |
michael@0 | 79 | <body onload="Init()"> |
michael@0 | 80 | |
michael@0 | 81 | <form name="dumpform"> |
michael@0 | 82 | <div style="margin-bottom: 5px"> |
michael@0 | 83 | URL: <input type="text" size="100" name="urlfield" value="http://www.mozilla.org" onkeypress="InputKey(event)"></input> |
michael@0 | 84 | </div> |
michael@0 | 85 | <div> |
michael@0 | 86 | <input type="button" value="Dump Frames" onclick="DumpFrames()"> |
michael@0 | 87 | <input type="button" value="Dump Content" onclick="DumpContent()"> |
michael@0 | 88 | <input type="button" value="Dump Views" onclick="DumpViews()"> |
michael@0 | 89 | <input type="button" value="Dump WebShells" onclick="DumpWebShells()"> |
michael@0 | 90 | |
michael@0 | 91 | <input type="checkbox" id="showBordersCheck" name="showBordersCheck" |
michael@0 | 92 | onchange="SetShowFrameBorders(document.dumpform.showBordersCheck.checked)"></input> |
michael@0 | 93 | <label for="showBordersCheck">Show Frame Borders</label> |
michael@0 | 94 | </div> |
michael@0 | 95 | </form> |
michael@0 | 96 | |
michael@0 | 97 | <iframe name="pageframe" style="border: 1px solid black; width:800px; height:800px;" onload="IframeLoaded()"></iframe> |
michael@0 | 98 | |
michael@0 | 99 | </body> |
michael@0 | 100 | </html> |
michael@0 | 101 |