Changeset 433 for trunk/WebCore/html/HTMLAppletElement.cpp
- Timestamp:
- 08/08/08 14:23:27 (5 months ago)
- Files:
-
- trunk/WebCore/html/HTMLAppletElement.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/WebCore/html/HTMLAppletElement.cpp
r243 r433 31 31 #include "RenderInline.h" 32 32 #include "Settings.h" 33 34 #if USE(JAVASCRIPTCORE_BINDINGS) 35 #include "runtime.h" 36 #endif 33 #include "ScriptController.h" 37 34 38 35 namespace WebCore { … … 47 44 HTMLAppletElement::~HTMLAppletElement() 48 45 { 49 #if USE(JAVASCRIPTCORE_BINDINGS)50 // m_instance should have been cleaned up in detach().51 ASSERT(!m_instance);52 #endif53 46 } 54 47 … … 144 137 145 138 #if USE(JAVASCRIPTCORE_BINDINGS) 146 KJS::Bindings::Instance* HTMLAppletElement::getInstance() const139 RenderWidget* HTMLAppletElement::renderWidgetForJSBindings() const 147 140 { 148 141 Settings* settings = document()->settings(); … … 150 143 return 0; 151 144 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; 161 150 } 162 151 #endif … … 170 159 } 171 160 172 void HTMLAppletElement::detach()173 {174 #if USE(JAVASCRIPTCORE_BINDINGS)175 m_instance = 0;176 #endif177 HTMLPlugInElement::detach();178 }179 180 161 String HTMLAppletElement::alt() const 181 162 {
