Show
Ignore:
Timestamp:
08/08/08 14:23:27 (5 months ago)
Author:
mbensi
Message:

merge with webkit revision 35637

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/WebCore/html/HTMLAppletElement.cpp

    r243 r433  
    3131#include "RenderInline.h" 
    3232#include "Settings.h" 
    33  
    34 #if USE(JAVASCRIPTCORE_BINDINGS) 
    35 #include "runtime.h" 
    36 #endif 
     33#include "ScriptController.h" 
    3734 
    3835namespace WebCore { 
     
    4744HTMLAppletElement::~HTMLAppletElement() 
    4845{ 
    49 #if USE(JAVASCRIPTCORE_BINDINGS) 
    50     // m_instance should have been cleaned up in detach(). 
    51     ASSERT(!m_instance); 
    52 #endif 
    5346} 
    5447 
     
    144137 
    145138#if USE(JAVASCRIPTCORE_BINDINGS) 
    146 KJS::Bindings::Instance* HTMLAppletElement::getInstance() const 
     139RenderWidget* HTMLAppletElement::renderWidgetForJSBindings() const 
    147140{ 
    148141    Settings* settings = document()->settings(); 
     
    150143        return 0; 
    151144 
    152     if (m_instance) 
    153         return m_instance.get(); 
    154      
    155     if (RenderApplet* r = static_cast<RenderApplet*>(renderer())) { 
    156         r->createWidgetIfNecessary(); 
    157         if (r->widget() && document()->frame()) 
    158             m_instance = document()->frame()->createScriptInstanceForWidget(r->widget()); 
    159     } 
    160     return m_instance.get(); 
     145    RenderApplet* applet = static_cast<RenderApplet*>(renderer()); 
     146    if (applet) 
     147        applet->createWidgetIfNecessary(); 
     148 
     149    return applet; 
    161150} 
    162151#endif 
     
    170159} 
    171160 
    172 void HTMLAppletElement::detach() 
    173 { 
    174 #if USE(JAVASCRIPTCORE_BINDINGS) 
    175     m_instance = 0; 
    176 #endif 
    177     HTMLPlugInElement::detach(); 
    178 } 
    179  
    180161String HTMLAppletElement::alt() const 
    181162{