Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Issue 165344: Add an UpdateContext call to WebPluginDelegateImpl on the Mac. (Closed)

Created:
11 years, 4 months ago by stuartmorgan
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add an UpdateContext call to WebPluginDelegateImpl on the Mac. On the Mac, Flash appears to cache the CGContextRef provided in NPP_SetWindow until the next NPP_SetWindow call, so we need to call it sometime before the next plugin paint. This allows us to call NPP_SetWindow before telling the plugin to paint, but not from the Paint function itself (where it could have bad side-effects). BUG=18894, 18980 TEST=Switch to HQ on a YouTube video; Flash should not crash. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23322

Patch Set 1 #

Patch Set 2 : Add missing message handler #

Patch Set 3 : Now IPC-free #

Total comments: 6

Patch Set 4 : Stripped down to Mac-only #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -16 lines) Patch
M chrome/plugin/webplugin_proxy.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl_mac.mm View 1 2 3 6 chunks +20 lines, -16 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
stuartmorgan
I've only implemented this on the Mac side, since it would be painful for me ...
11 years, 4 months ago (2009-08-11 23:38:50 UTC) #1
jam
I don't understand why there's any IPC here. PluginMsg_UpdateContext is not even handled anywhere.
11 years, 4 months ago (2009-08-12 00:38:47 UTC) #2
dglazkov
Since we're not handling PluginMsg_UpdateContext, the next effect of this change is removing of windowless_needs_set_window_ ...
11 years, 4 months ago (2009-08-12 15:36:03 UTC) #3
dglazkov
A quick update. My fix didn't introduce the regression. The problem, described in http://crbug.com/18932 is ...
11 years, 4 months ago (2009-08-12 17:14:02 UTC) #4
stuartmorgan
On 2009/08/12 15:36:03, Dimitri Glazkov wrote: > Since we're not handling PluginMsg_UpdateContext, the next effect ...
11 years, 4 months ago (2009-08-12 17:43:28 UTC) #5
stuartmorgan
From discussion with Amanda, the options seem to be: 1) Have a bunch of unnecessary-but-functional ...
11 years, 4 months ago (2009-08-12 20:22:36 UTC) #6
Amanda Walker
I vote for #3. On Wed, Aug 12, 2009 at 4:22 PM, <stuartmorgan@chromium.org> wrote: > ...
11 years, 4 months ago (2009-08-12 20:25:41 UTC) #7
jam
looks like our emails crossed :) yes I prefer that as well, however I'd like ...
11 years, 4 months ago (2009-08-12 20:27:57 UTC) #8
stuartmorgan
New version up, using a cast. Now 100% useless-IPC-code free.
11 years, 4 months ago (2009-08-12 21:12:01 UTC) #9
Amanda Walker
Since we were not previously setting cg_context_.context to NULL, that may have been the cause ...
11 years, 4 months ago (2009-08-12 21:26:24 UTC) #10
stuartmorgan
> Since we were not previously setting cg_context_.context to NULL, that > may have been ...
11 years, 4 months ago (2009-08-12 22:33:13 UTC) #11
jam
http://codereview.chromium.org/165344/diff/1031/1032 File chrome/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/165344/diff/1031/1032#newcode514 Line 514: WindowlessContext()); On 2009/08/12 22:33:14, stuartmorgan wrote: > On ...
11 years, 4 months ago (2009-08-12 23:03:38 UTC) #12
jam
On Wed, Aug 12, 2009 at 3:33 PM, <stuartmorgan@chromium.org> wrote: > Since we were not ...
11 years, 4 months ago (2009-08-12 23:05:58 UTC) #13
stuartmorgan
http://codereview.chromium.org/165344/diff/1031/1032 File chrome/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/165344/diff/1031/1032#newcode514 Line 514: WindowlessContext()); On 2009/08/12 23:03:39, John Abd-El-Malek wrote: > ...
11 years, 4 months ago (2009-08-12 23:48:20 UTC) #14
jam
On Wed, Aug 12, 2009 at 4:24 PM, Stuart Morgan <stuartmorgan@chromium.org>wrote: > On Wed, Aug ...
11 years, 4 months ago (2009-08-13 02:35:38 UTC) #15
Amanda Walker
On Wed, Aug 12, 2009 at 10:35 PM, John Abd-El-Malek<jam@chromium.org> wrote: > Also, the version ...
11 years, 4 months ago (2009-08-13 16:40:30 UTC) #16
darin (slow to review)
Shouldn't we have a test case for this? We have several good frameworks for testing ...
11 years, 4 months ago (2009-08-13 22:12:10 UTC) #17
stuartmorgan
On 2009/08/13 22:12:10, darin wrote: > Shouldn't we have a test case for this? We ...
11 years, 4 months ago (2009-08-13 22:35:06 UTC) #18
Amanda Walker
We do have, for example, layout tests that exercise flash (and other plugins). Doing it ...
11 years, 4 months ago (2009-08-13 22:47:28 UTC) #19
darin (slow to review)
The PluginTests framework allows you to exercise a SWF file. -Darin On Thu, Aug 13, ...
11 years, 4 months ago (2009-08-13 23:58:47 UTC) #20
darin (slow to review)
Sorry... that didn't really answer your question. I meant to add: I don't think we ...
11 years, 4 months ago (2009-08-13 23:59:47 UTC) #21
Amanda Walker
You're right--there are tests that check regressions on behavior, but they use the test plugin ...
11 years, 4 months ago (2009-08-14 00:06:27 UTC) #22
darin (slow to review)
11 years, 4 months ago (2009-08-14 00:09:44 UTC) #23
Right!  Also, PluginTests (the one that runs on a couple of the bots) is
defined here: chrome/test/plugin/plugin_tests.cpp

