<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>13358</bug_id>
          
          <creation_ts>2007-04-15 23:16:14 -0700</creation_ts>
          <short_desc>REGRESSION: ReferenceError: Can&apos;t find variable in DHTML slideshow script</short_desc>
          <delta_ts>2007-09-06 00:00:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Evangelism</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac (PowerPC)</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14049</blocked>
    
    <blocked>15147</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Charles Gaudette">charles</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ddkilzer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>14688</commentid>
    <comment_count>0</comment_count>
    <who name="Charles Gaudette">charles</who>
    <bug_when>2007-04-15 23:16:14 -0700</bug_when>
    <thetext>Slideshow works in Safari 419.3 but not in WebKit r20898.

This slideshow script is also used &quot;in the wild&quot; here: http://www.grandinfo.com/ where a client using (an older?) Safari brought this script to my attention.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14682</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-04-16 03:03:18 -0700</bug_when>
    <thetext>Confirmed viewing http://www.grandinfo.com/ with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135) with a local debug build of WebKit r20896.  JavaScript console reports this error, and the picture slideshow in the upper right-hand corner of the screen does not run:

ReferenceError: Can&apos;t find variable: obj
http://www.grandinfo.com/    Line: 294

The slideshow works as expected (with no JavaScript console error) in shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14683</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-04-16 03:16:22 -0700</bug_when>
    <thetext>Loading the page with Drosera, the error is happening in this function (line 168 in the original document):

fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&amp;&amp;crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity==&quot;number&quot;) //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter=&quot;alpha(opacity=&quot;+this.degree+&quot;)&quot;
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100  // ERROR: Line 168
}

This looks like it may be a typo.  Should &quot;obj.degree&quot; be &quot;this.degree&quot; instead, or perhaps &quot;crossobj.degree&quot;?  (But why does shipping Safari not throw an exception here?  Perhaps it&apos;s not as strict as ToT WebKit is.)

And should WebKit still define crossobj.style.KhtmlOpacity?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14666</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-04-16 03:37:32 -0700</bug_when>
    <thetext>Confirmed that changing this line:

crossobj.style.KhtmlOpacity=obj.degree/100

To this line &quot;fixes&quot; the slideshow:

crossobj.style.KhtmlOpacity=this.degree/100

However, only every *other* image is faded in when doing this on Safari/WebKit, while Firefox 2.0.0.3 will fade in every picture.  This is probably a different bug in Dynamic Drive, though.  (Note that Safari/WebKit don&apos;t honor -khtml-opacity anymore, just &quot;opacity&quot;.)

Lowering from P1 to P2 since this is a server-side evangelism issue, not a client issue.

Charles, please feel free to close this bug when you have fixed the issue in your code.  Thanks!

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14572</commentid>
    <comment_count>4</comment_count>
    <who name="Charles Gaudette">charles</who>
    <bug_when>2007-04-16 09:11:21 -0700</bug_when>
    <thetext>(In reply to comment #3)
[...]
&gt; Lowering from P1 to P2 since this is a server-side evangelism issue, not a
&gt; client issue.
&gt; 
&gt; Charles, please feel free to close this bug when you have fixed the issue in
&gt; your code.  Thanks!
&gt; 

FYI: This is not my code and neither sites are my sites.

Thanks for looking at it.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14518</commentid>
    <comment_count>5</comment_count>
    <who name="Charles Gaudette">charles</who>
    <bug_when>2007-04-16 11:30:04 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Confirmed that changing this line:
&gt; 
&gt; crossobj.style.KhtmlOpacity=obj.degree/100
&gt; 
&gt; To this line &quot;fixes&quot; the slideshow:
&gt; 
&gt; crossobj.style.KhtmlOpacity=this.degree/100
&gt; 
&gt; However, only every *other* image is faded in when doing this on Safari/WebKit,
&gt; while Firefox 2.0.0.3 will fade in every picture.  This is probably a different
&gt; bug in Dynamic Drive, though.  (Note that Safari/WebKit don&apos;t honor
&gt; -khtml-opacity anymore, just &quot;opacity&quot;.)
[...]

Sent something to this effect to Dynamic Drive&apos;s (only?) E-mail address ddrivehelp@gmail.com, as I don&apos;t feel compelled to become a registered member of their forums.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14527</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-04-16 12:11:22 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Sent something to this effect to Dynamic Drive&apos;s (only?) E-mail address
&gt; ddrivehelp@gmail.com, as I don&apos;t feel compelled to become a registered member
&gt; of their forums.

Thanks Charles!  I hope you referenced this bug as well.  It will help explain the issue.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14529</commentid>
    <comment_count>7</comment_count>
    <who name="Charles Gaudette">charles</who>
    <bug_when>2007-04-16 12:39:16 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Sent something to this effect to Dynamic Drive&apos;s (only?) E-mail address
&gt; &gt; ddrivehelp@gmail.com, as I don&apos;t feel compelled to become a registered member
&gt; &gt; of their forums.
&gt; 
&gt; Thanks Charles!  I hope you referenced this bug as well.  It will help explain
&gt; the issue.

Well they know now. ;)

