Closed
Bug 195883
Opened 22 years ago
Closed 22 years ago
Remove %-based opacity values
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: markushuebner, Assigned: roc)
References
(Blocks 1 open bug, )
Details
(Keywords: perf, testcase)
Attachments
(2 files)
(deleted),
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
text/html
|
Details |
The second testcase at
http://www.world-direct.com/mozilla-opacity-crash-testcase/
illustrates the performance problem when fading an element Mozilla flickers
and is extremely slow.
Using trunk build 2003022709 on winxp pro sp1, 1.1ghz, 512ram
Comment 1•22 years ago
|
||
Win98, build 2003022814, I see the performance problem, but wouldn't describe it
as flickering. The fading occurs in noticeable steps, but I think this is correct.
Reporter | ||
Comment 2•22 years ago
|
||
Well, the performance is so bad that "flickering" would be too fast to say :)
But seriously, don't know why Mozilla is that slow when fading through the
individual steps of opacity.
Maybe a profile would help here.
Comment 4•22 years ago
|
||
The testcase uses percentage opacity instead of number opacity. As I've
repeatedly stated, percentage opacity is slower (due to it reframing every
single time, unlike number opacity, which only reframes when changing to/from
1). I've also repeatedly stated that there are no plans to fix that, since
percentage opacity should be removed rather than improved.
So I'm very tempted to just mark this bug "stop wasting people's time, dammit".
Not doing that for now in the feeble hope that Matic will fix the testcase to
properly set opacity and there will still be a problem to fix.
Comment 5•22 years ago
|
||
I changed the code to use number opacity. The testcase has been updated.
This seems to work fine, although it sometimes still shows a short flicker.
Nonetheless it will crash in 1.3 builds.
I would recommend to remove the percentage capability if it works so bad and
can't be fixed as its presence draws people to just use it; one would normally
await it to work correctly just like the other method.
Comment 6•22 years ago
|
||
Correction: the fader will not crash!
Comment 7•22 years ago
|
||
Sorry, i'm agreeing with Boris here. Lets stop duplicating bugs where we all
know that someone works on it. You want this bug tio be fixed? Then help Robert
with bug 193849. It's about opacity performance.
To Comment #5. Percent opacity is not bugged right now (it was bugged long time
ago - bug 144832 ), it's only slower. I'd leave this as it is.
Suggesting DUPLICATE of bug 193849.
Reporter | ||
Comment 8•22 years ago
|
||
I can go with that decission - marking dupe.
*** This bug has been marked as a duplicate of 193849 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 9•22 years ago
|
||
I think we should remove percentage opacity. It's just hurting us, it's not
according to spec, and the sooner we remove it, the better. I'm reopening this
bug to do just that.
http://www.w3.org/TR/2002/WD-css3-color-20020418/#transparency
Clearly a %-value is not valid according to CSS3.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: Fading with moz-opacity flickers and is very slow → Remove %-based opacity values
Assignee | ||
Comment 10•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #116270 -
Flags: superreview?(bzbarsky)
Attachment #116270 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 11•22 years ago
|
||
Comment 12•22 years ago
|
||
Comment on attachment 116270 [details] [diff] [review]
disable %-values for '-moz-opacity'
Thank you.
Attachment #116270 -
Flags: superreview?(bzbarsky)
Attachment #116270 -
Flags: superreview+
Attachment #116270 -
Flags: review?(bzbarsky)
Attachment #116270 -
Flags: review+
Comment 13•22 years ago
|
||
Comment on attachment 116270 [details] [diff] [review]
disable %-values for '-moz-opacity'
Please wait for David to comment before checking in, though -- I seem to recall
him having a definite opinion on this issue, but not what the opinion was.....
Comment 14•22 years ago
|
||
Sounds good to me.
Assignee | ||
Comment 15•22 years ago
|
||
Fix checked in.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 16•22 years ago
|
||
I have the following codes to do splash screen and watermark. Everyone is
excited . I do use percentage to fade the screen. It's perfect for IE5.5+. I
notice the Mozilla/Netscape is sluggish--I don't realy mind, as long as it can
present. From code wise, I prefer to use % -- it's much easy, intuitive. IE has
a lot of visual effect, now Mozilla is catching up. You got to provide the
solution and easy to use, not W3 only. Web Designer like IE, because IE has the
solution. So, please keep % option.
By the way the watermark works for IE, but not Mozilla/Netscape.
<html>
<head>
<title>Untitled</title>
</head>
<body>
<STYLE type="text/css">
body {margin:0px;background-color:transparent;}
#splashBg { position: absolute; background:black; z-index:5; width:100%;
height:100%;}
#splash { position: absolute; z-index:6; width:100%;
height:100%;background-image:url(images/lib/shakespeare.jpg);background-position:center;background-repeat:no-repeat;}
</STYLE>
<DIV ID="splashBg"> </DIV>
<DIV ID="splash"> <A HREF=# onClick="watermark();"
style="color:white">Skip</A></DIV>
<SCRIPT language="JavaScript">
var opacityCount=100;
var fadeCount;
var splashBg = document.getElementById("splashBg");
function fadeOutScreen() {
opacityCount=opacityCount-5;
status=opacityCount;
if (opacityCount>5) {
if (document.all) {
splashBg.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity=."+opacityCount+")";
} else if (document.getElementById) {
splashBg.style.MozOpacity = opacityCount + "%";
}
fadeCount = setTimeout('fadeOutScreen()',25);
} else {
watermark();
}
}
function watermark() {
clearTimeout(fadeCount);
splashBg.style.zIndex="-2";
splashBg.style.visibility="hidden";
var splash = document.getElementById("splash");
splash.style.zIndex="-1";
if (document.all) {
splash.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity=.08)";
} else if (document.getElementById) {
splash.style.MozOpacity = "8%";
}
}
splashBg.style.visibility="visible";
fadeCount = setTimeout('fadeOutScreen()',25);
</SCRIPT>
</body>
</html>
Comment 17•22 years ago
|
||
> From code wise, I prefer to use % -- it's much easy, intuitive.
Really? You DO realize that "0.5" and "50%" typically mean DIFFERENT things in
CSS properties that support both formats? And in particular that they meant
different things for -moz-opacity?
There was nothing easy or intuitive about percentage opacity. It's removed. It
will NOT be reinstated. Trivial changes to your JS (replacing |+ "%"| with |/
100|) will make it work.
You need to log in
before you can comment on or make changes to this bug.
Description
•