Ticket #85 (closed Bug: fixed)

Opened 19 months ago

Last modified 15 months ago

Review flash integration with Opera

Reported by: alfonsoml Owned by: hallvord@…
Priority: Normal Milestone: Opera Compatibility
Component: General Version:
Keywords: Cc:

Description

While I was fixing BUG-1245504 I've noticed that Opera does seems to have some weird behavior with the embeds: it didn't provide the .src attribute so that check failed (fixed), and the loop attribute gets set to 0. We should check what is broken and file some bug reports with them if we can't workaround them.

Change History

follow-up: ↓ 3   Changed 17 months ago by hallvord@…

could you use setAttribute('src') instead? Also for type. I have filed an Opera bug, 260413, on not providing the .src property but I believe you can work around this simply by using setAttribute and that it is more correct that way - at least while you pretend to generate XHTML 1 where EMBED doesn't exist and embed.src thus is non-standard, .getAttribute is a little bit more standard-looking :-p .

  Changed 17 months ago by hallvord@…

..I modified the UpdatePreview function to use setAttribute and the preview works, but the submitted code has no src attribute. I guess there is another script reading .src that needs to use .getAttribute instead.

in reply to: ↑ 1   Changed 17 months ago by alfonsoml

Replying to hallvord@opera.com:

could you use setAttribute('src') instead? Also for type. I have filed an Opera bug, 260413, on not providing the .src property but I believe you can work around this simply by using setAttribute and that it is more correct that way - at least while you pretend to generate XHTML 1 where EMBED doesn't exist and embed.src thus is non-standard, .getAttribute is a little bit more standard-looking :-p .

Hello. As I stated in the Description, the initial problem with .src was present while the code tried to replace the provided embeds in the html with the fake images. I fixed that problem and now it also checks the type attribute so that part works.

There's anyway a need to review all the process of loading and saving content with flash, and then also being able to insert and edit them.

I've tested now the insert flash, but I didn't manage to make the preview work

function UpdatePreview()
{
	if ( !ePreview )
		return ;

	while ( ePreview.firstChild )
		ePreview.removeChild( ePreview.firstChild ) ;

	if ( GetE('txtUrl').value.length == 0 )
		ePreview.innerHTML = ' ' ;
	else
	{
		var oDoc	= ePreview.ownerDocument || ePreview.document ;
		var e		= oDoc.createElement( 'EMBED' ) ;

		SetAttribute( e, 'src', GetE('txtUrl').value ) ;
		SetAttribute( e, 'type', 'application/x-shockwave-flash' ) ;
		SetAttribute( e, 'width', '100%' ) ;
		SetAttribute( e, 'height', '100%' ) ;

		SetAttribute( e, 'play', 'true' ) ;

		ePreview.appendChild( e ) ;
		alert(ePreview.innerHTML);
	}
}

  Changed 17 months ago by hallvord@…

Hi, I noticed a problem with EMBED content created with document.createElement not appearing in 9.20 (but I wasn't entirely sure if it was simply my Flash plugin being broken). It works for me in 9.50 previews so don't worry about it.

  Changed 17 months ago by alfonsoml

I've commited [249] to fix the places where the code tried to access directly the properties of the embed instead of calling getAttribute or setAttribute and now it mostly works.

The preview doesn't work, but according to Hallvord it's fixed in 9.5. The bug filed in Opera 260413 isn't really important now, everything works using getAttribute.

In [250] I've attached a testcase: Opera parses the loop as an integer so either "true" or "false" gets converted to "0". If that bug is fixed then everything related to the flash integration will work properly.

Regards.

  Changed 17 months ago by hallvord@…

  • owner set to hallvord@…
  • status changed from new to assigned

that loop thing must be a workaround for WMP. It's bad if it happens during parsing ?!?

Appears to be fixed also. I'll assign this to self since all the remaining issues seem to be on our side, thanks for the getAttribute work :-) .

  Changed 15 months ago by hallvord@…

  • status changed from assigned to closed
  • resolution set to fixed

Works in internal builds

Note: See TracTickets for help on using tickets.