diff --git a/camino/flashblock/README b/camino/flashblock/README index 3742f6fcf74..550ec794e6e 100644 --- a/camino/flashblock/README +++ b/camino/flashblock/README @@ -1,10 +1,10 @@ -Flash blocking for Camino is implemented using the FlashBlock extension -from http://flashblock.mozdev.org/. FlashBlock is available under the +Flash blocking for Camino is implemented using the Flashblock extension +from http://flashblock.mozdev.org/. Flashblock is available under the MPL/GPL/LGPL tri-license. The files necessary for operation in Camino are placed in the content directory and referenced by the jar.mn manifest. A contents.rdf file is included to allow Camino to identify the contents of flashblock.jar. -Camino's bundled FlashBlock extension is currently synchronized with -FlashBlock 1.5.2 from -http://downloads.mozdev.org/flashblock/flashblock-1.5.2.xpi. +Camino's bundled Flashblock extension is currently synchronized with +Flashblock 1.5.3 from +http://downloads.mozdev.org/flashblock/flashblock-1.5.3.xpi. diff --git a/camino/flashblock/content/flashblock.xml b/camino/flashblock/content/flashblock.xml index f4bb663d88f..f899ce94467 100644 --- a/camino/flashblock/content/flashblock.xml +++ b/camino/flashblock/content/flashblock.xml @@ -56,9 +56,29 @@ function flashblockShowFlash() { if(placeholder.flashblock == "frame") { current.height = current.prevHeight; current.width = current.prevWidth; + current.src = placeholder.title; current.LoadMovie(0, current.src); } else { parent.insertBefore(current, placeholder); + if (placeholder.hasAttribute("srcAttribute")) { + current.setAttribute("src", placeholder.getAttribute("srcAttribute")); + } + if (placeholder.hasAttribute("movieAttribute")) { + current.setAttribute("movie", placeholder.getAttribute("movieAttribute")); + } + if (placeholder.hasAttribute("dataAttribute")) { + current.setAttribute("data", placeholder.getAttribute("dataAttribute")); + } + if (placeholder.movieParam) { + var mparam = placeholder.movieParam; + mparam[0].value = mparam[1]; + } + if (placeholder.hasAttribute("embedsrc")) { + var embeds = current.getElementsByTagName("embed"); + if (embeds && embeds.length > 0) { + embeds[0].setAttribute("src", placeholder.getAttribute("embedsrc")); + } + } } parent.removeChild(placeholder); } @@ -90,20 +110,31 @@ function flashblockSetImage(placeholder, type) { placeholder.style.background = placeholder.bgInactive; } -function flashblockStylePlaceholder(flash, placeholder) { +function flashblockStylePlaceholder(flash, placeholder, isStandalone) { // If object's size was relative, use that. // Otherwise, set size to minimum 32x32 px placeholder.style.minWidth = "32px !important"; placeholder.style.minHeight = "32px !important"; // The size and positioning may come from a class - placeholder.setAttribute("class", flash.getAttribute("class")); + // or from the id for id-specific CSS styles + var fId = flash.getAttribute("id"); + if (fId) + placeholder.setAttribute("id", fId); + var fClass = flash.getAttribute("class"); + if (fClass) + placeholder.setAttribute("class", fClass); if(flash.width.match("%$")) { placeholder.style.width = current.width; } else { var width = parseInt(flash.width || flash.style.width); - if (width && width >= 32) { - placeholder.style.width = width + "px"; + if (width) { + if (width >= 32) { + placeholder.style.width = width + "px"; + } + else { + placeholder.style.width = "32px"; + } } } @@ -111,8 +142,13 @@ function flashblockStylePlaceholder(flash, placeholder) { placeholder.style.height = flash.height; } else { var height = parseInt(flash.height || flash.style.height); - if (height && height >= 32) { - placeholder.style.height = height + "px"; + if (height) { + if (height >= 32) { + placeholder.style.height = height + "px"; + } + else { + placeholder.style.height = "32px"; + } } } @@ -125,14 +161,60 @@ function flashblockStylePlaceholder(flash, placeholder) { // The size of the placeholder should include borders too, // otherwise scrollbars appear for blocked standalone objects placeholder.style.MozBoxSizing = "border-box"; + + // Make some style adjustments since the placeholder is a