Revert "Bug 1950748 part 3: Don't return a caret inside an editor when no editor is focused. r=morgan" as requested for causing accessibility crashes (bug 1977012).
This reverts commit aaf970807d281c28c1e937491719d996cb11648a.
This reverts commit f5f2e3cf4d34c2430372ba790d77620837d56b75.
This reverts commit 5565c5899c32c0b0f5446561a21c5b6499fd44c6.
<!DOCTYPE HTML><html><head><scriptsrc="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script></head><bodyonload="run()"><scripttype="application/javascript">SimpleTest.waitForExplicitFinish();asyncfunctionrun(){try{letprinterList=Cc["@mozilla.org/gfx/printerlist;1"].getService(Ci.nsIPrinterList);letprinters=awaitprinterList.printers;if(printers.length==0){ok(true,"There were no printers to iterate through.");}for(letprinterofprinters){printer.QueryInterface(Ci.nsIPrinter);is(typeof(printer.name),'string',"Printer name should be a string.");isnot(printer.name,"","Printer name should never be empty.");info(printer.name);info("duplex("+printer.supportsDuplex+")");letprinterInfo=awaitprinter.printerInfo;for(letpaperofprinterInfo.paperList){paper.QueryInterface(Ci.nsIPaper);info(`${paper.name}: ${paper.width}x${paper.height}`);is(typeof(paper.name),'string',"Paper name should be a string.");isnot(paper.name,"","Paper name should never be empty.");is(typeof(paper.width),'number',"Paper width should be a number.");ok(paper.width>0.0,"Paper width should be greater than zero.");is(typeof(paper.height),'number',"Paper height should be a number.");ok(paper.height>0.0,"Paper height should be greater than zero.");letmargin=awaitpaper.unwriteableMargin;margin.QueryInterface(Ci.nsIPaperMargin);info(`with margin: ${margin.top}${margin.right}${margin.bottom}${margin.left}`);is(typeof(margin.top),'number',"Paper unwriteable margin top should be a number.");is(typeof(margin.right),'number',"Paper unwriteable margin right should be a number.");is(typeof(margin.bottom),'number',"Paper unwriteable margin bottom should be a number.");is(typeof(margin.left),'number',"Paper unwriteable margin left should be a number.");ok(margin.top>=0.0,"Paper unwriteable margin top should be greater than or equal to zero.");ok(margin.right>=0.0,"Paper unwriteable margin right should be greater than or equal to zero.");ok(margin.bottom>=0.0,"Paper unwriteable bottom right should be greater than or equal to zero.");ok(margin.left>=0.0,"Paper unwriteable margin left should be greater than or equal to zero.");}}}catch(e){ok(false,`Shouldn't throw: ${e}`);console.error(e);}SimpleTest.finish();}</script></body></html>