(While I&apos;m posting this, I&apos;ll state the obvious for this bug log. The script works in IE7 for Win.)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10385</commentid>
    <comment_count>8</comment_count>
    <who name="Charles Gaudette">charles</who>
    <bug_when>2007-05-10 15:14:55 -0700</bug_when>
    <thetext>At this time there has been no response to my messages with DynamicDrive.com. The code offered up freely there remains unchanged — 06 Dec 2005, v1.5.

I pointed gradinfo.com&apos;s webmaster to this discussion. A fix to the JavaScript has been implemented there, and I have verified that it works in r21377; also communicating that back to him. I&apos;m not sure if it is skipping images as described by David Kilzer.


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10146</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-05-12 22:45:46 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; I pointed gradinfo.com&apos;s webmaster to this discussion. A fix to the JavaScript
&gt; has been implemented there, and I have verified that it works in r21377; also
&gt; communicating that back to him. I&apos;m not sure if it is skipping images as
&gt; described by David Kilzer.

The slideshow does display now.  Images aren&apos;t skipped--the transition just alternates between a fade and a &quot;quick switch&quot; on each photo in ToT WebKit.  (On Firefox, the transition is a fade for every photo.)

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8051</commentid>
    <comment_count>10</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-09 15:19:16 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; At this time there has been no response to my messages with DynamicDrive.com.
&gt; The code offered up freely there remains unchanged — 06 Dec 2005, v1.5.

A user named jscheuer1 has posted &quot;corrected&quot; versions of the &quot;Ultimate Fade-in Slideshow&quot; script a number of times:

On the Bug Reports forum:
http://www.dynamicdrive.com/forums/showthread.php?t=20221&amp;highlight=safari+fade-in

On the Scripts help forum:
http://www.dynamicdrive.com/forums/showthread.php?t=20192&amp;highlight=safari+fade-in

These scripts contain the fix described in Comment #3 as well as other improvements.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3683</commentid>
    <comment_count>11</comment_count>
    <who name="Charles Gaudette">charles</who>
    <bug_when>2007-07-26 07:42:53 -0700</bug_when>
    <thetext>DynamicDrive.com has updated their script &quot;Ultimate Fade-in slideshow&quot; to version 1.51, dated 24 July 2007. And made notes on the page that it now supports Safari 3.

My own tests on the published code shows that Tiger&apos;s (Safari 3.0.2-based) WebKit and WebKit r24615 display the slideshow. Both &quot;shipping&quot; and r24615 present all five elements in my test arrays.

The transition effect is complete, and subjectively smoother than what I see in Mac FireFox 2.0.0.5.

I also ran my tests in OmniWeb 5.6 sneaky peek 4 with good results.

Further, Win Safari with r24453 displays — and correctly transitions — the slideshow samples at the report URL.

The only remaining thing to do is to advise grandinfo.com&apos;s webmaster about the much better script. I&apos;ll E-mail that in a moment.

I&apos;m marking this bug as FIXED.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3679</commentid>
    <comment_count>12</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-26 09:21:30 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; I&apos;m marking this bug as FIXED.

Great!  Thanks for the update, Charles!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>