Changeset 122228 in webkit


Ignore:
Timestamp:
Jul 10, 2012 9:18:40 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Editing: Reproducible crasher when pasting a 0x0 image into Mail
https://bugs.webkit.org/show_bug.cgi?id=90640
<rdar://problem/11141920>

Patch by Alice Cheng <alice_cheng@apple.com> on 2012-07-10
Reviewed by Brady Eidson.

Source/WebCore:

0x0 images don't get a resource representation in the WebArchive, so we need a null check

Test: TestWebKitAPI/Tests/mac/0.png

TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm

  • platform/mac/PasteboardMac.mm:

(WebCore::documentFragmentWithImageResource):

Tools:

Test cases for the patch. 0x0 images don't get a resource representation in the WebArchive, so we need a null check.

  • TestWebKitAPI/Tests/mac/0.png: Added.
  • TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm: Added.

(TestWebKitAPI):
(TestWebKitAPI::TEST):

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r122227 r122228  
     12012-07-10  Alice Cheng  <alice_cheng@apple.com>
     2
     3        Editing: Reproducible crasher when pasting a 0x0 image into Mail
     4        https://bugs.webkit.org/show_bug.cgi?id=90640
     5        <rdar://problem/11141920>
     6
     7        Reviewed by Brady Eidson.
     8
     9        0x0 images don't get a resource representation in the WebArchive, so we need a null check
     10
     11        Test: TestWebKitAPI/Tests/mac/0.png
     12              TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm
     13
     14        * platform/mac/PasteboardMac.mm:
     15        (WebCore::documentFragmentWithImageResource):
     16
    1172012-07-10  Nikita Vasilyev  <me@elv1s.ru>
    218
  • trunk/Source/WebCore/platform/mac/PasteboardMac.mm

    r117731 r122228  
    369369static PassRefPtr<DocumentFragment> documentFragmentWithImageResource(Frame* frame, PassRefPtr<ArchiveResource> resource)
    370370{
     371    if (!resource)
     372        return 0;
     373   
    371374    if (DocumentLoader* loader = frame->loader()->documentLoader())
    372375        loader->addArchiveResource(resource.get());
  • trunk/Tools/ChangeLog

    r122225 r122228  
     12012-07-10  Alice Cheng  <alice_cheng@apple.com>
     2
     3        Editing: Reproducible crasher when pasting a 0x0 image into Mail
     4        https://bugs.webkit.org/show_bug.cgi?id=90640
     5        <rdar://problem/11141920>
     6
     7        Reviewed by Brady Eidson.
     8
     9        Test cases for the patch. 0x0 images don't get a resource representation in the WebArchive, so we need a null check.
     10
     11        * TestWebKitAPI/Tests/mac/0.png: Added.
     12        * TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm: Added.
     13        (TestWebKitAPI):
     14        (TestWebKitAPI::TEST):
     15
    1162012-07-10  Leandro Gracia Gil  <leandrogracia@chromium.org>
    217
Note: See TracChangeset for help on using the changeset viewer.