<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -54,6 +54,7 @@ static NSString *sAutoLoadInvisibleFlashViewsKey = @&quot;autoLoadInvisibleViews&quot;;
 static NSString *sPluginEnabled = @&quot;pluginEnabled&quot;;
 static NSString *sApplicationWhitelist = @&quot;applicationWhitelist&quot;;
 static NSString *sDrawGearImageOnlyOnMouseOverHiddenPref = @&quot;drawGearImageOnlyOnMouseOver&quot;;
+static NSString *sDisableVideoElement = @&quot;disableVideoElement&quot;;
 
 	// Info.plist key for app developers
 static NSString *sCTFOptOutKey = @&quot;ClickToFlashOptOut&quot;;
@@ -1300,6 +1301,9 @@ didReceiveResponse:(NSHTTPURLResponse *)response
 
 - (BOOL)_isVideoElementAvailable
 {
+	if ( [[CTFUserDefaultsController standardUserDefaults] boolForKey:sDisableVideoElement] )
+		return NO;
+	
 	/* &lt;video&gt; element compatibility was added to WebKit in or shortly before version 525. */
 	
     NSBundle* webKitBundle;
@@ -1319,12 +1323,30 @@ didReceiveResponse:(NSHTTPURLResponse *)response
 			normalizedVersion = wkVersion;
 		
 		// unfortunately, versions of WebKit above 531.5 also introduce a nasty
-		// scrolling bug with video elements that cause them to be unviewable, so we'll
-		// have to basically disable this support until this bug is fixed;
+		// scrolling bug with video elements that cause them to be unviewable;
+		// this bug was fixed shortly after being reported by @simX, so we can
+		// now re-enable it for correct WebKit versions
+		//
+		// this bug actually only affected certain machines that had graphics
+		// cards with a certain max texture size, and it was partially fixed, but
+		// still didn't work for MacBooks with embedded graphics, and we could
+		// detect that if we really wanted, but that would require importing
+		// the OpenGL framework, which we probably shouldn't do, so we'll just
+		// wholesale disable for certain WebKit versions
 		//
 		// https://bugs.webkit.org/show_bug.cgi?id=28705
 		
-        return ((normalizedVersion &gt;= 525) &amp;&amp; (normalizedVersion &lt; 531.5));
+		if (floor(NSAppKitVersionNumber) &gt; NSAppKitVersionNumber10_5) {
+			// Snowy Leopard; this bug doesn't seem to be exhibited here
+			return (normalizedVersion &gt;= 525);
+		} else {
+			// this bug was introduced in version 531.5, but has been fixed in
+			// 532 and above
+			
+			return ((normalizedVersion &gt;= 532) ||
+					((normalizedVersion &gt;= 525) &amp;&amp; (normalizedVersion &lt; 531.5))
+					);
+		}
 	}
 	return NO;
 }
@@ -1347,7 +1369,15 @@ didReceiveResponse:(NSHTTPURLResponse *)response
 
 - (void) _convertElementForMP4: (DOMElement*) element
 {
-    [ element setAttribute: @&quot;src&quot; value: [ self _h264VersionUrl ]];
+	// some tags (OBJECT) want a data attribute, and some want a src attribute
+	// for some reason, though, some cloned elements are not reporting themselves
+	// as OBJECT tags, even though they are; more investigation on this is needed,
+	// but for now, setting both the data and the src attribute corrects the problem
+	// (see bug #294)
+	
+	[ element setAttribute: @&quot;data&quot; value: [ self _h264VersionUrl ]];
+	[ element setAttribute: @&quot;src&quot; value: [ self _h264VersionUrl ]];
+	
     [ element setAttribute: @&quot;type&quot; value: @&quot;video/mp4&quot; ];
     [ element setAttribute: @&quot;scale&quot; value: @&quot;aspect&quot; ];
     if (_youTubeAutoPlay) {</diff>
      <filename>Plugin/Plugin.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c9e2bfac1492618c4a92da298af4a4d051ef927f</id>
    </parent>
  </parents>
  <author>
    <name>Simone Manganelli</name>
    <email>simX@mac.com</email>
  </author>
  <url>http://github.com/rentzsch/clicktoflash/commit/1f9d11d007165bd70abd96d1ff2223c0db183345</url>
  <id>1f9d11d007165bd70abd96d1ff2223c0db183345</id>
  <committed-date>2009-10-01T16:38:52-07:00</committed-date>
  <authored-date>2009-09-17T17:03:46-07:00</authored-date>
  <message>H.264 loading of embedded videos now works again; re-enabled video tag support for the correct WebKit versions now that it's fixed in nightlies again; added a preference key to disable video tag support entirely for testing purposes and in case the WebKit version number isn't granular enough
(cherry picked from commit 125ec1aeb84a938a346f9c439d5d3534ada03cb2)</message>
  <tree>9bf14cf4c02f56cadbbc3f20caf5c46dedd9aedb</tree>
  <committer>
    <name>Simone Manganelli</name>
    <email>simX@mac.com</email>
  </committer>
</commit>
