Changeset 21536 in webkit


Ignore:
Timestamp:
May 17, 2007 10:52:44 AM (17 years ago)
Author:
beidson
Message:

LayoutTests:

Reviewed by Brady

Created http/tests/multipart and moved the existing multipart test there.

  • http/tests/misc/multipart-expected.txt: Removed.
  • http/tests/misc/multipart.html: Removed.
  • http/tests/misc/resources/1x1-blue.png: Removed.
  • http/tests/misc/resources/multipart.php: Removed.
  • http/tests/multipart/invalid-image-data-expected.checksum: Added.
  • http/tests/multipart/invalid-image-data-expected.png: Added.
  • http/tests/multipart/invalid-image-data-expected.txt: Added.
  • http/tests/multipart/invalid-image-data.html: Added.
  • http/tests/multipart/resources/2x2-green.png: Added. Shared by both multipart tests.
  • http/tests/multipart/resources/abe.png: Added.
  • http/tests/multipart/resources/multipart.php: Added. Shared by both multipart tests.
  • http/tests/multipart/stop-crash.html: Renamed from misc/multipart.html.

WebCore:

Reviewed by Brady

Test: http/tests/multipart/invalid-image-data.html

  • loader/loader.cpp: (WebCore::Loader::didReceiveData): Make a copy of the current part's data instead of using the resource data, because the latter is going to be overwritten by the new part being received.
Location:
trunk
Files:
10 added
3 deleted
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21534 r21536  
     12007-05-17  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Brady
     4
     5        - pixel test for http://bugs.webkit.org/show_bug.cgi?id=13759
     6          REGRESSION (r20182-r20184): Incorrect rendering of multipart images
     7
     8        Created http/tests/multipart and moved the existing multipart test there.
     9
     10        * http/tests/misc/multipart-expected.txt: Removed.
     11        * http/tests/misc/multipart.html: Removed.
     12        * http/tests/misc/resources/1x1-blue.png: Removed.
     13        * http/tests/misc/resources/multipart.php: Removed.
     14        * http/tests/multipart/invalid-image-data-expected.checksum: Added.
     15        * http/tests/multipart/invalid-image-data-expected.png: Added.
     16        * http/tests/multipart/invalid-image-data-expected.txt: Added.
     17        * http/tests/multipart/invalid-image-data.html: Added.
     18        * http/tests/multipart/resources/2x2-green.png: Added. Shared by both
     19        multipart tests.
     20        * http/tests/multipart/resources/abe.png: Added.
     21        * http/tests/multipart/resources/multipart.php: Added. Shared by both
     22        multipart tests.
     23        * http/tests/multipart/stop-crash.html: Renamed from misc/multipart.html.
     24
    1252007-05-17  Justin Garcia  <justin.garcia@apple.com>
    226
  • trunk/LayoutTests/http/tests/multipart/stop-crash.html

    r21535 r21536  
    1919        If WebKit does not assert or crash after the test, then it passed.
    2020    </p>
    21     <img width=24 height=24 src="resources/multipart.php" onload="firstPartLoaded()">
     21    <img width=24 height=24 src="resources/multipart.php?interval=0&img1=2x2-green.png&img2=2x2-green.png&wait=10" onload="firstPartLoaded()">
    2222</body>
    2323</html>
  • trunk/WebCore/ChangeLog

    r21535 r21536  
     12007-05-17  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Brady
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=13759
     6          REGRESSION (r20182-r20184): Incorrect rendering of multipart images
     7
     8        Test: http/tests/multipart/invalid-image-data.html
     9
     10        * loader/loader.cpp:
     11        (WebCore::Loader::didReceiveData): Make a copy of the current part's data
     12        instead of using the resource data, because the latter is going to be
     13        overwritten by the new part being received.
     14
    1152007-05-17  Oliver Hunt  <oliver@apple.com>
    216
  • trunk/WebCore/loader/loader.cpp

    r21245 r21536  
    190190
    191191    // Set the data.
    192     if (request->isMultipart())
     192    if (request->isMultipart()) {
    193193        // The loader delivers the data in a multipart section all at once, send eof.
    194         object->data(loader->resourceData(), true);
    195     else if (request->isIncremental())
     194        // The resource data will change as the next part is loaded, so we need to make a copy.
     195        SharedBuffer* copiedData = new SharedBuffer(data, size);
     196        object->data(copiedData, true);
     197    } else if (request->isIncremental())
    196198        object->data(loader->resourceData(), false);
    197199}
Note: See TracChangeset for help on using the changeset viewer.