Changeset 57109 in webkit
- Timestamp:
- Apr 5, 2010 6:38:15 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57106 r57109 1 2010-04-05 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Images must re-load when an image-holding element moves into a new document 6 https://bugs.webkit.org/show_bug.cgi?id=37127 7 8 * fast/images/move-image-to-new-document-expected.txt: Added. 9 * fast/images/move-image-to-new-document.html: Added. 10 * fast/images/script-tests/move-image-to-new-document.js: Added. 11 12 * fast/js/resources/js-test-post.js: Added a feature for doing asynchronous scripting 13 tests. The caller sets jsTestIsAsync to true and then calls finishJSTest when done. 14 Used by the above test. 15 16 * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum: 17 * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png: 18 * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt: 19 Updated since the old test result relied on an incorrect load of an image. 20 The relative URL has a different base when moved into the subframe document. 21 1 22 2010-04-05 Zhenyao Mo <zmo@google.com> 2 23 -
trunk/LayoutTests/fast/js/resources/js-test-post.js
r26740 r57109 1 shouldBeTrue("successfullyParsed"); 2 debug('<br /><span class="pass">TEST COMPLETE</span>'); 1 function finishJSTest() 2 { 3 shouldBeTrue("successfullyParsed"); 4 debug('<br /><span class="pass">TEST COMPLETE</span>'); 5 if (window.jsTestIsAsync && window.layoutTestController) 6 layoutTestController.notifyDone(); 7 } 8 9 if (window.jsTestIsAsync) { 10 if (window.layoutTestController) 11 layoutTestController.waitUntilDone(); 12 } else 13 finishJSTest(); -
trunk/LayoutTests/platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum
r38122 r57109 1 7298c7dcbdc31a24ef27cbbdf78380cd 1 507f0044be28d7fe3ca8a3ae46f4e8d6 -
trunk/LayoutTests/platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt
r30635 r57109 19 19 RenderBody {BODY} at (8,8) size 284x134 20 20 RenderBlock {DIV} at (0,0) size 271x129 [border: (1px solid #000000)] 21 RenderImage {IMG} at (1, 84) size 20x2022 RenderImage {IMG} at (21,1) size 76x10321 RenderImage {IMG} at (1,1) size 20x20 22 RenderImage {IMG} at (21,1) size 20x20 23 23 RenderText {#text} at (0,0) size 0x0 24 24 RenderBlock {UL} at (0,226) size 784x0 -
trunk/WebCore/ChangeLog
r57108 r57109 1 2010-04-05 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Images must re-load when an image-holding element moves into a new document 6 https://bugs.webkit.org/show_bug.cgi?id=37127 7 8 Test: fast/images/move-image-to-new-document.html 9 10 * html/HTMLImageElement.cpp: 11 (WebCore::HTMLImageElement::willMoveToNewOwnerDocument): Call ImageLoader's 12 elementWillMoveToNewOwnerDocument function. 13 * html/HTMLImageElement.h: Added willMoveToNewOwnerDocument. 14 * html/HTMLInputElement.cpp: 15 (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Ditto. 16 * html/HTMLPlugInImageElement.cpp: 17 (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument): Ditto. 18 * html/HTMLPlugInImageElement.h: Ditto. 19 * html/HTMLVideoElement.cpp: 20 (WebCore::HTMLVideoElement::willMoveToNewOwnerDocument): Ditto. 21 * html/HTMLVideoElement.h: Ditto. 22 * svg/SVGImageElement.cpp: 23 (WebCore::SVGImageElement::willMoveToNewOwnerDocument): Ditto. 24 * svg/SVGImageElement.h: Ditto. 25 26 * html/HTMLMediaElement.h: Made willMoveToNewOwnerDocument protected 27 so it can be called by HTMLVideoElement.cpp. 28 29 * loader/ImageLoader.cpp: 30 (WebCore::ImageLoader::elementWillMoveToNewOwnerDocument): Added. 31 Resets the loader by clearing out the cached image. 32 * loader/ImageLoader.h: Added it. 33 1 34 2010-04-05 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 35 -
trunk/WebCore/html/HTMLImageElement.cpp
r54999 r57109 436 436 } 437 437 438 } 438 void HTMLImageElement::willMoveToNewOwnerDocument() 439 { 440 m_imageLoader.elementWillMoveToNewOwnerDocument(); 441 HTMLElement::willMoveToNewOwnerDocument(); 442 } 443 444 } -
trunk/WebCore/html/HTMLImageElement.h
r54999 r57109 106 106 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; 107 107 108 protected: 109 virtual void willMoveToNewOwnerDocument(); 110 108 111 private: 109 112 virtual void insertedIntoDocument(); -
trunk/WebCore/html/HTMLInputElement.cpp
r57013 r57109 2603 2603 void HTMLInputElement::willMoveToNewOwnerDocument() 2604 2604 { 2605 if (m_imageLoader) 2606 m_imageLoader->elementWillMoveToNewOwnerDocument(); 2607 2605 2608 // Always unregister for cache callbacks when leaving a document, even if we would otherwise like to be registered 2606 2609 if (needsActivationCallback()) -
trunk/WebCore/html/HTMLMediaElement.h
r56650 r57109 174 174 virtual ~HTMLMediaElement(); 175 175 176 virtual void parseMappedAttribute(MappedAttribute 176 virtual void parseMappedAttribute(MappedAttribute*); 177 177 virtual void attach(); 178 179 virtual void willMoveToNewOwnerDocument(); 180 virtual void didMoveToNewOwnerDocument(); 178 181 179 182 private: … … 198 201 void setReadyState(MediaPlayer::ReadyState); 199 202 void setNetworkState(MediaPlayer::NetworkState); 200 201 virtual void willMoveToNewOwnerDocument();202 virtual void didMoveToNewOwnerDocument();203 203 204 204 virtual Document* mediaPlayerOwningDocument(); -
trunk/WebCore/html/HTMLPlugInImageElement.cpp
r35606 r57109 35 35 } 36 36 37 HTMLPlugInImageElement::~HTMLPlugInImageElement()38 {39 }40 41 37 bool HTMLPlugInImageElement::isImageType() 42 38 { … … 52 48 } 53 49 50 void HTMLPlugInImageElement::willMoveToNewOwnerDocument() 51 { 52 if (m_imageLoader) 53 m_imageLoader->elementWillMoveToNewOwnerDocument(); 54 HTMLPlugInElement::willMoveToNewOwnerDocument(); 55 } 56 54 57 } // namespace WebCore -
trunk/WebCore/html/HTMLPlugInImageElement.h
r47688 r57109 31 31 class HTMLPlugInImageElement : public HTMLPlugInElement { 32 32 public: 33 virtual ~HTMLPlugInImageElement();34 35 33 const String& serviceType() const { return m_serviceType; } 36 34 const String& url() const { return m_url; } … … 44 42 String m_serviceType; 45 43 String m_url; 44 45 private: 46 virtual void willMoveToNewOwnerDocument(); 46 47 }; 47 48 -
trunk/WebCore/html/HTMLVideoElement.cpp
r55946 r57109 246 246 } 247 247 248 249 } 250 #endif 248 void HTMLVideoElement::willMoveToNewOwnerDocument() 249 { 250 if (m_imageLoader) 251 m_imageLoader->elementWillMoveToNewOwnerDocument(); 252 HTMLMediaElement::willMoveToNewOwnerDocument(); 253 } 254 255 } 256 #endif -
trunk/WebCore/html/HTMLVideoElement.h
r56650 r57109 83 83 virtual bool hasAvailableVideoFrame() const; 84 84 virtual void updatePosterImage(); 85 virtual void willMoveToNewOwnerDocument(); 85 86 86 87 OwnPtr<HTMLImageLoader> m_imageLoader; -
trunk/WebCore/loader/ImageLoader.cpp
r55029 r57109 278 278 } 279 279 280 void ImageLoader::elementWillMoveToNewOwnerDocument() 281 { 282 setImage(0); 283 } 284 280 285 ImageEventSender::ImageEventSender(const AtomicString& eventType) 281 286 : m_eventType(eventType) -
trunk/WebCore/loader/ImageLoader.h
r54618 r57109 46 46 void updateFromElementIgnoringPreviousError(); 47 47 48 void elementWillMoveToNewOwnerDocument(); 49 48 50 Element* element() const { return m_element; } 49 51 bool imageComplete() const { return m_imageComplete; } -
trunk/WebCore/svg/SVGImageElement.cpp
r53879 r57109 186 186 } 187 187 188 void SVGImageElement::willMoveToNewOwnerDocument() 189 { 190 m_imageLoader.elementWillMoveToNewOwnerDocument(); 191 SVGStyledTransformableElement::willMoveToNewOwnerDocument(); 192 } 193 188 194 } 189 195 -
trunk/WebCore/svg/SVGImageElement.h
r53879 r57109 63 63 64 64 private: 65 virtual void willMoveToNewOwnerDocument(); 66 65 67 DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::xAttr, SVGLength, X, x) 66 68 DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::yAttr, SVGLength, Y, y)
Note: See TracChangeset
for help on using the changeset viewer.