Changeset 102829 in webkit
- Timestamp:
- Dec 14, 2011 2:52:08 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r102820 r102829 1 2011-12-14 Brady Eidson <beidson@apple.com> 2 3 <rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533 4 REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element 5 6 Reviewed by Darin Adler. 7 8 * media/crash-closing-page-with-media-as-plugin-fallback-expected.txt: Added. 9 * media/crash-closing-page-with-media-as-plugin-fallback.html: Added. 10 * media/resources/video-with-poster-as-object-fallback.html: Added. 11 1 12 2011-12-14 Ryosuke Niwa <rniwa@webkit.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r102828 r102829 1 2011-12-14 Brady Eidson <beidson@apple.com> 2 3 <rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533 4 REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element 5 6 Reviewed by Darin Adler. 7 8 Test: media/crash-closing-page-with-media-as-plugin-fallback.html 9 10 Switch HTMLPlugInImageElement from using document activation callbacks to using the ActiveDOMObject 11 mechanism which will prevent the unnecessary (and crashy) work at Document teardown: 12 * html/HTMLPlugInImageElement.cpp: 13 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): 14 (WebCore::HTMLPlugInImageElement::canSuspend): 15 (WebCore::HTMLPlugInImageElement::suspend): 16 (WebCore::HTMLPlugInImageElement::resume): 17 * html/HTMLPlugInImageElement.h: 18 1 19 2011-12-14 Adrienne Walker <enne@google.com> 2 20 -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r102619 r102829 38 38 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser, PreferPlugInsForImagesOption preferPlugInsForImagesOption) 39 39 : HTMLPlugInElement(tagName, document) 40 , ActiveDOMObject(document, this) 40 41 // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay 41 42 // widget updates until after all children are parsed. For HTMLEmbedElement … … 203 204 } 204 205 205 void HTMLPlugInImageElement::willMoveToNewOwnerDocument() 206 { 207 if (m_needsDocumentActivationCallbacks) 208 document()->unregisterForDocumentActivationCallbacks(this); 209 210 if (m_imageLoader) 211 m_imageLoader->elementWillMoveToNewOwnerDocument(); 212 213 HTMLPlugInElement::willMoveToNewOwnerDocument(); 214 } 215 216 void HTMLPlugInImageElement::didMoveToNewOwnerDocument() 217 { 218 if (m_needsDocumentActivationCallbacks) 219 document()->registerForDocumentActivationCallbacks(this); 220 221 HTMLPlugInElement::didMoveToNewOwnerDocument(); 222 } 223 224 void HTMLPlugInImageElement::documentWillBecomeInactive() 225 { 206 bool HTMLPlugInImageElement::canSuspend() const 207 { 208 return true; 209 } 210 211 void HTMLPlugInImageElement::suspend(ReasonForSuspension reason) 212 { 213 if (reason != DocumentWillBecomeInactive) 214 return; 215 226 216 if (RenderStyle* rs = renderStyle()) { 227 217 m_customStyleForPageCache = RenderStyle::clone(rs); … … 233 223 if (m_customStyleForPageCache) 234 224 recalcStyle(Force); 235 236 HTMLPlugInElement::documentWillBecomeInactive(); 237 } 238 239 void HTMLPlugInImageElement::documentDidBecomeActive() 225 } 226 227 void HTMLPlugInImageElement::resume() 240 228 { 241 229 clearHasCustomStyleForRenderer(); … … 245 233 recalcStyle(Force); 246 234 } 247 248 HTMLPlugInElement::documentDidBecomeActive();249 235 } 250 236 -
trunk/Source/WebCore/html/HTMLPlugInImageElement.h
r102628 r102829 22 22 #define HTMLPlugInImageElement_h 23 23 24 #include "ActiveDOMObject.h" 24 25 #include "HTMLPlugInElement.h" 25 26 26 #include "RenderStyle.h" 27 27 #include <wtf/OwnPtr.h> … … 43 43 44 44 // Base class for HTMLObjectElement and HTMLEmbedElement 45 class HTMLPlugInImageElement : public HTMLPlugInElement {45 class HTMLPlugInImageElement : public HTMLPlugInElement, public ActiveDOMObject { 46 46 public: 47 47 virtual ~HTMLPlugInImageElement(); … … 54 54 const String& url() const { return m_url; } 55 55 bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForImages; } 56 56 57 57 protected: 58 58 HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser, PreferPlugInsForImagesOption); … … 74 74 bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType); 75 75 76 virtual void willMoveToNewOwnerDocument() OVERRIDE; 77 virtual void didMoveToNewOwnerDocument() OVERRIDE; 78 79 virtual void documentWillBecomeInactive() OVERRIDE; 80 virtual void documentDidBecomeActive() OVERRIDE; 76 virtual bool canSuspend() const OVERRIDE; 77 virtual void suspend(ReasonForSuspension) OVERRIDE; 78 virtual void resume() OVERRIDE; 81 79 82 80 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
Note: See TracChangeset
for help on using the changeset viewer.