Opened 17 years ago

Closed 17 years ago

#85 closed Bug (fixed)

Review flash integration with Opera

Reported by: Alfonso Martínez de Lizarrondo Owned by: Hallvord R. M. Steen (Opera Software)
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 (7)

comment:1 Changed 17 years ago by Hallvord R. M. Steen (Opera Software)

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 .

comment:2 Changed 17 years ago by Hallvord R. M. Steen (Opera Software)

..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.

comment:3 in reply to:  1 Changed 17 years ago by Alfonso Martínez de Lizarrondo

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);
	}
}

comment:4 Changed 17 years ago by Hallvord R. M. Steen (Opera Software)

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.

comment:5 Changed 17 years ago by Alfonso Martínez de Lizarrondo

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.

comment:6 Changed 17 years ago by Hallvord R. M. Steen (Opera Software)

Owner: set to Hallvord R. M. Steen (Opera Software)
Status: newassigned

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 :-) .

comment:7 Changed 17 years ago by Hallvord R. M. Steen (Opera Software)

Resolution: fixed
Status: assignedclosed

Works in internal builds

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy