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>Layout Debug Utilities</title> |
michael@0 | 6 | </head> |
michael@0 | 7 | <script type="application/javascript"> |
michael@0 | 8 | |
michael@0 | 9 | const nsILayoutDebuggingTools = Components.interfaces.nsILayoutDebuggingTools; |
michael@0 | 10 | var gDebugTools; |
michael@0 | 11 | |
michael@0 | 12 | function Init() |
michael@0 | 13 | { |
michael@0 | 14 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 15 | gDebugTools = Components.classes["@mozilla.org/layout-debug/layout-debuggingtools;1"].createInstance(nsILayoutDebuggingTools); |
michael@0 | 16 | gDebugTools.init(window); |
michael@0 | 17 | } |
michael@0 | 18 | |
michael@0 | 19 | function SetShowFrameBorders(inShow) |
michael@0 | 20 | { |
michael@0 | 21 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 22 | gDebugTools.visualDebugging = inShow; |
michael@0 | 23 | } |
michael@0 | 24 | |
michael@0 | 25 | function SetShowEventTargetBorders(inShow) |
michael@0 | 26 | { |
michael@0 | 27 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 28 | gDebugTools.visualEventDebugging = inShow; |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | function SetShowReflowStats(inShow) |
michael@0 | 32 | { |
michael@0 | 33 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 34 | gDebugTools.reflowCounts = inShow; |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | function DumpFrames() |
michael@0 | 38 | { |
michael@0 | 39 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 40 | gDebugTools.dumpFrames(); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | function DumpContent() |
michael@0 | 44 | { |
michael@0 | 45 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 46 | gDebugTools.dumpContent(); |
michael@0 | 47 | } |
michael@0 | 48 | |
michael@0 | 49 | function DumpViews() |
michael@0 | 50 | { |
michael@0 | 51 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 52 | gDebugTools.dumpViews(); |
michael@0 | 53 | } |
michael@0 | 54 | |
michael@0 | 55 | function DumpWebShells() |
michael@0 | 56 | { |
michael@0 | 57 | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); |
michael@0 | 58 | gDebugTools.dumpWebShells(); |
michael@0 | 59 | } |
michael@0 | 60 | |
michael@0 | 61 | </script> |
michael@0 | 62 | |
michael@0 | 63 | <body onload="Init()"> |
michael@0 | 64 | <h1>Layout Debug Utils</h1> |
michael@0 | 65 | |
michael@0 | 66 | <p>Note that these only work in debug builds</h1> |
michael@0 | 67 | |
michael@0 | 68 | <h2>Global settings</h2> |
michael@0 | 69 | |
michael@0 | 70 | <form name="globalsform"> |
michael@0 | 71 | <div> |
michael@0 | 72 | <input type="checkbox" id="showBordersCheck" name="showBordersCheck" |
michael@0 | 73 | onchange="SetShowFrameBorders(document.globalsform.showBordersCheck.checked)"></input> |
michael@0 | 74 | <label for="showBordersCheck">Show Frame Borders</label> |
michael@0 | 75 | </div> |
michael@0 | 76 | <div> |
michael@0 | 77 | <input type="checkbox" |
michael@0 | 78 | id="showEventTargetCheck" |
michael@0 | 79 | name="showEventTargetCheck" |
michael@0 | 80 | onchange="SetShowEventTargetBorders(document.globalsform.showEventTargetCheck.checked)"></input> |
michael@0 | 81 | <label for="showEventTargetCheck">Show Event Target Borders</label> |
michael@0 | 82 | </div> |
michael@0 | 83 | </form> |
michael@0 | 84 | |
michael@0 | 85 | <h2>Per-Window settings</h2> |
michael@0 | 86 | |
michael@0 | 87 | <form name="windowform"> |
michael@0 | 88 | <input type="checkbox" |
michael@0 | 89 | id="showReflowStatsCheck" |
michael@0 | 90 | name="showReflowStatsCheck" |
michael@0 | 91 | onchange="SetShowReflowStats(document.windowform.showReflowStatsCheck.checked)"></input> |
michael@0 | 92 | <label for="showReflowStatsCheck">Show Reflow Stats</label> |
michael@0 | 93 | </form> |
michael@0 | 94 | |
michael@0 | 95 | <h2>Dumping</h2> |
michael@0 | 96 | |
michael@0 | 97 | <form name="dumpform"> |
michael@0 | 98 | <div> |
michael@0 | 99 | <input type="button" value="Dump Frames" onclick="DumpFrames()"> |
michael@0 | 100 | <input type="button" value="Dump Content" onclick="DumpContent()"> |
michael@0 | 101 | <input type="button" value="Dump Views" onclick="DumpViews()"> |
michael@0 | 102 | <input type="button" value="Dump WebShells" onclick="DumpWebShells()"> |
michael@0 | 103 | </div> |
michael@0 | 104 | |
michael@0 | 105 | </form> |
michael@0 | 106 | |
michael@0 | 107 | |
michael@0 | 108 | |
michael@0 | 109 | </body> |
michael@0 | 110 | </html> |
michael@0 | 111 |