Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 3 | <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" |
michael@0 | 4 | type="text/css"?> |
michael@0 | 5 | |
michael@0 | 6 | <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 7 | title="nsIAccessible::getChildAtPoint and getDeepestChildAtPoint"> |
michael@0 | 8 | |
michael@0 | 9 | <script type="application/javascript" |
michael@0 | 10 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="chrome://mochikit/content/chrome-harness.js" /> |
michael@0 | 13 | |
michael@0 | 14 | <script type="application/javascript" |
michael@0 | 15 | src="../treeview.js" /> |
michael@0 | 16 | |
michael@0 | 17 | <script type="application/javascript" |
michael@0 | 18 | src="../common.js" /> |
michael@0 | 19 | <script type="application/javascript" |
michael@0 | 20 | src="../events.js" /> |
michael@0 | 21 | <script type="application/javascript" |
michael@0 | 22 | src="../layout.js" /> |
michael@0 | 23 | <script type="application/javascript" |
michael@0 | 24 | src="../browser.js" /> |
michael@0 | 25 | |
michael@0 | 26 | <script type="application/javascript"> |
michael@0 | 27 | <![CDATA[ |
michael@0 | 28 | function doTest() |
michael@0 | 29 | { |
michael@0 | 30 | var tabDocument = currentTabDocument(); |
michael@0 | 31 | var tabWindow = currentTabWindow(); |
michael@0 | 32 | |
michael@0 | 33 | var tree = tabDocument.getElementById("tree"); |
michael@0 | 34 | var treecols = tabDocument.getElementById("treecols"); |
michael@0 | 35 | var treecol1 = tabDocument.getElementById("treecol1"); |
michael@0 | 36 | |
michael@0 | 37 | // tree columns |
michael@0 | 38 | hitTest(tree, treecols, treecol1); |
michael@0 | 39 | |
michael@0 | 40 | // tree rows and cells |
michael@0 | 41 | var treeBoxObject = tree.treeBoxObject; |
michael@0 | 42 | var treeBodyBoxObj = tree.treeBoxObject.treeBody.boxObject; |
michael@0 | 43 | var xObj = {}, yObj = {}, widthObj = {}, heightObj = {}; |
michael@0 | 44 | treeBoxObject.getCoordsForCellItem(1, tree.columns[0], "cell", |
michael@0 | 45 | xObj, yObj, widthObj, heightObj); |
michael@0 | 46 | |
michael@0 | 47 | var treeAcc = getAccessible(tree, [nsIAccessibleTable]); |
michael@0 | 48 | var cellAcc = treeAcc.getCellAt(1, 0); |
michael@0 | 49 | var rowAcc = cellAcc.parent; |
michael@0 | 50 | |
michael@0 | 51 | var cssX = xObj.value + treeBodyBoxObj.x; |
michael@0 | 52 | var cssY = yObj.value + treeBodyBoxObj.y; |
michael@0 | 53 | var [x, y] = CSSToDevicePixels(tabWindow, cssX, cssY); |
michael@0 | 54 | |
michael@0 | 55 | testChildAtPoint(treeAcc, x, y, rowAcc, cellAcc); |
michael@0 | 56 | testChildAtPoint(rowAcc, x, y, cellAcc, cellAcc); |
michael@0 | 57 | |
michael@0 | 58 | // do zoom |
michael@0 | 59 | zoomDocument(tabDocument, 1.5); |
michael@0 | 60 | |
michael@0 | 61 | // tree columns |
michael@0 | 62 | hitTest(tree, treecols, treecol1); |
michael@0 | 63 | |
michael@0 | 64 | // tree rows and cells |
michael@0 | 65 | var [x, y] = CSSToDevicePixels(tabWindow, cssX, cssY); |
michael@0 | 66 | testChildAtPoint(treeAcc, x, y, rowAcc, cellAcc); |
michael@0 | 67 | testChildAtPoint(rowAcc, x, y, cellAcc, cellAcc); |
michael@0 | 68 | |
michael@0 | 69 | closeBrowserWindow(); |
michael@0 | 70 | SimpleTest.finish(); |
michael@0 | 71 | } |
michael@0 | 72 | |
michael@0 | 73 | function prepareTest() |
michael@0 | 74 | { |
michael@0 | 75 | var tabDocument = currentTabDocument(); |
michael@0 | 76 | var tree = tabDocument.getElementById("tree"); |
michael@0 | 77 | loadXULTreeAndDoTest(doTest, tree, new nsTableTreeView(5)); |
michael@0 | 78 | } |
michael@0 | 79 | |
michael@0 | 80 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 81 | openBrowserWindow(prepareTest, |
michael@0 | 82 | getRootDirectory(window.location.href) + "zoom_tree.xul", |
michael@0 | 83 | { left: 100, top: 100 }); |
michael@0 | 84 | ]]> |
michael@0 | 85 | </script> |
michael@0 | 86 | |
michael@0 | 87 | <hbox flex="1" style="overflow: auto;"> |
michael@0 | 88 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 89 | <a target="_blank" |
michael@0 | 90 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=471493" |
michael@0 | 91 | title=" crash [@ nsPropertyTable::GetPropertyInternal]"> |
michael@0 | 92 | Mozilla Bug 471493 |
michael@0 | 93 | </a><br/> |
michael@0 | 94 | <p id="display"></p> |
michael@0 | 95 | <div id="content" style="display: none"> |
michael@0 | 96 | </div> |
michael@0 | 97 | <pre id="test"> |
michael@0 | 98 | </pre> |
michael@0 | 99 | </body> |
michael@0 | 100 | </hbox> |
michael@0 | 101 | |
michael@0 | 102 | </window> |
michael@0 | 103 |