Checking in 88153 on behalf of jesse@netscape.com. Making Components.manager.autoRegister
callable by untrusted scripts, but parameters will be ignored. r=mstoltz, sr=jst. git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_2_BRANCH@99031 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -163,18 +163,31 @@ function makeImageTree(page, root)
|
||||
|
||||
function onImageSelect()
|
||||
{
|
||||
var tree = document.getElementById("imageTree");
|
||||
var imageFrame = document.getElementById("imageFrame");
|
||||
imageFrame.setAttribute("src", "about:blank");
|
||||
|
||||
var tree = document.getElementById("imageTree");
|
||||
|
||||
if (tree.selectedItems.length == 1)
|
||||
{
|
||||
var clickedRow = tree.selectedItems[0].firstChild;
|
||||
var firstCell = clickedRow.firstChild;
|
||||
var imageUrl = firstCell.getAttribute("label");
|
||||
imageFrame.setAttribute("src", imageUrl);
|
||||
|
||||
/* The image has to be placed after a setTimeout because of bug 62517. */
|
||||
setTimeout(placeImage, 0, imageFrame, imageUrl);
|
||||
}
|
||||
}
|
||||
|
||||
function placeImage(imageFrame, imageUrl)
|
||||
{
|
||||
var imageDoc = imageFrame.contentDocument;
|
||||
var imageNode = imageDoc.createElement("img");
|
||||
imageNode.setAttribute("src", imageUrl);
|
||||
|
||||
imageDoc.documentElement.appendChild(imageNode);
|
||||
}
|
||||
|
||||
function BrowserClose()
|
||||
{
|
||||
window.close();
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<splitter collapse="after" id="imageSplitter"/>
|
||||
|
||||
<box id="imagePreviewContainer" flex="1">
|
||||
<iframe id="imageFrame" class="inset" src="about:blank" flex="1"/>
|
||||
<iframe id="imageFrame" class="inset" type="content" src="about:blank" flex="1"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user