| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 LOG_ERROR("Failed to archive subresource for %s", subresourceURL
.string().utf8().data()); | 547 LOG_ERROR("Failed to archive subresource for %s", subresourceURL
.string().utf8().data()); |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 } | 550 } |
| 551 | 551 |
| 552 // Add favicon if one exists for this page | 552 // Add favicon if one exists for this page |
| 553 if (iconDatabase() && iconDatabase()->isEnabled()) { | 553 if (iconDatabase() && iconDatabase()->isEnabled()) { |
| 554 const String& iconURL = iconDatabase()->iconURLForPageURL(responseURL); | 554 const String& iconURL = iconDatabase()->iconURLForPageURL(responseURL); |
| 555 if (!iconURL.isEmpty() && iconDatabase()->iconDataKnownForIconURL(iconUR
L)) { | 555 if (!iconURL.isEmpty() && iconDatabase()->iconDataKnownForIconURL(iconUR
L)) { |
| 556 RefPtr<SharedBuffer> data = iconDatabase()->iconForPageURL(responseU
RL, IntSize(16, 16))->data(); | 556 RefPtr<SharedBuffer> data = iconDatabase()->iconForPageURL(responseU
RL, IntSize(16, 16))->data(); |
| 557 RefPtr<ArchiveResource> resource = ArchiveResource::create(data.rele
ase(), KURL(iconURL), "image/x-icon", "", ""); | 557 if (data) { |
| 558 subresources.append(resource.release()); | 558 RefPtr<ArchiveResource> resource = ArchiveResource::create(data.
release(), KURL(iconURL), "image/x-icon", "", ""); |
| 559 subresources.append(resource.release()); |
| 560 } |
| 559 } | 561 } |
| 560 } | 562 } |
| 561 | 563 |
| 562 return create(mainResource, subresources, subframeArchives); | 564 return create(mainResource, subresources, subframeArchives); |
| 563 } | 565 } |
| 564 | 566 |
| 565 PassRefPtr<LegacyWebArchive> LegacyWebArchive::createFromSelection(Frame* frame) | 567 PassRefPtr<LegacyWebArchive> LegacyWebArchive::createFromSelection(Frame* frame) |
| 566 { | 568 { |
| 567 if (!frame) | 569 if (!frame) |
| 568 return 0; | 570 return 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 586 | 588 |
| 587 Vector<PassRefPtr<LegacyWebArchive> > subframeArchives; | 589 Vector<PassRefPtr<LegacyWebArchive> > subframeArchives; |
| 588 subframeArchives.append(archive); | 590 subframeArchives.append(archive); |
| 589 | 591 |
| 590 archive = LegacyWebArchive::create(iframeResource.release(), subresources, s
ubframeArchives); | 592 archive = LegacyWebArchive::create(iframeResource.release(), subresources, s
ubframeArchives); |
| 591 | 593 |
| 592 return archive.release(); | 594 return archive.release(); |
| 593 } | 595 } |
| 594 | 596 |
| 595 } | 597 } |
| OLD | NEW |