Open
Bug 683707
Opened 13 years ago
Updated 2 years ago
-moz-transform: scaleX/Y(-1) distorts image
Categories
(Core :: Layout, defect)
Tracking
()
NEW
People
(Reporter: shorlander, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 1 obsolete file)
We use -moz-transform: scaleX(-1) to flip images to avoid duplication and for RTL mode. In some cases it distorts the image making it blurry/indistinct. For example the the tab-overflow arrows (bug 580194)
Comment 1•13 years ago
|
||
Maybe this is related to some of the pixel-snapping we do being disabled when there's a transform? If so, should we distinguish between some types of transforms that should disable pixel snapping and some that shouldn't? That said, doing so would likely make animations of transforms look bad in a bunch of cases.
gfxMatrix::HasNonTranslationOrFlip needs to be extended to support xx==-1.0. Cab someone roll a patch for that? My tree's not in a good state.
If that doesn't fix it, we probably have some places that check gfxMatrix::HasNonIntegerTranslation that should be checking gfxMatrix::HasNonTranslationOrFlip.
Comment 3•13 years ago
|
||
Not sure if this actually fixes the problem, is there a test case to check?
Attachment #557394 -
Flags: review?(roc)
Comment on attachment 557394 [details] [diff] [review]
Detect X flips in HasNonTranslationOrFlip
Review of attachment 557394 [details] [diff] [review]:
-----------------------------------------------------------------
I don't know if this will fix the bug, but we should definitely do this.
It might possibly fix the bug by changing this path:
http://mxr.mozilla.org/mozilla-central/source/layout/base/FrameLayerBuilder.cpp#1703
Attachment #557394 -
Flags: review?(roc) → review+
Reporter | ||
Comment 5•13 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #3)
> Created attachment 557394 [details] [diff] [review]
> Detect X flips in HasNonTranslationOrFlip
>
> Not sure if this actually fixes the problem, is there a test case to check?
Doesn't appear to fix the issue.
Comment 6•13 years ago
|
||
Can you reproduce this in a standalone html testcase?
It'd be great to be able to test this locally.
Reporter | ||
Comment 7•13 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #6)
> Can you reproduce this in a standalone html testcase?
>
> It'd be great to be able to test this locally.
Yes, let me try and reproduce in HTML.
Reporter | ||
Comment 8•13 years ago
|
||
(In reply to Stephen Horlander from comment #7)
> (In reply to Matt Woodrow (:mattwoodrow) from comment #6)
> > Can you reproduce this in a standalone html testcase?
> >
> > It'd be great to be able to test this locally.
>
> Yes, let me try and reproduce in HTML.
So I managed to reproduce it here: http://people.mozilla.com/~shorlander/scale-test/scalex-test.html
Something I noticed is that if I set a width/height on the container then it doesn't blur the image. This works no matter what dimensions I set.
Comment 9•13 years ago
|
||
(In reply to Stephen Horlander from comment #8)
> Something I noticed is that if I set a width/height on the container then it
> doesn't blur the image. This works no matter what dimensions I set.
Even if you set fractional pixel widths (try 50.1px, 50.2px, etc...)?
Reporter | ||
Comment 10•13 years ago
|
||
(In reply to David Baron [:dbaron] from comment #9)
> (In reply to Stephen Horlander from comment #8)
> > Something I noticed is that if I set a width/height on the container then it
> > doesn't blur the image. This works no matter what dimensions I set.
>
> Even if you set fractional pixel widths (try 50.1px, 50.2px, etc...)?
Ah, yes setting fractional widths makes it fuzzy.
Comment 11•13 years ago
|
||
I was able to work around this issue by adding:
-moz-transform: scale(-1, 1);
image-rendering: -moz-crisp-edges;
See: https://developer.mozilla.org/en/CSS/image-rendering
Comment 12•11 years ago
|
||
So the testcase works for me on both OS X and Windows, but the tab bar overflow arrows are blurry and wrong again on Windows (see bug 996568).
Matt, is there any chance you'll have time to look into what's going on here soon?
Flags: needinfo?(matt.woodrow)
Keywords: testcase
Comment 13•11 years ago
|
||
Whoops, didn't mean to set this after all, seeing as the testcase is fixed but I'm still seeing a 'real' issue...
Keywords: testcase
Comment 14•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #12)
> So the testcase works for me on both OS X and Windows ...
The testcase in comment 8 was fixed in this range...
Last good revision: f7c89de3ab43 (2012-09-16)
First bad revision: 3f0587ce1774 (2012-09-17)
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f7c89de3ab43&tochange=3f0587ce1774
... but it broke scaleY in the process, see attachment.
Updated•11 years ago
|
Flags: firefox-backlog?
Updated•11 years ago
|
Flags: firefox-backlog? → firefox-backlog-
Updated•10 years ago
|
Flags: needinfo?(matt.woodrow)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•