Bug 93324 - [BlackBerry] HTML5 media does not handle SSL certificate failures
Summary: [BlackBerry] HTML5 media does not handle SSL certificate failures
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Dong
URL:
Keywords:
Depends on: 93588
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-06 19:19 PDT by Jonathan Dong
Modified: 2012-09-21 12:23 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.01 KB, patch)
2012-08-06 19:46 PDT, Jonathan Dong
no flags Details | Formatted Diff | Diff
Patch (2.80 KB, patch)
2012-09-19 20:09 PDT, Jonathan Dong
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Dong 2012-08-06 19:19:28 PDT
RIM PR: 116205

We should pass stream client Id to platform player when loading a media url, which is needed by BlackBerry::Platform::MediaSSLHandlerStream for handling the certificate failure if media url is a https url and has a certificate failure reported by mm-renderer.
Comment 1 Jonathan Dong 2012-08-06 19:46:16 PDT
Created attachment 156840 [details]
Patch
Comment 2 Antonio Gomes 2012-08-06 20:21:53 PDT
Comment on attachment 156840 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=156840&action=review

td;dr

> Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:160
> +    HTMLMediaElement* element = static_cast<HTMLMediaElement*>(m_webCorePlayer->mediaPlayerClient());

that is a layer violation

> Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:166
> +    int playerId = static_cast<FrameLoaderClientBlackBerry*>(topdoc->frame()->loader()->client())->playerId();

that is a BIG layer violation
Comment 3 Joe Mason 2012-08-06 20:55:52 PDT
MediaPlayerPrivateBlackBerry already does both of those in other functions.  Can we clean up all the layering violations in a followup patch?
Comment 4 Eric Seidel (no email) 2012-08-07 14:56:26 PDT
Comment on attachment 156840 [details]
Patch

Per above.
Comment 5 Eric Carlson 2012-08-08 09:15:09 PDT
(In reply to comment #3)
> MediaPlayerPrivateBlackBerry already does both of those in other functions.  Can we clean up all the layering violations in a followup patch?

I r+'d earlier several bugs with layering violations with the agreement that the violations would be cleaned up, eg. https://bugs.webkit.org/show_bug.cgi?id=82930 from mid April. Max filed bug 84291 about one part of the cleanup, but so far it seems that nothing more has been done.
Comment 6 Jonathan Dong 2012-09-19 20:09:28 PDT
Created attachment 164831 [details]
Patch
Comment 7 Eric Carlson 2012-09-20 19:54:58 PDT
Comment on attachment 164831 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164831&action=review

> Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:169
> -        m_platformPlayer->load(modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), cookiePairs.utf8().data());
> +        m_platformPlayer->load(playerID, modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), cookiePairs.utf8().data());
>      else
> -        m_platformPlayer->load(modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), 0);
> +        m_platformPlayer->load(playerID, modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), 0);

Why did this compile if the number of parameters was incorrect?
Comment 8 Jonathan Dong 2012-09-21 01:30:11 PDT
Comment on attachment 164831 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164831&action=review

>> Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:169
>> +        m_platformPlayer->load(playerID, modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), 0);
> 
> Why did this compile if the number of parameters was incorrect?

Because our porting haven't got the buildbot for now :(, and we work on our private webkit repo firstly, then sync with upstream.
This patch intends to pass the playerID into m_platformPlayer in order to create a SSLHandlingStream to perform SSL verification for the media engine.
Comment 9 Joe Mason 2012-09-21 06:24:15 PDT
(In reply to comment #7)
> (From update of attachment 164831 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=164831&action=review
> 
> > Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:169
> > -        m_platformPlayer->load(modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), cookiePairs.utf8().data());
> > +        m_platformPlayer->load(playerID, modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), cookiePairs.utf8().data());
> >      else
> > -        m_platformPlayer->load(modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), 0);
> > +        m_platformPlayer->load(playerID, modifiedUrl.utf8().data(), m_webCorePlayer->userAgent().utf8().data(), 0);
> 
> Why did this compile if the number of parameters was incorrect?

The number of parameters used to be correct. Then we updated the BlackBerry::Platform::PlatformPlayer class in the blackberry "platform" library (an OS service), so now webkit won't compile with the most recent version of the platform lib. This patch updates webkit to compile with the latest version of "platform".
Comment 10 Eric Carlson 2012-09-21 12:18:42 PDT
Comment on attachment 164831 [details]
Patch

rs=me given Joe's informal review.
Comment 11 WebKit Review Bot 2012-09-21 12:23:43 PDT
Comment on attachment 164831 [details]
Patch

Clearing flags on attachment: 164831

Committed r129244: <http://trac.webkit.org/changeset/129244>
Comment 12 WebKit Review Bot 2012-09-21 12:23:47 PDT
All reviewed patches have been landed.  Closing bug.