On Wed, Jul 22, 2009 at 6:11 PM, Peter Kasting <pkast...@google.com> wrote:

> On Wed, Jul 22, 2009 at 6:05 PM, Albert J. Wong (王重傑) <ajw...@chromium.org
> > wrote:
>
>> The problem currently is that, for certain context menu items on a HTML5
>> media element, I need to keep a reference inside the renderer to the actual
>> HTML5 DOM node so that if an action is selected I can call commands on this
>> DOM node.
>>
>
> Can you keep a weak reference, and if the node is no longer available at
> MENUCOMMAND time, just do nothing?
>

That would work. Does WebKit have weak references?  I don't see anything
that looks obviosuly like one in JavaScriptCore/wtf.

I also got another suggestion that on the action, I should just redo the hit
test to retrieve the media node, which nicely handles cases where the movie
node is getting changed out via javascript from undernearth the context
menu.

-Albert

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to