Closed
Bug 641770
Opened 15 years ago
Closed 15 years ago
Image element with position:fixed is drawn on scroll bar
Categories
(Core :: Graphics, defect)
Tracking
()
VERIFIED
FIXED
| Tracking | Status | |
|---|---|---|
| blocking2.0 | --- | - |
People
(Reporter: alice0775, Assigned: roc)
References
Details
(Keywords: regression, testcase)
Attachments
(4 files, 1 obsolete file)
|
27.00 KB,
text/html
|
Details | |
|
126.80 KB,
image/png
|
Details | |
|
2.33 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
|
4.57 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
Build Identifier:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b13pre) Gecko/20110314 Firefox/4.0b13pre ID:20110314030412
This was originally reported by http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=6787
Image element with position:fixed is drawn on scroll bar.
Reproducible: Always
Steps to Reproduce:
1. Start Minefield with new profile
2. Open attached sample html
3.
Actual Results:
Image element with position:fixed is drawn on scroll bar
Expected Results:
Image element with position:fixed sgould not be drawn on scroll bar
Regression window:
Works:
http://hg.mozilla.org/mozilla-central/rev/16d3af58499c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b10pre) Gecko/20110116 Firefox/4.0b10pre ID:20110117133144
Fails:
http://hg.mozilla.org/mozilla-central/rev/aa611c72c337
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b10pre) Gecko/20110115 Firefox/4.0b10pre ID:20110117140637
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=16d3af58499c&tochange=aa611c72c337
| Reporter | ||
Comment 1•15 years ago
|
||
| Reporter | ||
Comment 2•15 years ago
|
||
In local build,
build from d41e933f589a : fails
build from 16d3af58499c : works
Regressed by:
d41e933f589a Matt Woodrow — Bug 586683 - Part 4 - Move images into a separate ImageLayer when they are the only item in a ThebesLayer. r=roc a=blocking2.0
Blocks: 586683
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → matt.woodrow+bugzilla
Comment 5•15 years ago
|
||
Roc: renominate this, please, if you disagree with our assertion, but we didn't think it was bad enough to block. Joe thought it might represent a deeper and worse bug in Layers, though.
| Assignee | ||
Comment 6•15 years ago
|
||
I agree we can ship with this. It's almost certainly not a deep layers bug.
| Assignee | ||
Comment 7•15 years ago
|
||
The bug is simply that we don't clip a layerized image, at all. Oops. Fortunately it can't escape from the Web page because the page is in a container layer that is clipped.
| Assignee | ||
Comment 8•15 years ago
|
||
My reftest for this bug exposed this other layers bug.
Assignee: matt.woodrow+bugzilla → roc
Attachment #519524 -
Flags: review?(bas.schouten)
| Assignee | ||
Comment 9•15 years ago
|
||
Attachment #519525 -
Flags: review?(tnikkel)
Comment 10•15 years ago
|
||
Comment on attachment 519524 [details] [diff] [review]
Fix MarkLeafLayersCoveredByOpaque
>+// aClipRect and aRegoin are in that global coordinate system.
aRegoin
Comment 11•15 years ago
|
||
Comment on attachment 519525 [details] [diff] [review]
Set clip rect on layerized images
nsRefPtr<ImageContainer>
ContainerState::ThebesLayerData::CanOptimizeImageLayer(LayerManager* aManager)
{
- if (!mImage) {
+ if (!mImage || !mImageClip.mRoundedClipRects.IsEmpty()) {
return nsnull;
}
return mImage->GetContainer(aManager);
}
Should we do the IsRectClippedByRoundedCorner & RemoveRoundedCorners dance here?
void
ContainerStat
if (imageContainer) {
nsRefPtr<ImageLayer> imageLayer = CreateOrRecycleImageLayer();
imageLayer->SetContainer(imageContainer);
data->mImage->ConfigureLayer(imageLayer);
+ if (data->mImageClip.mHaveClipRect) {
+ nsPresContext* presContext = mContainerFrame->PresContext();
+ nscoord appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
+ nsIntRect clip = data->mImageClip.mClipRect.ToNearestPixels(appUnitsPerDevPixel);
+ imageLayer->IntersectClipRect(
+ data->mImageClip.mClipRect.ToNearestPixels(appUnitsPerDevPixel));
+ }
layer = imageLayer;
Assert no rounded rects in the clip here?
| Assignee | ||
Comment 12•15 years ago
|
||
(In reply to comment #11)
> Should we do the IsRectClippedByRoundedCorner & RemoveRoundedCorners dance
> here?
Let's not bother. When layers can clip to rounded corners, we won't be doing this anyway.
> void
> ContainerStat
>
> if (imageContainer) {
> nsRefPtr<ImageLayer> imageLayer = CreateOrRecycleImageLayer();
> imageLayer->SetContainer(imageContainer);
> data->mImage->ConfigureLayer(imageLayer);
> + if (data->mImageClip.mHaveClipRect) {
> + nsPresContext* presContext = mContainerFrame->PresContext();
> + nscoord appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
> + nsIntRect clip =
> data->mImageClip.mClipRect.ToNearestPixels(appUnitsPerDevPixel);
> + imageLayer->IntersectClipRect(
> + data->mImageClip.mClipRect.ToNearestPixels(appUnitsPerDevPixel));
> + }
> layer = imageLayer;
>
> Assert no rounded rects in the clip here?
OK.
| Assignee | ||
Comment 13•15 years ago
|
||
Attachment #519525 -
Attachment is obsolete: true
Attachment #519525 -
Flags: review?(tnikkel)
Attachment #519544 -
Flags: review?(tnikkel)
Updated•15 years ago
|
Attachment #519544 -
Flags: review?(tnikkel) → review+
Comment 14•15 years ago
|
||
Comment on attachment 519524 [details] [diff] [review]
Fix MarkLeafLayersCoveredByOpaque
>From: Robert O'Callahan <robert@ocallahan.org>
>Bug 641770. Ensure that the cliprect for a layer is interpreted in the coordinate system of its container in MarkLeafLayersCoveredByOpaque. r=bas
>
>diff --git a/gfx/layers/basic/BasicLayers.cpp b/gfx/layers/basic/BasicLayers.cpp
>--- a/gfx/layers/basic/BasicLayers.cpp
>+++ b/gfx/layers/basic/BasicLayers.cpp
>@@ -1237,42 +1237,49 @@ TransformIntRect(nsIntRect& aRect, const
> gfxRect gr = gfxRect(aRect.x, aRect.y, aRect.width, aRect.height);
> gr = aMatrix.TransformBounds(gr);
> aRect = (*aRoundMethod)(gr);
> }
>
> // This implementation assumes that GetEffectiveTransform transforms
> // all layers to the same coordinate system. It can't be used as is
> // by accelerated layers because of intermediate surfaces.
>+// aClipRect and aRegoin are in that global coordinate system.
typo nit: aRegion
Attachment #519524 -
Flags: review?(bas.schouten) → review+
Updated•15 years ago
|
Whiteboard: [needs landing]
Updated•15 years ago
|
Whiteboard: [needs landing] → [needs landing][not-ready-for-cedar]
| Assignee | ||
Comment 15•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/2622ae93dfe8
http://hg.mozilla.org/mozilla-central/rev/c96c353c9d5e
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing][not-ready-for-cedar]
Comment 16•15 years ago
|
||
Verified with Mozilla/5.0 (Windows NT 6.1; rv:2.2a1pre) Gecko/20110404 Firefox/4.2a1pre
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•