On Thu, Aug 13, 2009 at 5:06 PM, Amanda Walker <amanda@chromium.org> wrote:

> You're right--there are tests that check regressions on behavior, but
> they use the test plugin to do it.  I was thinking of the set of links
> that come up when you launch test_shell as an application, but those
> aren't actual tests.
>
> --Amanda
>
> On Thu, Aug 13, 2009 at 7:59 PM, Darin Fisher<darin@chromium.org> wrote:
> > Sorry... that didn't really answer your question.  I meant to add:  I
> don't
> > think we have any layout tests that use Flash.
> > -Darin
> >
> > On Thu, Aug 13, 2009 at 4:58 PM, Darin Fisher <darin@chromium.org>
> wrote:
> >>
> >> The PluginTests framework allows you to exercise a SWF file.
> >> -Darin
> >>
> >> On Thu, Aug 13, 2009 at 3:47 PM, Amanda Walker <amanda@chromium.org>
> >> wrote:
> >>>
> >>> We do have, for example, layout tests that exercise flash (and other
> >>> plugins).  Doing it as a unit test is an interesting question, but we
> >>> should be able to write one that exercises this specific failure case
> >>> without a lot of difficulty.
> >>>
> >>> --Amanda
> >>>
> >>> On Thu, Aug 13, 2009 at 6:35 PM, <stuartmorgan@chromium.org> wrote:
> >>> > On 2009/08/13 22:12:10, darin wrote:
> >>> >>
> >>> >> Shouldn't we have a test case for this?  We have several good
> >>> >
> >>> > frameworks for
> >>> >>
> >>> >> testing plugin nasties.  For example, we have a test plugin that
> >>> >
> >>> > allows you to
> >>> >>
> >>> >> synthesize problem scenarios.  There are also ways to exercise
> >>> >
> >>> > specialized Flash
> >>> >>
> >>> >> content.
> >>> >
> >>> > I didn't realize we had test environments for Flash (the problem
> >>> > requires specific behavior on the plugin's part, so the test plugin
> >>> > wouldn't trigger it); I'll definitely follow up with a test case.
> >>> >
> >>> > http://codereview.chromium.org/165344
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> "Portability is generally the result of advance planning rather than
> >>> trench
> >>> warfare involving #ifdef" -- Henry Spencer (1992)
> >>
> >
> >
>
>
>
> --
> "Portability is generally the result of advance planning rather than trench
> warfare involving #ifdef" -- Henry Spencer (1992)
>

Powered by Google App Engine
This is Rietveld 408576698