Changeset 45679 in webkit
- Timestamp:
- Jul 9, 2009 3:26:45 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r45677 r45679 1 2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Make Widget RefCounted to fix or make fixable: 6 7 <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 8 at WebCore::Widget::afterMouseDown() after clicking To Do's close 9 box 10 <rdar://problem/6978804> WER #16: Repro Access Violation in 11 WebCore::PluginView::bindingInstance (1310178023) 12 -and- 13 <rdar://problem/6991251> WER #13: Crash in WebKit! 14 WebCore::PluginView::performRequest+203 (1311461169) 15 16 * loader/EmptyClients.h: 17 (WebCore::EmptyFrameLoaderClient::createPlugin): 18 Changed to return PassRefPtr 19 (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget): 20 Ditto. 21 22 * loader/FrameLoader.cpp: 23 (WebCore::FrameLoader::loadSubframe): 24 (WebCore::FrameLoader::loadPlugin): 25 Make the widget variable a RefPtr. Use .get() when passing it to 26 RenderPart::setWidget(). 27 (WebCore::FrameLoader::createJavaAppletWidget): 28 Make the widget variable a RefPtr. 29 30 * loader/FrameLoader.h: 31 Changed the return type of createJavaAppletWidget(). 32 33 * loader/FrameLoaderClient.h: 34 Change the return types of createPlugin() and 35 createJavaAppletWidget(). 36 37 * page/Frame.cpp: 38 (WebCore::Frame::createView): 39 No need to call .get() since setWidget() takes a RefPtr. 40 41 * page/FrameView.cpp: 42 (WebCore::FrameView::layoutIfNeededRecursive): 43 children() now returns a HashSet of RefPtrs. 44 45 * page/FrameView.h: 46 Remove inheritance from RefCounted; we pick this up from ScrollView 47 through Widget. 48 49 * platform/ScrollView.cpp: 50 (WebCore::ScrollView::addChild): 51 addChild() now takes a PassRefPtr and m_children now keeps a 52 HashSet of RefPtrs. 53 54 * platform/ScrollView.h: 55 ScrollView constructor is now protected. 56 (WebCore::ScrollView::children): 57 m_children is now a HashSet of RefPtrs. 58 59 * platform/Scrollbar.h: 60 Remove inheritance from RefCounted; we pick this up from ScrollView 61 through Widget. 62 63 * platform/Widget.h: 64 Inherit from RefCounted. Cleaned up some whitespace. Make m_widget 65 a RefPtr. 66 67 * plugins/PluginView.cpp: 68 (WebCore::PluginView::create): 69 Adopt the PluginView when returning it. 70 71 * plugins/PluginView.h: 72 Changed create() to return a PassRefPtr. 73 74 * rendering/RenderApplet.cpp: 75 Receive result in a RefPtr when calling createJavaAppletWidget(). 76 77 * rendering/RenderPart.cpp: 78 (WebCore::RenderPart::setWidget): 79 setWidget() now takes a PassRefPtr. Also removed the manual ref of 80 FrameViews. This is handled by having m_widget be a RefPtr. Removed 81 deleteWidget(). 82 83 * rendering/RenderPart.h: 84 Removed override of deleteWidget(). 85 86 * rendering/RenderWidget.cpp: 87 (WebCore::RenderWidget::destroy): 88 (WebCore::RenderWidget::setWidget): 89 (WebCore::RenderWidget::paint): 90 (WebCore::RenderWidget::setOverlapTestResult): 91 (WebCore::RenderWidget::updateWidgetPosition): 92 Use .get(). 93 (WebCore::RenderWidget::clearWidget): 94 Don't call deleteWidget(). It was removed. 95 96 * rendering/RenderWidget.h: 97 Removed deleteWidget(). Made m_widget a RefPtr. 98 (WebCore::RenderWidget::widget): 99 Use .get(). 100 1 101 2009-07-09 Chris Fleizach <cfleizach@apple.com> 2 102 -
trunk/WebCore/loader/EmptyClients.h
r45333 r45679 271 271 272 272 virtual PassRefPtr<Frame> createFrame(const KURL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) { return 0; } 273 virtual Widget*createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool) { return 0; }274 virtual Widget*createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { return 0; }273 virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool) { return 0; } 274 virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { return 0; } 275 275 276 276 virtual ObjectContentType objectContentType(const KURL&, const String&) { return ObjectContentType(); } -
trunk/WebCore/loader/FrameLoader.cpp
r45634 r45679 1690 1690 const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback) 1691 1691 { 1692 Widget* widget = 0;1692 RefPtr<Widget> widget; 1693 1693 1694 1694 if (renderer && !useFallback) { … … 5070 5070 } 5071 5071 5072 Widget*FrameLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)5072 PassRefPtr<Widget> FrameLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const HashMap<String, String>& args) 5073 5073 { 5074 5074 String baseURLString; … … 5098 5098 KURL baseURL = completeURL(baseURLString); 5099 5099 5100 Widget*widget = m_client->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);5100 RefPtr<Widget> widget = m_client->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues); 5101 5101 if (!widget) 5102 5102 return 0; -
trunk/WebCore/loader/FrameLoader.h
r45634 r45679 306 306 String userAgent(const KURL&) const; 307 307 308 Widget*createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const HashMap<String, String>& args);308 PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const HashMap<String, String>& args); 309 309 310 310 void dispatchWindowObjectAvailable(); -
trunk/WebCore/loader/FrameLoaderClient.h
r45208 r45679 201 201 virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, 202 202 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0; 203 virtual Widget*createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;203 virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0; 204 204 virtual void redirectDataToPlugin(Widget* pluginWidget) = 0; 205 205 206 virtual Widget*createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0;206 virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0; 207 207 208 208 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType) = 0; -
trunk/WebCore/page/Frame.cpp
r44758 r45679 1772 1772 1773 1773 if (ownerRenderer()) 1774 ownerRenderer()->setWidget(frameView .get());1774 ownerRenderer()->setWidget(frameView); 1775 1775 1776 1776 if (HTMLFrameOwnerElement* owner = ownerElement()) -
trunk/WebCore/page/FrameView.cpp
r45598 r45679 1448 1448 layout(); 1449 1449 1450 const HashSet<Widget*>* viewChildren = children(); 1451 HashSet<Widget*>::const_iterator end = viewChildren->end(); 1452 for (HashSet<Widget*>::const_iterator current = viewChildren->begin(); current != end; ++current) 1453 if ((*current)->isFrameView()) 1454 static_cast<FrameView*>(*current)->layoutIfNeededRecursive(); 1450 const HashSet<RefPtr<Widget> >* viewChildren = children(); 1451 HashSet<RefPtr<Widget> >::const_iterator end = viewChildren->end(); 1452 for (HashSet<RefPtr<Widget> >::const_iterator current = viewChildren->begin(); current != end; ++current) { 1453 Widget* widget = (*current).get(); 1454 if (widget->isFrameView()) 1455 static_cast<FrameView*>(widget)->layoutIfNeededRecursive(); 1456 } 1455 1457 1456 1458 // layoutIfNeededRecursive is called when we need to make sure layout is up-to-date before -
trunk/WebCore/page/FrameView.h
r45598 r45679 49 49 template <typename T> class Timer; 50 50 51 class FrameView : public ScrollView , public RefCounted<FrameView>{51 class FrameView : public ScrollView { 52 52 public: 53 53 friend class RenderView; -
trunk/WebCore/platform/ScrollView.cpp
r45485 r45679 59 59 } 60 60 61 void ScrollView::addChild(Widget* child) 62 { 61 void ScrollView::addChild(PassRefPtr<Widget> prpChild) 62 { 63 Widget* child = prpChild.get(); 63 64 ASSERT(child != this && !child->parent()); 64 65 child->setParent(this); 65 m_children.add( child);66 m_children.add(prpChild); 66 67 if (child->platformWidget()) 67 68 platformAddChild(child); … … 710 711 return; 711 712 712 HashSet< Widget*>::const_iterator end = m_children.end();713 for (HashSet< Widget*>::const_iterator current = m_children.begin(); current != end; ++current)713 HashSet<RefPtr<Widget> >::const_iterator end = m_children.end(); 714 for (HashSet<RefPtr<Widget> >::const_iterator current = m_children.begin(); current != end; ++current) 714 715 (*current)->frameRectsChanged(); 715 716 } … … 846 847 return; 847 848 848 HashSet< Widget*>::iterator end = m_children.end();849 for (HashSet< Widget*>::iterator it = m_children.begin(); it != end; ++it)849 HashSet<RefPtr<Widget> >::iterator end = m_children.end(); 850 for (HashSet<RefPtr<Widget> >::iterator it = m_children.begin(); it != end; ++it) 850 851 (*it)->setParentVisible(visible); 851 852 } … … 856 857 setSelfVisible(true); 857 858 if (isParentVisible()) { 858 HashSet< Widget*>::iterator end = m_children.end();859 for (HashSet< Widget*>::iterator it = m_children.begin(); it != end; ++it)859 HashSet<RefPtr<Widget> >::iterator end = m_children.end(); 860 for (HashSet<RefPtr<Widget> >::iterator it = m_children.begin(); it != end; ++it) 860 861 (*it)->setParentVisible(true); 861 862 } … … 869 870 if (isSelfVisible()) { 870 871 if (isParentVisible()) { 871 HashSet< Widget*>::iterator end = m_children.end();872 for (HashSet< Widget*>::iterator it = m_children.begin(); it != end; ++it)872 HashSet<RefPtr<Widget> >::iterator end = m_children.end(); 873 for (HashSet<RefPtr<Widget> >::iterator it = m_children.begin(); it != end; ++it) 873 874 (*it)->setParentVisible(false); 874 875 } -
trunk/WebCore/platform/ScrollView.h
r45485 r45679 56 56 class ScrollView : public Widget, public ScrollbarClient { 57 57 public: 58 ScrollView();59 58 ~ScrollView(); 60 59 … … 70 69 71 70 // Methods for child manipulation and inspection. 72 const HashSet< Widget*>* children() const { return &m_children; }73 void addChild( Widget*);71 const HashSet<RefPtr<Widget> >* children() const { return &m_children; } 72 void addChild(PassRefPtr<Widget>); 74 73 void removeChild(Widget*); 75 74 … … 228 227 229 228 protected: 229 ScrollView(); 230 230 231 virtual void repaintContentRectangle(const IntRect&, bool now = false); 231 232 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; … … 245 246 bool m_prohibitsScrolling; 246 247 247 HashSet< Widget*> m_children;248 HashSet<RefPtr<Widget> > m_children; 248 249 249 250 // This bool is unused on Mac OS because we directly ask the platform widget -
trunk/WebCore/platform/Scrollbar.h
r45478 r45679 27 27 #define Scrollbar_h 28 28 29 #include <wtf/RefCounted.h>30 29 #include "ScrollTypes.h" 31 30 #include "Timer.h" … … 46 45 const int cAmountToKeepWhenPaging = 40; 47 46 48 class Scrollbar : public Widget , public RefCounted<Scrollbar>{47 class Scrollbar : public Widget { 49 48 protected: 50 49 Scrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0); -
trunk/WebCore/platform/Widget.h
r45478 r45679 74 74 #include "IntSize.h" 75 75 76 #include <wtf/RefCounted.h> 77 76 78 namespace WebCore { 77 79 … … 99 101 // Plugin - Mac, Windows (windowed only), Qt (windowed only, widget is an HWND on windows), Gtk (windowed only) 100 102 // 101 class Widget {103 class Widget : public RefCounted<Widget> { 102 104 public: 103 105 Widget(PlatformWidget = 0); 104 106 virtual ~Widget(); 105 107 106 108 PlatformWidget platformWidget() const { return m_widget; } 107 109 void setPlatformWidget(PlatformWidget widget) -
trunk/WebCore/plugins/PluginView.cpp
r43949 r45679 667 667 } 668 668 669 P luginView*PluginView::create(Frame* parentFrame, const IntSize& size, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)669 PassRefPtr<PluginView> PluginView::create(Frame* parentFrame, const IntSize& size, Element* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 670 670 { 671 671 // if we fail to find a plugin for this MIME type, findPlugin will search for … … 680 680 } 681 681 682 return new PluginView(parentFrame, size, plugin, element, url, paramNames, paramValues, mimeTypeCopy, loadManually);682 return adoptRef(new PluginView(parentFrame, size, plugin, element, url, paramNames, paramValues, mimeTypeCopy, loadManually)); 683 683 } 684 684 -
trunk/WebCore/plugins/PluginView.h
r44381 r45679 109 109 class PluginView : public Widget, private PluginStreamClient, public PluginManualLoader { 110 110 public: 111 static P luginView*create(Frame* parentFrame, const IntSize&, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);111 static PassRefPtr<PluginView> create(Frame* parentFrame, const IntSize&, Element*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually); 112 112 virtual ~PluginView(); 113 113 -
trunk/WebCore/rendering/RenderApplet.cpp
r44379 r45679 27 27 #include "HTMLNames.h" 28 28 #include "HTMLParamElement.h" 29 #include "Widget.h" 29 30 30 31 namespace WebCore { -
trunk/WebCore/rendering/RenderPart.cpp
r44379 r45679 42 42 } 43 43 44 void RenderPart::setWidget( Widget*widget)44 void RenderPart::setWidget(PassRefPtr<Widget> widget) 45 45 { 46 46 if (widget == this->widget()) 47 47 return; 48 48 49 if (widget && widget->isFrameView())50 static_cast<FrameView*>(widget)->ref();51 49 RenderWidget::setWidget(widget); 52 50 … … 60 58 } 61 59 62 void RenderPart::deleteWidget(Widget* widget)63 {64 // Since deref ends up calling setWidget back on us, need to make sure65 // that widget is already 0 so it won't do any work.66 ASSERT(!this->widget());67 68 if (widget && widget->isFrameView())69 static_cast<FrameView*>(widget)->deref();70 else71 delete widget;72 60 } 73 74 } -
trunk/WebCore/rendering/RenderPart.h
r44379 r45679 35 35 bool hasFallbackContent() const { return m_hasFallbackContent; } 36 36 37 virtual void setWidget( Widget*);37 virtual void setWidget(PassRefPtr<Widget>); 38 38 virtual void viewCleared(); 39 39 … … 44 44 virtual bool isRenderPart() const { return true; } 45 45 virtual const char* renderName() const { return "RenderPart"; } 46 47 virtual void deleteWidget(Widget*);48 46 }; 49 47 -
trunk/WebCore/rendering/RenderWidget.cpp
r45486 r45679 74 74 if (m_widget) { 75 75 if (m_frameView) 76 m_frameView->removeChild(m_widget );77 widgetRendererMap().remove(m_widget );76 m_frameView->removeChild(m_widget.get()); 77 widgetRendererMap().remove(m_widget.get()); 78 78 } 79 79 … … 114 114 } 115 115 116 void RenderWidget::setWidget( Widget*widget)116 void RenderWidget::setWidget(PassRefPtr<Widget> widget) 117 117 { 118 118 if (widget != m_widget) { 119 119 if (m_widget) { 120 120 m_widget->removeFromParent(); 121 widgetRendererMap().remove(m_widget );121 widgetRendererMap().remove(m_widget.get()); 122 122 clearWidget(); 123 123 } 124 124 m_widget = widget; 125 125 if (m_widget) { 126 widgetRendererMap().add(m_widget , this);126 widgetRendererMap().add(m_widget.get(), this); 127 127 // if we've already received a layout, apply the calculated space to the 128 128 // widget immediately, but we have to have really been full constructed (with a non-null … … 136 136 m_widget->show(); 137 137 } 138 m_frameView->addChild(m_widget );138 m_frameView->addChild(m_widget.get()); 139 139 } 140 140 } … … 204 204 m_widget->paint(paintInfo.context, paintInfo.rect); 205 205 206 if (m_widget->isFrameView() && paintInfo.overlapTestRequests && !static_cast<FrameView*>(m_widget )->useSlowRepaints()) {206 if (m_widget->isFrameView() && paintInfo.overlapTestRequests && !static_cast<FrameView*>(m_widget.get())->useSlowRepaints()) { 207 207 ASSERT(!paintInfo.overlapTestRequests->contains(this)); 208 208 paintInfo.overlapTestRequests->set(this, m_widget->frameRect()); … … 224 224 ASSERT(m_widget); 225 225 ASSERT(m_widget->isFrameView()); 226 static_cast<FrameView*>(m_widget )->setIsOverlapped(isOverlapped);226 static_cast<FrameView*>(m_widget.get())->setIsOverlapped(isOverlapped); 227 227 } 228 228 … … 259 259 // content size is wrong) we have to do a layout to set the right widget size 260 260 if (m_widget->isFrameView()) { 261 FrameView* frameView = static_cast<FrameView*>(m_widget );261 FrameView* frameView = static_cast<FrameView*>(m_widget.get()); 262 262 if (boundsChanged || frameView->needsLayout()) 263 263 frameView->layout(); … … 276 276 void RenderWidget::clearWidget() 277 277 { 278 Widget* widget = m_widget;279 278 m_widget = 0; 280 if (widget)281 deleteWidget(widget);282 }283 284 void RenderWidget::deleteWidget(Widget* widget)285 {286 delete widget;287 279 } 288 280 -
trunk/WebCore/rendering/RenderWidget.h
r44379 r45679 34 34 virtual ~RenderWidget(); 35 35 36 Widget* widget() const { return m_widget ; }37 virtual void setWidget( Widget*);36 Widget* widget() const { return m_widget.get(); } 37 virtual void setWidget(PassRefPtr<Widget>); 38 38 39 39 static RenderWidget* find(const Widget*); … … 58 58 virtual void setSelectionState(SelectionState); 59 59 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); 60 virtual void deleteWidget(Widget*);61 60 virtual void setOverlapTestResult(bool); 62 61 … … 66 65 void deref(RenderArena*); 67 66 68 Widget*m_widget;67 RefPtr<Widget> m_widget; 69 68 FrameView* m_frameView; 70 69 int m_refCount; -
trunk/WebKit/gtk/ChangeLog
r45558 r45679 1 2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Make Widget RefCounted to fix: 6 7 <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 8 at WebCore::Widget::afterMouseDown() after clicking To Do's close 9 box 10 <rdar://problem/6978804> WER #16: Repro Access Violation in 11 WebCore::PluginView::bindingInstance (1310178023) 12 -and- 13 <rdar://problem/6991251> WER #13: Crash in WebKit! 14 WebCore::PluginView::performRequest+203 (1311461169) 15 16 * WebCoreSupport/FrameLoaderClientGtk.cpp: 17 (WebKit::FrameLoaderClient::createPlugin): 18 (WebKit::FrameLoaderClient::createJavaAppletWidget): 19 * WebCoreSupport/FrameLoaderClientGtk.h: 20 1 21 2009-07-06 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 22 -
trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
r45531 r45679 372 372 } 373 373 374 Widget*FrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)374 PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 375 375 { 376 376 /* Check if we want to embed a GtkWidget, fallback to plugins later */ … … 390 390 mimeTypeString.data(), urlString.data(), hash.get(), >kWidget); 391 391 if (gtkWidget) 392 return new GtkPluginWidget(gtkWidget);393 394 PluginView*pluginView = PluginView::create(core(m_frame), pluginSize, element, url, paramNames, paramValues, mimeType, loadManually);392 return adoptRef(new GtkPluginWidget(gtkWidget)); 393 394 RefPtr<PluginView> pluginView = PluginView::create(core(m_frame), pluginSize, element, url, paramNames, paramValues, mimeType, loadManually); 395 395 396 396 if (pluginView->status() == PluginStatusLoadedSuccessfully) … … 434 434 } 435 435 436 Widget*FrameLoaderClient::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL,436 PassRefPtr<Widget> FrameLoaderClient::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, 437 437 const Vector<String>& paramNames, const Vector<String>& paramValues) 438 438 { -
trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
r45531 r45679 111 111 virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, 112 112 const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); 113 virtual WebCore::Widget*createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WebCore::String>&, const WTF::Vector<WebCore::String>&, const WebCore::String&, bool);113 virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WebCore::String>&, const WTF::Vector<WebCore::String>&, const WebCore::String&, bool); 114 114 virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); 115 virtual WebCore::Widget*createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues);115 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues); 116 116 virtual WebCore::String overrideMediaType() const; 117 117 virtual void windowObjectCleared(); -
trunk/WebKit/mac/ChangeLog
r45678 r45679 1 2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Make Widget RefCounted to fix: 6 7 <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 8 at WebCore::Widget::afterMouseDown() after clicking To Do's close 9 box 10 <rdar://problem/6978804> WER #16: Repro Access Violation in 11 WebCore::PluginView::bindingInstance (1310178023) 12 -and- 13 <rdar://problem/6991251> WER #13: Crash in WebKit! 14 WebCore::PluginView::performRequest+203 (1311461169) 15 16 * WebCoreSupport/WebFrameLoaderClient.h: 17 * WebCoreSupport/WebFrameLoaderClient.mm: 18 (WebFrameLoaderClient::createPlugin): 19 1 20 2009-07-09 Sam Weinig <sam@webkit.org> 2 21 -
trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
r43113 r45679 179 179 virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement*, 180 180 const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); 181 virtual WebCore::Widget*createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&,181 virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&, 182 182 const Vector<WebCore::String>&, const WebCore::String&, bool); 183 183 virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); 184 184 185 virtual WebCore::Widget*createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL,185 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, 186 186 const Vector<WebCore::String>& paramNames, const Vector<WebCore::String>& paramValues); 187 187 -
trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r45675 r45679 1405 1405 #endif 1406 1406 1407 Widget*WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url,1407 PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url, 1408 1408 const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 1409 1409 { … … 1434 1434 1435 1435 if (view) 1436 return new PluginWidget(view);1436 return adoptRef(new PluginWidget(view)); 1437 1437 } 1438 1438 … … 1484 1484 element:element] autorelease]; 1485 1485 1486 return new NetscapePluginWidget(pluginView);1486 return adoptRef(new NetscapePluginWidget(pluginView)); 1487 1487 } 1488 1488 #endif … … 1506 1506 1507 1507 ASSERT(view); 1508 return new PluginWidget(view);1508 return adoptRef(new PluginWidget(view)); 1509 1509 1510 1510 END_BLOCK_OBJC_EXCEPTIONS; … … 1536 1536 } 1537 1537 1538 Widget*WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const KURL& baseURL,1538 PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const KURL& baseURL, 1539 1539 const Vector<String>& paramNames, const Vector<String>& paramValues) 1540 1540 { … … 1594 1594 1595 1595 ASSERT(view); 1596 return new PluginWidget(view);1596 return adoptRef(new PluginWidget(view)); 1597 1597 1598 1598 END_BLOCK_OBJC_EXCEPTIONS; 1599 1599 1600 return new PluginWidget;1600 return adoptRef(new PluginWidget); 1601 1601 #else 1602 1602 return 0; -
trunk/WebKit/mac/WebView/WebView.mm
r45678 r45679 1694 1694 NSView *documentView = [[kit(frameView->frame()) frameView] documentView]; 1695 1695 1696 const HashSet< Widget*>* children = frameView->children();1697 HashSet< Widget*>::const_iterator end = children->end();1698 for (HashSet< Widget*>::const_iterator it = children->begin(); it != end; ++it) {1699 Widget* widget = *it;1696 const HashSet<RefPtr<Widget> >* children = frameView->children(); 1697 HashSet<RefPtr<Widget> >::const_iterator end = children->end(); 1698 for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it != end; ++it) { 1699 Widget* widget = (*it).get(); 1700 1700 if (widget->isFrameView()) { 1701 1701 [self _addScrollerDashboardRegionsForFrameView:static_cast<FrameView*>(widget) dashboardRegions:regions]; -
trunk/WebKit/qt/ChangeLog
r45626 r45679 1 2009-07-09 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Make Widget RefCounted to fix: 6 7 <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 8 at WebCore::Widget::afterMouseDown() after clicking To Do's close 9 box 10 <rdar://problem/6978804> WER #16: Repro Access Violation in 11 WebCore::PluginView::bindingInstance (1310178023) 12 -and- 13 <rdar://problem/6991251> WER #13: Crash in WebKit! 14 WebCore::PluginView::performRequest+203 (1311461169) 15 16 * WebCoreSupport/FrameLoaderClientQt.cpp: 17 (WebCore::FrameLoaderClientQt::createPlugin): 18 (WebCore::FrameLoaderClientQt::createJavaAppletWidget): 19 * WebCoreSupport/FrameLoaderClientQt.h: 20 1 21 2009-07-08 Pradeepto Bhattacharya <pradeepto@kde.org> 2 22 -
trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r45625 r45679 1063 1063 }; 1064 1064 1065 Widget*FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames,1065 PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, 1066 1066 const Vector<String>& paramValues, const String& mimeType, bool loadManually) 1067 1067 { … … 1127 1127 if (view) 1128 1128 widget->setParent(view); 1129 QtPluginWidget* w = new QtPluginWidget();1129 RefPtr<QtPluginWidget> w = adoptRef(new QtPluginWidget()); 1130 1130 w->setPlatformWidget(widget); 1131 1131 // Make sure it's invisible until properly placed into the layout … … 1136 1136 delete object; 1137 1137 } else { // NPAPI Plugins 1138 PluginView*pluginView = PluginView::create(m_frame, pluginSize, element, url,1138 RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url, 1139 1139 paramNames, paramValues, mimeType, loadManually); 1140 1140 return pluginView; … … 1151 1151 } 1152 1152 1153 Widget*FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL,1153 PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, 1154 1154 const Vector<String>& paramNames, const Vector<String>& paramValues) 1155 1155 { -
trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
r45626 r45679 186 186 virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, 187 187 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) ; 188 virtual Widget*createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);188 virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool); 189 189 virtual void redirectDataToPlugin(Widget* pluginWidget); 190 190 191 virtual Widget*createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);191 virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues); 192 192 193 193 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType); -
trunk/WebKit/win/ChangeLog
r45678 r45679 1 2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Make Widget RefCounted to fix: 6 7 <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 8 at WebCore::Widget::afterMouseDown() after clicking To Do's close 9 box 10 <rdar://problem/6978804> WER #16: Repro Access Violation in 11 WebCore::PluginView::bindingInstance (1310178023) 12 -and- 13 <rdar://problem/6991251> WER #13: Crash in WebKit! 14 WebCore::PluginView::performRequest+203 (1311461169) 15 16 * WebCoreSupport/WebFrameLoaderClient.cpp: 17 (WebFrameLoaderClient::createPlugin): 18 * WebCoreSupport/WebFrameLoaderClient.h: 19 * WebFrame.cpp: 20 (WebFrame::createJavaAppletWidget): 21 * WebFrame.h: 22 1 23 2009-07-09 Sam Weinig <sam@webkit.org> 2 24 -
trunk/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
r45508 r45679 627 627 } 628 628 629 Widget*WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)629 PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) 630 630 { 631 631 WebView* webView = m_webFrame->webView(); … … 665 665 666 666 Frame* frame = core(m_webFrame); 667 PluginView*pluginView = PluginView::create(frame, pluginSize, element, url, paramNames, paramValues, mimeType, loadManually);667 RefPtr<PluginView> pluginView = PluginView::create(frame, pluginSize, element, url, paramNames, paramValues, mimeType, loadManually); 668 668 669 669 if (pluginView->status() == PluginStatusLoadedSuccessfully) -
trunk/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
r43113 r45679 103 103 virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, 104 104 const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); 105 virtual WebCore::Widget*createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&, bool loadManually);105 virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&, bool loadManually); 106 106 virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); 107 107 -
trunk/WebKit/win/WebFrame.cpp
r44791 r45679 1611 1611 } 1612 1612 1613 Widget*WebFrame::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& /*baseURL*/, const Vector<String>& paramNames, const Vector<String>& paramValues)1614 { 1615 PluginView*pluginView = PluginView::create(core(this), pluginSize, element, KURL(), paramNames, paramValues, "application/x-java-applet", false);1613 PassRefPtr<Widget> WebFrame::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& /*baseURL*/, const Vector<String>& paramNames, const Vector<String>& paramValues) 1614 { 1615 RefPtr<PluginView> pluginView = PluginView::create(core(this), pluginSize, element, KURL(), paramNames, paramValues, "application/x-java-applet", false); 1616 1616 1617 1617 // Check if the plugin can be loaded successfully -
trunk/WebKit/win/WebFrame.h
r41738 r45679 287 287 virtual void startDownload(const WebCore::ResourceRequest&); 288 288 289 virtual WebCore::Widget*createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<WebCore::String>& paramNames, const Vector<WebCore::String>& paramValues);289 virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<WebCore::String>& paramNames, const Vector<WebCore::String>& paramValues); 290 290 291 291 virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WebCore::String& mimeType); -
trunk/WebKit/wx/ChangeLog
r44552 r45679 1 2009-07-09 Beth Dakin and Jon Honeycutt <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Make Widget RefCounted to fix: 6 7 <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 8 at WebCore::Widget::afterMouseDown() after clicking To Do's close 9 box 10 <rdar://problem/6978804> WER #16: Repro Access Violation in 11 WebCore::PluginView::bindingInstance (1310178023) 12 -and- 13 <rdar://problem/6991251> WER #13: Crash in WebKit! 14 WebCore::PluginView::performRequest+203 (1311461169) 15 16 * WebKitSupport/FrameLoaderClientWx.cpp: 17 (WebCore::FrameLoaderClientWx::createPlugin): 18 (WebCore::FrameLoaderClientWx::createJavaAppletWidget): 19 * WebKitSupport/FrameLoaderClientWx.h: 20 1 21 2009-06-09 Kevin Ollivier <kevino@theolliviers.com> 2 22 -
trunk/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
r44402 r45679 811 811 } 812 812 813 Widget*FrameLoaderClientWx::createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually)813 PassRefPtr<Widget> FrameLoaderClientWx::createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) 814 814 { 815 815 notImplemented(); … … 829 829 } 830 830 831 Widget*FrameLoaderClientWx::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL,831 PassRefPtr<Widget> FrameLoaderClientWx::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, 832 832 const Vector<String>& paramNames, const Vector<String>& paramValues) 833 833 { -
trunk/WebKit/wx/WebKitSupport/FrameLoaderClientWx.h
r43113 r45679 191 191 virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, 192 192 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); 193 virtual Widget*createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) ;193 virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) ; 194 194 virtual void redirectDataToPlugin(Widget* pluginWidget); 195 195 virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&); 196 196 197 virtual Widget*createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);197 virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues); 198 198 199 199 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType);
Note: See TracChangeset
for help on using the changeset viewer.