зеркало из https://github.com/mozilla/gecko-dev.git
Bug 815593. Don't layerize images that exceed MaxTextureSize. r=mattwoodrow
--HG-- extra : rebase_source : f94300b24b90d063df095324663c9d8fa49e42e9
This commit is contained in:
Родитель
528576f042
Коммит
01b72b4b81
|
@ -57,7 +57,7 @@ native gfxGraphicsFilter(gfxPattern::GraphicsFilter);
|
|||
*
|
||||
* Internally, imgIContainer also manages animation of images.
|
||||
*/
|
||||
[scriptable, uuid(d6c58749-ceb6-4afe-ab72-ff3086433e1f)]
|
||||
[scriptable, uuid(01e12ac9-7d9f-40d9-9ec1-70b64c53ce7a)]
|
||||
interface imgIContainer : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -158,7 +158,7 @@ interface imgIContainer : nsISupports
|
|||
* Attempts to create an ImageContainer (and Image) containing the current
|
||||
* frame. Only valid for RASTER type images.
|
||||
*/
|
||||
[noscript] ImageContainer getImageContainer();
|
||||
[noscript] ImageContainer getImageContainer(in LayerManager aManager);
|
||||
|
||||
/**
|
||||
* Create and return a new copy of the given frame that you can write to
|
||||
|
|
|
@ -1114,8 +1114,14 @@ RasterImage::GetCurrentImage()
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
RasterImage::GetImageContainer(ImageContainer **_retval)
|
||||
RasterImage::GetImageContainer(LayerManager* aManager, ImageContainer **_retval)
|
||||
{
|
||||
int32_t maxTextureSize = aManager->GetMaxTextureSize();
|
||||
if (mSize.width > maxTextureSize || mSize.height > maxTextureSize) {
|
||||
*_retval = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (mImageContainer) {
|
||||
*_retval = mImageContainer;
|
||||
NS_ADDREF(*_retval);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
namespace mozilla {
|
||||
|
||||
using namespace dom;
|
||||
using namespace layers;
|
||||
|
||||
namespace image {
|
||||
|
||||
|
@ -383,7 +384,8 @@ VectorImage::GetFrame(uint32_t aWhichFrame,
|
|||
//******************************************************************************
|
||||
/* [noscript] ImageContainer getImageContainer(); */
|
||||
NS_IMETHODIMP
|
||||
VectorImage::GetImageContainer(mozilla::layers::ImageContainer** _retval)
|
||||
VectorImage::GetImageContainer(LayerManager* aManager,
|
||||
mozilla::layers::ImageContainer** _retval)
|
||||
{
|
||||
*_retval = nullptr;
|
||||
return NS_OK;
|
||||
|
|
|
@ -1534,7 +1534,7 @@ ContainerState::ThebesLayerData::CanOptimizeImageLayer(nsDisplayListBuilder* aBu
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
return mImage->GetContainer(aBuilder);
|
||||
return mImage->GetContainer(mLayer->Manager(), aBuilder);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -4696,7 +4696,7 @@ nsImageRenderer::IsRasterImage()
|
|||
}
|
||||
|
||||
already_AddRefed<mozilla::layers::ImageContainer>
|
||||
nsImageRenderer::GetContainer()
|
||||
nsImageRenderer::GetContainer(LayerManager* aManager)
|
||||
{
|
||||
if (mType != eStyleImageType_Image)
|
||||
return nullptr;
|
||||
|
@ -4704,8 +4704,9 @@ nsImageRenderer::GetContainer()
|
|||
nsresult rv = mImage->GetImageData()->GetImage(getter_AddRefs(img));
|
||||
if (NS_FAILED(rv))
|
||||
return nullptr;
|
||||
|
||||
nsRefPtr<ImageContainer> container;
|
||||
rv = img->GetImageContainer(getter_AddRefs(container));
|
||||
rv = img->GetImageContainer(aManager, getter_AddRefs(container));
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
return container.forget();
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ class nsRenderingContext;
|
|||
*/
|
||||
class nsImageRenderer {
|
||||
public:
|
||||
typedef mozilla::layers::LayerManager LayerManager;
|
||||
typedef mozilla::layers::ImageContainer ImageContainer;
|
||||
|
||||
enum {
|
||||
|
@ -60,9 +61,9 @@ public:
|
|||
const nsPoint& aAnchor,
|
||||
const nsRect& aDirty);
|
||||
|
||||
|
||||
bool IsRasterImage();
|
||||
already_AddRefed<ImageContainer> GetContainer();
|
||||
already_AddRefed<ImageContainer> GetContainer(LayerManager* aManager);
|
||||
|
||||
private:
|
||||
/*
|
||||
* Compute the "unscaled" dimensions of the image in aUnscaled{Width,Height}
|
||||
|
|
|
@ -1723,7 +1723,8 @@ nsDisplayBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder* aBuil
|
|||
}
|
||||
|
||||
bool
|
||||
nsDisplayBackgroundImage::TryOptimizeToImageLayer(nsDisplayListBuilder* aBuilder)
|
||||
nsDisplayBackgroundImage::TryOptimizeToImageLayer(LayerManager* aManager,
|
||||
nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
if (mIsThemed || !mBackgroundStyle)
|
||||
return false;
|
||||
|
@ -1747,7 +1748,7 @@ nsDisplayBackgroundImage::TryOptimizeToImageLayer(nsDisplayListBuilder* aBuilder
|
|||
if (!imageRenderer->IsRasterImage())
|
||||
return false;
|
||||
|
||||
nsRefPtr<ImageContainer> imageContainer = imageRenderer->GetContainer();
|
||||
nsRefPtr<ImageContainer> imageContainer = imageRenderer->GetContainer(aManager);
|
||||
// Image is not ready to be made into a layer yet
|
||||
if (!imageContainer)
|
||||
return false;
|
||||
|
@ -1771,9 +1772,10 @@ nsDisplayBackgroundImage::TryOptimizeToImageLayer(nsDisplayListBuilder* aBuilder
|
|||
}
|
||||
|
||||
already_AddRefed<ImageContainer>
|
||||
nsDisplayBackgroundImage::GetContainer(nsDisplayListBuilder *aBuilder)
|
||||
nsDisplayBackgroundImage::GetContainer(LayerManager* aManager,
|
||||
nsDisplayListBuilder *aBuilder)
|
||||
{
|
||||
if (!TryOptimizeToImageLayer(aBuilder)) {
|
||||
if (!TryOptimizeToImageLayer(aManager, aBuilder)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -1789,7 +1791,7 @@ nsDisplayBackgroundImage::GetLayerState(nsDisplayListBuilder* aBuilder,
|
|||
{
|
||||
if (!aManager->IsCompositingCheap() ||
|
||||
!nsLayoutUtils::GPUImageScalingEnabled() ||
|
||||
!TryOptimizeToImageLayer(aBuilder)) {
|
||||
!TryOptimizeToImageLayer(aManager, aBuilder)) {
|
||||
return LAYER_NONE;
|
||||
}
|
||||
|
||||
|
@ -1806,12 +1808,12 @@ nsDisplayBackgroundImage::GetLayerState(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
// If we are not scaling at all, no point in separating this into a layer.
|
||||
if (scale.width == 1.0f && scale.height == 1.0f) {
|
||||
return LAYER_INACTIVE;
|
||||
return LAYER_NONE;
|
||||
}
|
||||
|
||||
// If the target size is pretty small, no point in using a layer.
|
||||
if (destRect.width * destRect.height < 64 * 64) {
|
||||
return LAYER_INACTIVE;
|
||||
return LAYER_NONE;
|
||||
}
|
||||
|
||||
return LAYER_ACTIVE;
|
||||
|
|
|
@ -1560,7 +1560,8 @@ public:
|
|||
: nsDisplayItem(aBuilder, aFrame)
|
||||
{}
|
||||
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(nsDisplayListBuilder* aBuilder) = 0;
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(LayerManager* aManager,
|
||||
nsDisplayListBuilder* aBuilder) = 0;
|
||||
virtual void ConfigureLayer(ImageLayer* aLayer, const nsIntPoint& aOffset) = 0;
|
||||
|
||||
virtual bool SupportsOptimizingToImage() { return true; }
|
||||
|
@ -1886,7 +1887,8 @@ public:
|
|||
const nsDisplayItemGeometry* aGeometry,
|
||||
nsRegion* aInvalidRegion) MOZ_OVERRIDE;
|
||||
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(nsDisplayListBuilder *aBuilder) MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(LayerManager* aManager,
|
||||
nsDisplayListBuilder *aBuilder) MOZ_OVERRIDE;
|
||||
virtual void ConfigureLayer(ImageLayer* aLayer, const nsIntPoint& aOffset) MOZ_OVERRIDE;
|
||||
|
||||
static nsRegion GetInsideClipRegion(nsDisplayItem* aItem, nsPresContext* aPresContext, uint8_t aClip,
|
||||
|
@ -1895,7 +1897,7 @@ protected:
|
|||
typedef class mozilla::layers::ImageContainer ImageContainer;
|
||||
typedef class mozilla::layers::ImageLayer ImageLayer;
|
||||
|
||||
bool TryOptimizeToImageLayer(nsDisplayListBuilder* aBuilder);
|
||||
bool TryOptimizeToImageLayer(LayerManager* aManager, nsDisplayListBuilder* aBuilder);
|
||||
bool IsSingleFixedPositionImage(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aClipRect,
|
||||
gfxRect* aDestRect);
|
||||
|
|
|
@ -1229,10 +1229,11 @@ nsDisplayImage::Paint(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
already_AddRefed<ImageContainer>
|
||||
nsDisplayImage::GetContainer(nsDisplayListBuilder* aBuilder)
|
||||
nsDisplayImage::GetContainer(LayerManager* aManager,
|
||||
nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
nsRefPtr<ImageContainer> container;
|
||||
nsresult rv = mImage->GetImageContainer(getter_AddRefs(container));
|
||||
nsresult rv = mImage->GetImageContainer(aManager, getter_AddRefs(container));
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
return container.forget();
|
||||
}
|
||||
|
@ -1278,12 +1279,18 @@ nsDisplayImage::GetLayerState(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
// If we are not scaling at all, no point in separating this into a layer.
|
||||
if (scale.width == 1.0f && scale.height == 1.0f) {
|
||||
return LAYER_INACTIVE;
|
||||
return LAYER_NONE;
|
||||
}
|
||||
|
||||
// If the target size is pretty small, no point in using a layer.
|
||||
if (destRect.width * destRect.height < 64 * 64) {
|
||||
return LAYER_INACTIVE;
|
||||
return LAYER_NONE;
|
||||
}
|
||||
|
||||
nsRefPtr<ImageContainer> container;
|
||||
nsresult rv = mImage->GetImageContainer(aManager, getter_AddRefs(container));
|
||||
if (!container) {
|
||||
return LAYER_NONE;
|
||||
}
|
||||
|
||||
return LAYER_ACTIVE;
|
||||
|
@ -1295,7 +1302,7 @@ nsDisplayImage::BuildLayer(nsDisplayListBuilder* aBuilder,
|
|||
const ContainerParameters& aParameters)
|
||||
{
|
||||
nsRefPtr<ImageContainer> container;
|
||||
nsresult rv = mImage->GetImageContainer(getter_AddRefs(container));
|
||||
nsresult rv = mImage->GetImageContainer(aManager, getter_AddRefs(container));
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
|
||||
nsRefPtr<ImageLayer> layer = aManager->CreateImageLayer();
|
||||
|
|
|
@ -370,7 +370,8 @@ public:
|
|||
* Returns an ImageContainer for this image if the image type
|
||||
* supports it (TYPE_RASTER only).
|
||||
*/
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(LayerManager* aManager,
|
||||
nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
|
||||
gfxRect GetDestRect();
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<img style="transform:translate(20px,0)" id="i" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAE4gCAYAAAA/MefJAAAJaklEQVR4nO3KQREAAAwCIPuX1ghbAI4vSZ9EURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRF8TbU+MCtlWtcNAAAAABJRU5ErkJggg==">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<body>
|
||||
<img id="i" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAE4gCAYAAAA/MefJAAAJaklEQVR4nO3KQREAAAwCIPuX1ghbAI4vSZ9EURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRFURRF8TbU+MCtlWtcNAAAAABJRU5ErkJggg==">
|
||||
<script>
|
||||
var i = document.getElementById("i");
|
||||
i.getBoundingClientRect();
|
||||
i.style.transform = "translate(10px,0)";
|
||||
window.addEventListener("MozReftestInvalidate", function() {
|
||||
i.style.transform = "translate(20px,0)";
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1732,3 +1732,4 @@ fuzzy(40,800) == 797797-2.html 797797-2-ref.html # 'opacity:N' and rgba(,,,N) te
|
|||
== 804323-1.html 804323-1-ref.html
|
||||
== 811301-1.html 811301-1-ref.html
|
||||
== 812824-1.html 812824-1-ref.html
|
||||
== 815593-1.html 815593-1-ref.html
|
||||
|
|
|
@ -388,13 +388,13 @@ nsDisplayXULImage::ConfigureLayer(ImageLayer* aLayer, const nsIntPoint& aOffset)
|
|||
}
|
||||
|
||||
already_AddRefed<ImageContainer>
|
||||
nsDisplayXULImage::GetContainer(nsDisplayListBuilder* aBuilder)
|
||||
nsDisplayXULImage::GetContainer(LayerManager* aManager, nsDisplayListBuilder* aBuilder)
|
||||
{
|
||||
return static_cast<nsImageBoxFrame*>(mFrame)->GetContainer();
|
||||
return static_cast<nsImageBoxFrame*>(mFrame)->GetContainer(aManager);
|
||||
}
|
||||
|
||||
already_AddRefed<ImageContainer>
|
||||
nsImageBoxFrame::GetContainer()
|
||||
nsImageBoxFrame::GetContainer(LayerManager* aManager)
|
||||
{
|
||||
bool hasSubRect = !mUseSrcAttr && (mSubRect.width > 0 || mSubRect.height > 0);
|
||||
if (hasSubRect || !mImageRequest) {
|
||||
|
@ -408,7 +408,7 @@ nsImageBoxFrame::GetContainer()
|
|||
}
|
||||
|
||||
nsRefPtr<ImageContainer> container;
|
||||
nsresult rv = imgCon->GetImageContainer(getter_AddRefs(container));
|
||||
nsresult rv = imgCon->GetImageContainer(aManager, getter_AddRefs(container));
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
return container.forget();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ private:
|
|||
class nsImageBoxFrame : public nsLeafBoxFrame
|
||||
{
|
||||
public:
|
||||
typedef mozilla::layers::LayerManager LayerManager;
|
||||
|
||||
friend class nsDisplayXULImage;
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
|
@ -87,7 +89,7 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
nsPoint aPt, uint32_t aFlags);
|
||||
|
||||
already_AddRefed<mozilla::layers::ImageContainer> GetContainer();
|
||||
already_AddRefed<mozilla::layers::ImageContainer> GetContainer(LayerManager* aManager);
|
||||
protected:
|
||||
nsImageBoxFrame(nsIPresShell* aShell, nsStyleContext* aContext);
|
||||
|
||||
|
@ -130,7 +132,8 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
virtual already_AddRefed<ImageContainer> GetContainer(LayerManager* aManager,
|
||||
nsDisplayListBuilder* aBuilder) MOZ_OVERRIDE;
|
||||
virtual void ConfigureLayer(ImageLayer* aLayer, const nsIntPoint& aOffset) MOZ_OVERRIDE;
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче