2007-10-01 Eric Seidel <eric@webkit.org>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2007 14:21:36 +0000 (14:21 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2007 14:21:36 +0000 (14:21 +0000)
        Reviewed by Oliver Hunt.

        SVG Subresources will not be saved when creating WebArchives
        http://bugs.webkit.org/show_bug.cgi?id=15280

        Implement _subresourceURLs methods for more SVGElement types
        more such methods will be needed as we add support for other
        external references (such as use, mpath, tref, etc.)

        * DOM/WebDOMOperations.mm:
        (-[DOMSVGScriptElement _subresourceURLs]): added.
        (-[DOMSVGCursorElement _subresourceURLs]): added.
        (-[DOMSVGFEImageElement _subresourceURLs]): added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@26461 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/webarchive/resources/green-checker.png [new file with mode: 0644]
LayoutTests/svg/webarchive/resources/svg-script-subresources.js [new file with mode: 0644]
LayoutTests/svg/webarchive/svg-cursor-subresources-expected.txt [new file with mode: 0644]
LayoutTests/svg/webarchive/svg-cursor-subresources.svg [new file with mode: 0644]
LayoutTests/svg/webarchive/svg-feimage-subresources-expected.txt [new file with mode: 0644]
LayoutTests/svg/webarchive/svg-feimage-subresources.svg [new file with mode: 0644]
LayoutTests/svg/webarchive/svg-script-subresouces-expected.txt [new file with mode: 0644]
LayoutTests/svg/webarchive/svg-script-subresouces.svg [new file with mode: 0644]
LayoutTests/webarchive/test-xml-stylesheet-expected.txt
WebKit/ChangeLog
WebKit/DOM/WebDOMOperations.mm

index 2a80a36..c26e168 100644 (file)
@@ -2,6 +2,19 @@
 
         Reviewed by Oliver Hunt.
         
+        SVG Subresources will not be saved when creating WebArchives
+        http://bugs.webkit.org/show_bug.cgi?id=15280
+
+        * svg/webarchive/resources/green-checker.png: Added.
+        * svg/webarchive/resources/svg-script-subresources.js: Added.
+        * svg/webarchive/svg-cursor-subresources.svg: Added.
+        * svg/webarchive/svg-feimage-subresources.svg: Added.
+        * svg/webarchive/svg-script-subresouces.svg: Added.
+
+2007-10-01  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Oliver Hunt.
+        
         WebArchives do not embed stylesheets referenced by xml-stylesheeet
         http://bugs.webkit.org/show_bug.cgi?id=15320
 
diff --git a/LayoutTests/svg/webarchive/resources/green-checker.png b/LayoutTests/svg/webarchive/resources/green-checker.png
new file mode 100644 (file)
index 0000000..5f24d7c
Binary files /dev/null and b/LayoutTests/svg/webarchive/resources/green-checker.png differ
diff --git a/LayoutTests/svg/webarchive/resources/svg-script-subresources.js b/LayoutTests/svg/webarchive/resources/svg-script-subresources.js
new file mode 100644 (file)
index 0000000..b641ac1
--- /dev/null
@@ -0,0 +1 @@
+document.getElementById("rect").style.fill = "green";
\ No newline at end of file
diff --git a/LayoutTests/svg/webarchive/svg-cursor-subresources-expected.txt b/LayoutTests/svg/webarchive/svg-cursor-subresources-expected.txt
new file mode 100644 (file)
index 0000000..3e7db96
--- /dev/null
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5z
+               OnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICA8c2Ny
+               aXB0PgogICAgaWYgKHdpbmRvdy5sYXlvdXRUZXN0Q29udHJvbGxlcikKICAg
+               ICAgICBsYXlvdXRUZXN0Q29udHJvbGxlci5kdW1wRE9NQXNXZWJBcmNoaXZl
+               KCk7CiAgPC9zY3JpcHQ+CiAgPGN1cnNvciBpZD0ibXljdXJzb3IiIHhsaW5r
+               OmhyZWY9InJlc291cmNlcy9ncmVlbi1jaGVja2VyLnBuZyIvPgogIDxyZWN0
+               IHN0eWxlPSJjdXJzb3I6IHVybCgjbXljdXJzb3IpIiB3aWR0aD0iMTAwIiBo
+               ZWlnaHQ9IjEwMCIgZmlsbD0id2hpdGUiIHN0cm9rZT0iYmx1ZSIvPgogIAog
+               IDx0ZXh0IHg9IjEwIiB5PSIxMzAiPkhvdmVyIG92ZXIgdGhlIHJlY3QsIHlv
+               dSBzaG91bGQgc2VlIGEgKGxhcmdlKSBjdXN0b20gY3Vyc29yPC90ZXh0Pgo8
+               L3N2Zz4=
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>image/svg+xml</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/svg/webarchive/svg-cursor-subresources.svg</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       iVBORw0KGgoAAAANSUhEUgAAAfcAAAGaCAIAAACdfZ30AAAKdWlD
+                       Q1BJQ0MgUHJvZmlsZQAAeJyVlndQk+kWxs+XL5WEFhJ6Cb136UWq
+                       gNKLNFEpEVgCCRAUVC4qNsS+oqgIi1gRAaUp3YKFojQRaaKCymJB
+                       UBQBc/8Iu96de3d27vnrvGfmLc/vPO/MAaBIhnM4LAwAxCdwk3xd
+                       HBhBwSEMQh8ggAUqUAEbHpnMsff2doe/jdk+QAAAenTDORxWivn+
+                       tFTm+ARisN2zsN4b/ft9AAAglBQUHAKA6AAALZqf2wEALYKf+wMA
+                       bROXwwVAYgCAFhkTHgWAbAUAnSR/X0cA5BIACEXz8xsAIBTBzx8A
+                       gNDGyGguANIPgFITomITALDvAPC2UczkSACyDgBERSVHxgOQDwOA
+                       Xnw8OwqA3AwAGpGcJC4A+S0A6AYFhzD4T040AHCqBxBm/qyF3wQo
+                       zAXQ1PhZU34PIHUf4FTuz9qMLyAAgIg/Tt5gbAQAAAjFAQA3wuPN
+                       qAEQjgIsHuHx5s/yeItFAOgQQDMrMiVp4xIvBOkA+Kc1X/NSoAgA
+                       AigWTySRKULColQxuoSktIysvIKikoqquoaWto6evqGRsYmpuYWl
+                       tY2tnb2Dk7OLq9tKdw9Pbx9f/4DVQcEhoWvWrlsfHhHJ3BAdE/tL
+                       XHwCm5OYlMxN2ZSatnnL1vR/ZWzbkblz1+49e7P2Ze8/cPDQ4SNH
+                       fz2Wc/xE7slTp/PO5Bf8Vni26Nz5CxcuXrpcfKWk5GppWfm1a9cr
+                       Kquqq2tu3KytratvaGhsam6+dfvOnbst9+7df/DwYWtbW3vHo0eP
+                       Ozu7urt7enuf9PU9fdr/7NnA4ODQ8PDIyPPR0RcvX74aGxt//frN
+                       24mJ3ycn373/8OHj1KdP0zOfv8zOfv029/37/MLijx88QHEEogBZ
+                       UFiEKkYXl5SWkZNnKCqrqKlramnr6hkYGi8zMTO3sLK2WW5n7+jk
+                       vMLVbeUqD08vb1+/v+qPYm6Iif0ljhWfwOYkJnNTNv4EsP1/E/iJ
+                       4K8Mrl4tLSu/dv16RWVVdU3NjZu1dfX1DY1Nzbdu3b5zt6VliUB7
+                       R8ejx51dXd09Pb1P+vqe9vc/GxgYHBoeHnn+/E/1b/jq3/2H+iX5
+                       c9/nF/j6MSgWhyeSBMgUQSFhEVGqGI0uLiEpJS0jKyevwFBUUlZR
+                       VVPX0NTS1tHV0zcwNDJeZmJiamZuYWllbWO73M7ewdHJeYWLq9vK
+                       lavcPTy9vH18/fz9A1YHBgWHhK4JC1uiE8X3xxIgvkWWGP0BaYnS
+                       EqYlTnyr8EEtmeXc+QsXL12+XHyl5GppaVn5tesVlVVVf5qlsamp
+                       +Seo1rb2jkePu7p7ep887X82ODwy+vLV+JuJyXcfPs18+Tq38IMH
+                       wP/7AAB4U4AD+QCBTAAPDYDdtwE0FAGkXQC8BQH8LQAzYwyYoqeA
+                       FLoAigBg+H8LUCCCEIiDAmiBKTiBH0RBCuyB01AB7TAGPxApxBTx
+                       RdjIQaQM6URmMJIYWwwTcwRThxlHqehylIWeRtvQBaw+Nhybg23D
+                       oTg7XAauDvcNb4pPxlfgvxDMCGmERiKO6E7MIY6TLEi7SE8EVAU2
+                       Cjwky5OTyQ8pDEoqpUtQRzBPcFEoTKhRmCGcKfxWxEukQlROdI/o
+                       NHUttVNsuVgZTZl2ii5NPyOuJF4sYSRRJ+kq2S/1i9SC9GEZdZkG
+                       2QDZCbld8oryDQqhCouMQkU3xc9Kucr2yp9UClV91bBqVerRGgoa
+                       Q5pHtXy16dpPdE7qhutp6n3SbzQ4ZLjeyNiYYDy0rNEkx3STWYi5
+                       rYWSJd7yndUz61abOtuS5fl2x+yzHTIdtzvtcs5asd/loOspt9qV
+                       k+7iHgGe2V7N3nO+Fn6Z/u2r6YFrg8pCkNCgNTVrFdbtWv97hH9k
+                       D9NlQ2OMXWxrnA9rLGEjh55YmRyUgt1YnRq7WWHLm/TSjPTt7pky
+                       O9/v7t57c1/e/uyDOw9vOco+FnOcm3v81NAZi4JDhe/Prbhw+TLx
+                       StjVlnKV6/sqp2uCblbX0xtTm4fvWLfk3p9t9Wy/8mihK6Cn+Ml8
+                       v8tAztDzkboXpFc+4+ZvYifKJivft03Rpi0+G82mfbv1vXARy+P9
+                       2X88UIAK0qAC+mAFrhAI0bAJsiAPyqEFhuAzIoRoIk7IeiQdyUPq
+                       kWEMYFQwKzEczHFMI+YtSkPt0QT0DNqB8rBGWCb2FLYLJ4BzxKXj
+                       anFzeHP8JnwdAQjOhCxCN1GWGEOsIqEkP9J50ryAl8AFAR45hFxN
+                       EaNwKI8F9QWPCc4LRQq1CS8TzhehiKSJvBUNFm2n2lFrxPTFLtKU
+                       aIV0VXqxuLF4g4SbxBNJpuSc1CFpFekGmSCZadkDclpyrfKxCmSF
+                       a4xQRYJitVKUspjyfZUMVTPVKbVi9SgNNY1JzWKtjdrOOhSdEd0K
+                       vUz9EANTQ5rhjFGvcc2yIpN9pmlmLPN1Fj6WTlbm1pY2VrbWy23s
+                       HOzdHHwc1zklO+9dkedS5trq9n2ViTvLo8TzrbeiT4TvWb+ZAJvV
+                       uwO7gxVCEkJbwhTXbls3HG4WkRtFYrI3PI1xjW2K02VdSlBhFyVq
+                       J13kGqY0bfJKHdnM3SqaXpYRsG1ux+mddrum9lzMCskW3t91MPdw
+                       2FG5X4dyqk4cO5lx+uSZ0oJbhYNFHy7QLy0rDijZXHqm/N712SrN
+                       mnU3D9XdaVhotr29/e6Nez8eWrbt7njQSe9m9lb0LTxzGSwYnhp1
+                       e3lm7NMbn4nfJuc/BE41zSh9yfr6/vuahUEeb6n7JBADBuiDAwQC
+                       G7LgMnTBZ0QacUDikOPIXeQLRgOzFlOMGUOV0HD0LDqO1cZysLU4
+                       Ai4Zdw8vjU/A3ycoEdIJg0RrYgFJh5QjgAiwBZ6T/cj3KTaUSkFj
+                       wVGhcKEx4RjhjyKpoqjoYSqDWinmJjZK20qXozeLx0mISTRJsqVU
+                       pAakf5XxkhWQvSe3W36FAlHhMeO0YpySlTJZ+YVKnWqOWqK6i4au
+                       pqjmV61X2p06t3Sr9c7rFxoUGOYbFRgXLSs3qTZ9aDZkPmWJtZK0
+                       trQJs922/Jxdp/20o6rTGuecFY9dfriZrYxfddZ9wJPm5eWd4XPL
+                       D+/vFXBi9UCQdjA35PYaybDktT3rNcMzIyai/JhV0TIx+2MX41is
+                       VwlB7N5Ev6R2rmdK76bQ1NHNcVvm0w9kqGyr3eGe+XxX2h6ZvQ37
+                       QrJ5B64eCj2CP3rl2OrjgidqT/qems7LzncomCo8XxRxXvPC7KWG
+                       4iMlrFLnctlrHyvuVOXXcG561EnWv2msak65rX6nr2XvfeMHba0b
+                       2hY6Mh7NdSZ2jfX49Db00Z4y+6sH0EHnofThAyM7nheMtrwYf0Ua
+                       Ex+bGX/5+utbZILwu/AkMtn+Lv/9yQ9HP+6ZSv4UNK0xPTFT8fnE
+                       l82zQV9Nvgl/ez332/eQeaX56YXWxSs/ang8AP68CAAAAo5sFjuJ
+                       4e7o9A/D7f8b8ayUP+5AAIDCTAjwAwAqAMiCI7CBBWxIAga4gyM4
+                       AfBnVQAAvAhAnhYAwA2PpP86l8tM5QIAOLI5aUmx0TFchj2Hw2Iy
+                       HNnxnBQuM0mH4ZYQqafDMDIwMAEA+De3MZg3iGDaqQAACvZJREFU
+                       eJzt3MFuHFcSRFG20f//yaNZzMYDF8Sy9JTMujxnacih4CZQtvTy
+                       9ePHj49/+Ovjrx8fF//87/7z8Z/Xx+vnv2ZVzqoyp3JWlZnMWVVm
+                       MmdVmcmcVWVO5cyU+evn/zIAj2blAcqsPECZlQcos/IAZVYeoMzK
+                       A5RZeYCy1+Vft1/1cOBUzqoyp3JWlZnMWVVmMmdVmcmcVWVO5Zwq
+                       89nvAkCXlQcos/IAZVYeoMzKA5RZeYAyKw9QZuUByqw8QJmVB9jr
+                       04evn7LyAGXvyysKq049nMpZVeZUzqoykzmrykzmrCozmbOqzKmc
+                       379R8z8//118ywOUWXmAMisPUGblAcqsPECZlQcos/IAZVYe4Gv8
+                       /rvWO6w8QJmVByiz8gBlr8v7B6tOPZzKWVXmVM6qMpM5q8pM5qwq
+                       M5mzqsypnN+/UXMnx7c8QJmVByiz8gBlVh6gzMoD/BEzj54+ZeUB
+                       yqw8QJmVByiz8gBlVh6gzMoDlL0vjySsOvVwKmdVmVM5q8pM5qwq
+                       M5mzqsxkzqoyN3M+/QW/f6PmTo5veYAyKw/wry158XSHlQcos/IA
+                       ZVYeoMzKA5RZeYAyKw9QZuUByqw8QJmVByh7Xd4/eOLJiOQdjO/5
+                       Q93JWVVmMmdVmcmcyTIz52VOhXya41seoMzKA5RZeYAyKw9QZuUB
+                       yqw8QJmVByiz8gBlVh6gzMoD38idp6Qx78ufedXL5lM5q8qcyllV
+                       ZjJnVZnJnFVlJnMed73gTs5MGd/yAGVWHqDMygOUWXmAMisPUGbl
+                       AcqsPECZlQcos/JAxDd813qHlQcos/IAZa/L/8RZdb/iVM6qMqdy
+                       VpWZzFlVZjJnVZnJnMfdqLmTM1PGtzxAmZUHKLPyAGVWHqDMygOU
+                       WXmAMisPPIB3rb/MygOUWXmAMisPUGblAcrel3+msep+xamcVWVO
+                       5awqM5mzqsxkzqoykzmPu1FzJ2emjG95gDIrD1Bm5QHKrDzw9Tx6
+                       +nOsPECZlQcos/IAZVYeoMzKA5RZeYAyKw9Q9rr8W6qr7lecyllV
+                       5lTOqjKTOavKTOasKnMw59Nf8LgbNXdyZsr4lgf+LC+evpaVByiz
+                       8gBlVh6gzMoDlFl5gDIrD1Bm5QHKrDxAmZUHKLPywK+780afr/W+
+                       fHz8xDsY3/PyyaoykzmrykzmrCrzMXgW5nE3au7kzJTxLQ9QZuUB
+                       yqw8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1zzrrXBygOUWXmAstfl
+                       /YPHHfe4k7OqzKmcVWUmc1aVmcxJ3qi5k7OqzKmcmTK+5QHKrDxA
+                       mZUHKLPyAGVWHqDMygOUWXn4jrxr/T6sPECZlQcos/IAZVYeoOx9
+                       eSThccc97uSsKnMqZ1WZyZxVZSZzkjdq7uSsKnMqZ6aMb3mAMisP
+                       UGblAcqsPNR48cTfWXmAMisPUGblAcqsPECZlQcos/IAZa/Ll7GP
+                       e/Z9J2dVmVM5q8pM5qwqM5mTvF5wJ2dVmVM5M2V8ywOUWXmAMisP
+                       T+JdK/+WlQcos/IAZVYeoMzKA5RZeYAyKw9QZuUByqw8QNn78kjC
+                       44573MlZVeZUzqoykzmryhzMWXL5ZGHOqjKncmbK+JYHKLPyAGVW
+                       HqDMygOUWXmAMisPUGblAcqsPECZlQcos/Iw5M5DRzjOygOUvS4/
+                       L7Yd93D55BFlJnNWlbmZ86DLJwtzVpU5lTNTxrc8QJmVByiz8gBl
+                       Vh6gzMoDlFl5gDIrD1Bm5eEA71pZy8oDlFl5gDIrD1D2vvz/iU88
+                       EpK8fPI9f6g7OavKfOQunyzMWVXmVM5MGd/yAGVWHqDMygOUWXmA
+                       MisPn/DiiUez8gBlVh6gzMoDlFl5gDIrD1Bm5QHKXpd/SWzbkZDk
+                       5RM/1O/kJG/U3MlZVWYyZ1WZUzkzZXzLA5RZeYAyK8+35l0reVYe
+                       oMzKA5RZeYAyKw9QZuUByqw8QJmVByiz8gBl78tXIasulpzKWVXm
+                       VM6qMpM5yRs1d3JWlZnMWVXmVM5MGd/yZHnXCh9WHqDNygOUWXmA
+                       MisPUGblAcqsPECZlQcos/IAZVYeoMzK80h3nn0DHx8fr8tH4Ksu
+                       lpzKWVXmVM6qMpM5j7tYcipnVZnJnFVlTuXMlPEtD1Bm5QHKrDxA
+                       mZUHKLPyAGVWHqDMygOUWXk28ugJTrHyAGVWHqDsffl8dtVb9lM5
+                       q8qcyllV5mCOh/6PKDOZs6rMqZyZMr7lAcqsPECZlQcos/IAZVYe
+                       oMzKA5RZeaZ51wqTrDxAmZUHKLPyAGVWHqDsdXn/4ImXTz7NWVXm
+                       VM6qMjdznHP5nZxVZSZzVpU5lTNTxrc8QJmVByiz8gBlVp6TvHiC
+                       baw8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1D2vjySsO3yyZGcVWVO
+                       5awq8+Gcy5/PWVVmMmdVmVM5M2V8ywOUWXnu8q4VnsjKA5RZeYAy
+                       Kw9QZuUByqw8QJmVByiz8gBlVh6gzMoDlL0u7x887pzLnZxVZU7l
+                       nCqz6rjHnZxVZSZzVpWZzFlV5lTOTBnf8gBlVh6gzMoDlFl5gDIr
+                       D1Bm5QHKrDxAmZUHKLPyAGVWvu/O2zmgysoDlL0vP/Qed87lTs6q
+                       Mqdykjdq7uSsKjOZs6rMZM6qMqdyZsr4lgcos/IAZVYeoMzKA5RZ
+                       eYAyKw9QZuWfzYsn4OesPECZlQcos/IAZVYeoOx1+ad3jzvncidn
+                       VZlTOauOckzmrCozmbOqzGTOqjKncmbK+JYHKLPyAGVWHqDMyq/m
+                       0RPwm6w8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1D2vvwb2Y8753In
+                       Z1WZmzlL7mAszFlVZjJnVZnJnFVlTuXMlPEtD1Bm5b+Md63AACsP
+                       UGblAcqsPECZlQcos/IAZVYeoMzKA5RZeYCy1+XTnG0P/Y/krCrz
+                       8agX0gtzVpWZzFlVZjJnVZlTOTNlfMv/Ed61AktYeYAyKw9QZuUB
+                       yqw8QJmVByiz8gBlVh6gzMoDlFl5gDIr/6/deZQMsMT78i3+427U
+                       3Mk5VeYb3sFYmLOqzGTOqjKTOavKnMqZKeNbHqDMygOUWXmAMisP
+                       UGblAcqsPECZlQcos/L/x4snIMbKA5RZeYAyKw9Q9rq8f/C4GzV3
+                       ch53o+ZOzqoykzmrykzmrCozmbOqzKmcmTK+5QHKrDxAmZUHKLPy
+                       AGVWHqDsG628d63AN/SNVh7gG7LyAGVWHqDMygOUWXmAsvflkYTH
+                       3ai5k7PqfsWpnFVlJnNWlZnMWVVmMmdVmVM5M2V8ywOUWXmAss7K
+                       e/QE8E+dlQfgn6w8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1D2urx/
+                       8LgbNR9rTkYM56wqM5mzqsxkzqoykzmrypzKmSnzjG9571oBfs0z
+                       Vh6AX2PlAcqsPECZlQcos/IAZVYeoMzKA5RZeYAyKw9Q9vUrf+f9
+                       LgC/5n05spM3amInI4ZzVpWZzFlVZjJnVZnJnFVlTuXMlPn6b3kA
+                       /hwrD1Bm5QHKrDxAmZUHKLPyAGVWHqDMygOU/dmV964V4Gv5lgco
+                       e11+bT/uesGdnFVlTuWsKjOZs6rMZM6qMpM5q8qcypkp41seoMzK
+                       A5RZeYAyKw9QZuUByqw8QNmvr7wXTwD7+ZYHKLPyAGVWHqDMygOU
+                       vS//EPVxN2ru5KwqcypnVZnJnFVlJnNWlZnMWVXmVM5MGd/yAGVW
+                       HqDMygOUWXmAsuuV964VoMG3PECZlQcos/IAZVYeoOy/gUgXlmdE
+                       X6wAAAAASUVORK5CYII=
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/png</string>
+                       <key>WebResourceResponse</key>
+                       <dict>
+                               <key>MIMEType</key>
+                               <string>image/png</string>
+                               <key>URL</key>
+                               <string>file:///LayoutTests/svg/webarchive/resources/green-checker.png</string>
+                               <key>expectedContentLength</key>
+                               <integer>5552</integer>
+                       </dict>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/svg/webarchive/resources/green-checker.png</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/svg/webarchive/svg-cursor-subresources.svg b/LayoutTests/svg/webarchive/svg-cursor-subresources.svg
new file mode 100644 (file)
index 0000000..06550c0
--- /dev/null
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <script>
+    if (window.layoutTestController)
+        layoutTestController.dumpDOMAsWebArchive();
+  </script>
+  <cursor id="mycursor" xlink:href="resources/green-checker.png" />
+  <rect style="cursor: url(#mycursor)" width="100" height="100" fill="white" stroke="blue" />
+  
+  <text x="10" y="130">Hover over the rect, you should see a (large) custom cursor</text>
+</svg>
diff --git a/LayoutTests/svg/webarchive/svg-feimage-subresources-expected.txt b/LayoutTests/svg/webarchive/svg-feimage-subresources-expected.txt
new file mode 100644 (file)
index 0000000..affdf0c
--- /dev/null
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5z
+               OnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICA8c2Ny
+               aXB0PgogICAgaWYgKHdpbmRvdy5sYXlvdXRUZXN0Q29udHJvbGxlcikKICAg
+               ICAgICBsYXlvdXRUZXN0Q29udHJvbGxlci5kdW1wRE9NQXNXZWJBcmNoaXZl
+               KCk7CiAgPC9zY3JpcHQ+CiAgPGZpbHRlciBpZD0iTXlGaWx0ZXIiPgogICAg
+               PGZlSW1hZ2UgeGxpbms6aHJlZj0icmVzb3VyY2VzL2dyZWVuLWNoZWNrZXIu
+               cG5nIi8+CiAgPC9maWx0ZXI+CiAgPHJlY3QgaWQ9InJlY3QiIHdpZHRoPSIx
+               MDAiIGhlaWdodD0iMTAwIiBmaWxsPSJyZWQiIGZpbHRlcj0idXJsKCNNeUZp
+               bHRlcikiLz4KPC9zdmc+
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>image/svg+xml</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/svg/webarchive/svg-feimage-subresources.svg</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <data>
+                       iVBORw0KGgoAAAANSUhEUgAAAfcAAAGaCAIAAACdfZ30AAAKdWlD
+                       Q1BJQ0MgUHJvZmlsZQAAeJyVlndQk+kWxs+XL5WEFhJ6Cb136UWq
+                       gNKLNFEpEVgCCRAUVC4qNsS+oqgIi1gRAaUp3YKFojQRaaKCymJB
+                       UBQBc/8Iu96de3d27vnrvGfmLc/vPO/MAaBIhnM4LAwAxCdwk3xd
+                       HBhBwSEMQh8ggAUqUAEbHpnMsff2doe/jdk+QAAAenTDORxWivn+
+                       tFTm+ARisN2zsN4b/ft9AAAglBQUHAKA6AAALZqf2wEALYKf+wMA
+                       bROXwwVAYgCAFhkTHgWAbAUAnSR/X0cA5BIACEXz8xsAIBTBzx8A
+                       gNDGyGguANIPgFITomITALDvAPC2UczkSACyDgBERSVHxgOQDwOA
+                       Xnw8OwqA3AwAGpGcJC4A+S0A6AYFhzD4T040AHCqBxBm/qyF3wQo
+                       zAXQ1PhZU34PIHUf4FTuz9qMLyAAgIg/Tt5gbAQAAAjFAQA3wuPN
+                       qAEQjgIsHuHx5s/yeItFAOgQQDMrMiVp4xIvBOkA+Kc1X/NSoAgA
+                       AigWTySRKULColQxuoSktIysvIKikoqquoaWto6evqGRsYmpuYWl
+                       tY2tnb2Dk7OLq9tKdw9Pbx9f/4DVQcEhoWvWrlsfHhHJ3BAdE/tL
+                       XHwCm5OYlMxN2ZSatnnL1vR/ZWzbkblz1+49e7P2Ze8/cPDQ4SNH
+                       fz2Wc/xE7slTp/PO5Bf8Vni26Nz5CxcuXrpcfKWk5GppWfm1a9cr
+                       Kquqq2tu3KytratvaGhsam6+dfvOnbst9+7df/DwYWtbW3vHo0eP
+                       Ozu7urt7enuf9PU9fdr/7NnA4ODQ8PDIyPPR0RcvX74aGxt//frN
+                       24mJ3ycn373/8OHj1KdP0zOfv8zOfv029/37/MLijx88QHEEogBZ
+                       UFiEKkYXl5SWkZNnKCqrqKlramnr6hkYGi8zMTO3sLK2WW5n7+jk
+                       vMLVbeUqD08vb1+/v+qPYm6Iif0ljhWfwOYkJnNTNv4EsP1/E/iJ
+                       4K8Mrl4tLSu/dv16RWVVdU3NjZu1dfX1DY1Nzbdu3b5zt6VliUB7
+                       R8ejx51dXd09Pb1P+vqe9vc/GxgYHBoeHnn+/E/1b/jq3/2H+iX5
+                       c9/nF/j6MSgWhyeSBMgUQSFhEVGqGI0uLiEpJS0jKyevwFBUUlZR
+                       VVPX0NTS1tHV0zcwNDJeZmJiamZuYWllbWO73M7ewdHJeYWLq9vK
+                       lavcPTy9vH18/fz9A1YHBgWHhK4JC1uiE8X3xxIgvkWWGP0BaYnS
+                       EqYlTnyr8EEtmeXc+QsXL12+XHyl5GppaVn5tesVlVVVf5qlsamp
+                       +Seo1rb2jkePu7p7ep887X82ODwy+vLV+JuJyXcfPs18+Tq38IMH
+                       wP/7AAB4U4AD+QCBTAAPDYDdtwE0FAGkXQC8BQH8LQAzYwyYoqeA
+                       FLoAigBg+H8LUCCCEIiDAmiBKTiBH0RBCuyB01AB7TAGPxApxBTx
+                       RdjIQaQM6URmMJIYWwwTcwRThxlHqehylIWeRtvQBaw+Nhybg23D
+                       oTg7XAauDvcNb4pPxlfgvxDMCGmERiKO6E7MIY6TLEi7SE8EVAU2
+                       Cjwky5OTyQ8pDEoqpUtQRzBPcFEoTKhRmCGcKfxWxEukQlROdI/o
+                       NHUttVNsuVgZTZl2ii5NPyOuJF4sYSRRJ+kq2S/1i9SC9GEZdZkG
+                       2QDZCbld8oryDQqhCouMQkU3xc9Kucr2yp9UClV91bBqVerRGgoa
+                       Q5pHtXy16dpPdE7qhutp6n3SbzQ4ZLjeyNiYYDy0rNEkx3STWYi5
+                       rYWSJd7yndUz61abOtuS5fl2x+yzHTIdtzvtcs5asd/loOspt9qV
+                       k+7iHgGe2V7N3nO+Fn6Z/u2r6YFrg8pCkNCgNTVrFdbtWv97hH9k
+                       D9NlQ2OMXWxrnA9rLGEjh55YmRyUgt1YnRq7WWHLm/TSjPTt7pky
+                       O9/v7t57c1/e/uyDOw9vOco+FnOcm3v81NAZi4JDhe/Prbhw+TLx
+                       StjVlnKV6/sqp2uCblbX0xtTm4fvWLfk3p9t9Wy/8mihK6Cn+Ml8
+                       v8tAztDzkboXpFc+4+ZvYifKJivft03Rpi0+G82mfbv1vXARy+P9
+                       2X88UIAK0qAC+mAFrhAI0bAJsiAPyqEFhuAzIoRoIk7IeiQdyUPq
+                       kWEMYFQwKzEczHFMI+YtSkPt0QT0DNqB8rBGWCb2FLYLJ4BzxKXj
+                       anFzeHP8JnwdAQjOhCxCN1GWGEOsIqEkP9J50ryAl8AFAR45hFxN
+                       EaNwKI8F9QWPCc4LRQq1CS8TzhehiKSJvBUNFm2n2lFrxPTFLtKU
+                       aIV0VXqxuLF4g4SbxBNJpuSc1CFpFekGmSCZadkDclpyrfKxCmSF
+                       a4xQRYJitVKUspjyfZUMVTPVKbVi9SgNNY1JzWKtjdrOOhSdEd0K
+                       vUz9EANTQ5rhjFGvcc2yIpN9pmlmLPN1Fj6WTlbm1pY2VrbWy23s
+                       HOzdHHwc1zklO+9dkedS5trq9n2ViTvLo8TzrbeiT4TvWb+ZAJvV
+                       uwO7gxVCEkJbwhTXbls3HG4WkRtFYrI3PI1xjW2K02VdSlBhFyVq
+                       J13kGqY0bfJKHdnM3SqaXpYRsG1ux+mddrum9lzMCskW3t91MPdw
+                       2FG5X4dyqk4cO5lx+uSZ0oJbhYNFHy7QLy0rDijZXHqm/N712SrN
+                       mnU3D9XdaVhotr29/e6Nez8eWrbt7njQSe9m9lb0LTxzGSwYnhp1
+                       e3lm7NMbn4nfJuc/BE41zSh9yfr6/vuahUEeb6n7JBADBuiDAwQC
+                       G7LgMnTBZ0QacUDikOPIXeQLRgOzFlOMGUOV0HD0LDqO1cZysLU4
+                       Ai4Zdw8vjU/A3ycoEdIJg0RrYgFJh5QjgAiwBZ6T/cj3KTaUSkFj
+                       wVGhcKEx4RjhjyKpoqjoYSqDWinmJjZK20qXozeLx0mISTRJsqVU
+                       pAakf5XxkhWQvSe3W36FAlHhMeO0YpySlTJZ+YVKnWqOWqK6i4au
+                       pqjmV61X2p06t3Sr9c7rFxoUGOYbFRgXLSs3qTZ9aDZkPmWJtZK0
+                       trQJs922/Jxdp/20o6rTGuecFY9dfriZrYxfddZ9wJPm5eWd4XPL
+                       D+/vFXBi9UCQdjA35PYaybDktT3rNcMzIyai/JhV0TIx+2MX41is
+                       VwlB7N5Ev6R2rmdK76bQ1NHNcVvm0w9kqGyr3eGe+XxX2h6ZvQ37
+                       QrJ5B64eCj2CP3rl2OrjgidqT/qems7LzncomCo8XxRxXvPC7KWG
+                       4iMlrFLnctlrHyvuVOXXcG561EnWv2msak65rX6nr2XvfeMHba0b
+                       2hY6Mh7NdSZ2jfX49Db00Z4y+6sH0EHnofThAyM7nheMtrwYf0Ua
+                       Ex+bGX/5+utbZILwu/AkMtn+Lv/9yQ9HP+6ZSv4UNK0xPTFT8fnE
+                       l82zQV9Nvgl/ez332/eQeaX56YXWxSs/ang8AP68CAAAAo5sFjuJ
+                       4e7o9A/D7f8b8ayUP+5AAIDCTAjwAwAqAMiCI7CBBWxIAga4gyM4
+                       AfBnVQAAvAhAnhYAwA2PpP86l8tM5QIAOLI5aUmx0TFchj2Hw2Iy
+                       HNnxnBQuM0mH4ZYQqafDMDIwMAEA+De3MZg3iGDaqQAACvZJREFU
+                       eJzt3MFuHFcSRFG20f//yaNZzMYDF8Sy9JTMujxnacih4CZQtvTy
+                       9ePHj49/+Ovjrx8fF//87/7z8Z/Xx+vnv2ZVzqoyp3JWlZnMWVVm
+                       MmdVmcmcVWVO5cyU+evn/zIAj2blAcqsPECZlQcos/IAZVYeoMzK
+                       A5RZeYCy1+Vft1/1cOBUzqoyp3JWlZnMWVVmMmdVmcmcVWVO5Zwq
+                       89nvAkCXlQcos/IAZVYeoMzKA5RZeYAyKw9QZuUByqw8QJmVB9jr
+                       04evn7LyAGXvyysKq049nMpZVeZUzqoykzmrykzmrCozmbOqzKmc
+                       379R8z8//118ywOUWXmAMisPUGblAcqsPECZlQcos/IAZVYe4Gv8
+                       /rvWO6w8QJmVByiz8gBlr8v7B6tOPZzKWVXmVM6qMpM5q8pM5qwq
+                       M5mzqsypnN+/UXMnx7c8QJmVByiz8gBlVh6gzMoD/BEzj54+ZeUB
+                       yqw8QJmVByiz8gBlVh6gzMoDlL0vjySsOvVwKmdVmVM5q8pM5qwq
+                       M5mzqsxkzqoyN3M+/QW/f6PmTo5veYAyKw/wry158XSHlQcos/IA
+                       ZVYeoMzKA5RZeYAyKw9QZuUByqw8QJmVByh7Xd4/eOLJiOQdjO/5
+                       Q93JWVVmMmdVmcmcyTIz52VOhXya41seoMzKA5RZeYAyKw9QZuUB
+                       yqw8QJmVByiz8gBlVh6gzMoD38idp6Qx78ufedXL5lM5q8qcyllV
+                       ZjJnVZnJnFVlJnMed73gTs5MGd/yAGVWHqDMygOUWXmAMisPUGbl
+                       AcqsPECZlQcos/JAxDd813qHlQcos/IAZa/L/8RZdb/iVM6qMqdy
+                       VpWZzFlVZjJnVZnJnMfdqLmTM1PGtzxAmZUHKLPyAGVWHqDMygOU
+                       WXmAMisPPIB3rb/MygOUWXmAMisPUGblAcrel3+msep+xamcVWVO
+                       5awqM5mzqsxkzqoykzmPu1FzJ2emjG95gDIrD1Bm5QHKrDzw9Tx6
+                       +nOsPECZlQcos/IAZVYeoMzKA5RZeYAyKw9Q9rr8W6qr7lecyllV
+                       5lTOqjKTOavKTOasKnMw59Nf8LgbNXdyZsr4lgf+LC+evpaVByiz
+                       8gBlVh6gzMoDlFl5gDIrD1Bm5QHKrDxAmZUHKLPywK+780afr/W+
+                       fHz8xDsY3/PyyaoykzmrykzmrCrzMXgW5nE3au7kzJTxLQ9QZuUB
+                       yqw8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1zzrrXBygOUWXmAstfl
+                       /YPHHfe4k7OqzKmcVWUmc1aVmcxJ3qi5k7OqzKmcmTK+5QHKrDxA
+                       mZUHKLPyAGVWHqDMygOUWXn4jrxr/T6sPECZlQcos/IAZVYeoOx9
+                       eSThccc97uSsKnMqZ1WZyZxVZSZzkjdq7uSsKnMqZ6aMb3mAMisP
+                       UGblAcqsPNR48cTfWXmAMisPUGblAcqsPECZlQcos/IAZa/Ll7GP
+                       e/Z9J2dVmVM5q8pM5qwqM5mTvF5wJ2dVmVM5M2V8ywOUWXmAMisP
+                       T+JdK/+WlQcos/IAZVYeoMzKA5RZeYAyKw9QZuUByqw8QNn78kjC
+                       44573MlZVeZUzqoykzmryhzMWXL5ZGHOqjKncmbK+JYHKLPyAGVW
+                       HqDMygOUWXmAMisPUGblAcqsPECZlQcos/Iw5M5DRzjOygOUvS4/
+                       L7Yd93D55BFlJnNWlbmZ86DLJwtzVpU5lTNTxrc8QJmVByiz8gBl
+                       Vh6gzMoDlFl5gDIrD1Bm5eEA71pZy8oDlFl5gDIrD1D2vvz/iU88
+                       EpK8fPI9f6g7OavKfOQunyzMWVXmVM5MGd/yAGVWHqDMygOUWXmA
+                       MisPn/DiiUez8gBlVh6gzMoDlFl5gDIrD1Bm5QHKXpd/SWzbkZDk
+                       5RM/1O/kJG/U3MlZVWYyZ1WZUzkzZXzLA5RZeYAyK8+35l0reVYe
+                       oMzKA5RZeYAyKw9QZuUByqw8QJmVByiz8gBl78tXIasulpzKWVXm
+                       VM6qMpM5yRs1d3JWlZnMWVXmVM5MGd/yZHnXCh9WHqDNygOUWXmA
+                       MisPUGblAcqsPECZlQcos/IAZVYeoMzK80h3nn0DHx8fr8tH4Ksu
+                       lpzKWVXmVM6qMpM5j7tYcipnVZnJnFVlTuXMlPEtD1Bm5QHKrDxA
+                       mZUHKLPyAGVWHqDMygOUWXk28ugJTrHyAGVWHqDsffl8dtVb9lM5
+                       q8qcyllV5mCOh/6PKDOZs6rMqZyZMr7lAcqsPECZlQcos/IAZVYe
+                       oMzKA5RZeaZ51wqTrDxAmZUHKLPyAGVWHqDsdXn/4ImXTz7NWVXm
+                       VM6qMjdznHP5nZxVZSZzVpU5lTNTxrc8QJmVByiz8gBlVp6TvHiC
+                       baw8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1D2vjySsO3yyZGcVWVO
+                       5awq8+Gcy5/PWVVmMmdVmVM5M2V8ywOUWXnu8q4VnsjKA5RZeYAy
+                       Kw9QZuUByqw8QJmVByiz8gBlVh6gzMoDlL0u7x887pzLnZxVZU7l
+                       nCqz6rjHnZxVZSZzVpWZzFlV5lTOTBnf8gBlVh6gzMoDlFl5gDIr
+                       D1Bm5QHKrDxAmZUHKLPyAGVWvu/O2zmgysoDlL0vP/Qed87lTs6q
+                       Mqdykjdq7uSsKjOZs6rMZM6qMqdyZsr4lgcos/IAZVYeoMzKA5RZ
+                       eYAyKw9QZuWfzYsn4OesPECZlQcos/IAZVYeoOx1+ad3jzvncidn
+                       VZlTOauOckzmrCozmbOqzGTOqjKncmbK+JYHKLPyAGVWHqDMyq/m
+                       0RPwm6w8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1D2vvwb2Y8753In
+                       Z1WZmzlL7mAszFlVZjJnVZnJnFVlTuXMlPEtD1Bm5b+Md63AACsP
+                       UGblAcqsPECZlQcos/IAZVYeoMzKA5RZeYCy1+XTnG0P/Y/krCrz
+                       8agX0gtzVpWZzFlVZjJnVZlTOTNlfMv/Ed61AktYeYAyKw9QZuUB
+                       yqw8QJmVByiz8gBlVh6gzMoDlFl5gDIr/6/deZQMsMT78i3+427U
+                       3Mk5VeYb3sFYmLOqzGTOqjKTOavKnMqZKeNbHqDMygOUWXmAMisP
+                       UGblAcqsPECZlQcos/L/x4snIMbKA5RZeYAyKw9Q9rq8f/C4GzV3
+                       ch53o+ZOzqoykzmrykzmrCozmbOqzKmcmTK+5QHKrDxAmZUHKLPy
+                       AGVWHqDsG628d63AN/SNVh7gG7LyAGVWHqDMygOUWXmAsvflkYTH
+                       3ai5k7PqfsWpnFVlJnNWlZnMWVVmMmdVmVM5M2V8ywOUWXmAss7K
+                       e/QE8E+dlQfgn6w8QJmVByiz8gBlVh6gzMoDlFl5gDIrD1D2urx/
+                       8LgbNR9rTkYM56wqM5mzqsxkzqoykzmrypzKmSnzjG9571oBfs0z
+                       Vh6AX2PlAcqsPECZlQcos/IAZVYeoMzKA5RZeYAyKw9Q9vUrf+f9
+                       LgC/5n05spM3amInI4ZzVpWZzFlVZjJnVZnJnFVlTuXMlPn6b3kA
+                       /hwrD1Bm5QHKrDxAmZUHKLPyAGVWHqDMygOU/dmV964V4Gv5lgco
+                       e11+bT/uesGdnFVlTuWsKjOZs6rMZM6qMpM5q8qcypkp41seoMzK
+                       A5RZeYAyKw9QZuUByqw8QNmvr7wXTwD7+ZYHKLPyAGVWHqDMygOU
+                       vS//EPVxN2ru5KwqcypnVZnJnFVlJnNWlZnMWVXmVM5MGd/yAGVW
+                       HqDMygOUWXmAsuuV964VoMG3PECZlQcos/IAZVYeoOy/gUgXlmdE
+                       X6wAAAAASUVORK5CYII=
+                       </data>
+                       <key>WebResourceMIMEType</key>
+                       <string>image/png</string>
+                       <key>WebResourceResponse</key>
+                       <dict>
+                               <key>MIMEType</key>
+                               <string>image/png</string>
+                               <key>URL</key>
+                               <string>file:///LayoutTests/svg/webarchive/resources/green-checker.png</string>
+                               <key>expectedContentLength</key>
+                               <integer>5552</integer>
+                       </dict>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/svg/webarchive/resources/green-checker.png</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/svg/webarchive/svg-feimage-subresources.svg b/LayoutTests/svg/webarchive/svg-feimage-subresources.svg
new file mode 100644 (file)
index 0000000..09ee5ba
--- /dev/null
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <script>
+    if (window.layoutTestController)
+        layoutTestController.dumpDOMAsWebArchive();
+  </script>
+  <filter id="MyFilter">
+    <feImage xlink:href="resources/green-checker.png" />
+  </filter>
+  <rect id="rect" width="100" height="100" fill="red" filter="url(#MyFilter)"/>
+</svg>
diff --git a/LayoutTests/svg/webarchive/svg-script-subresouces-expected.txt b/LayoutTests/svg/webarchive/svg-script-subresouces-expected.txt
new file mode 100644 (file)
index 0000000..204fbb3
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5z
+               OnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICA8c2Ny
+               aXB0PgogICAgaWYgKHdpbmRvdy5sYXlvdXRUZXN0Q29udHJvbGxlcikKICAg
+               ICAgICBsYXlvdXRUZXN0Q29udHJvbGxlci5kdW1wRE9NQXNXZWJBcmNoaXZl
+               KCk7CiAgPC9zY3JpcHQ+CiAgPHJlY3QgaWQ9InJlY3QiIHdpZHRoPSIxMDAi
+               IGhlaWdodD0iMTAwIiBmaWxsPSJyZWQiIHN0eWxlPSI6ICMwMDgwMDA7ICIv
+               PgogIDxzY3JpcHQgeGxpbms6aHJlZj0icmVzb3VyY2VzL3N2Zy1zY3JpcHQt
+               c3VicmVzb3VyY2VzLmpzIiB0eXBlPSJ0ZXh0L2VjbWFzY3JpcHQiLz4KPC9z
+               dmc+
+               </data>
+               <key>WebResourceFrameName</key>
+               <string></string>
+               <key>WebResourceMIMEType</key>
+               <string>image/svg+xml</string>
+               <key>WebResourceTextEncodingName</key>
+               <string>UTF-8</string>
+               <key>WebResourceURL</key>
+               <string>file:///LayoutTests/svg/webarchive/svg-script-subresouces.svg</string>
+       </dict>
+       <key>WebSubresources</key>
+       <array>
+               <dict>
+                       <key>WebResourceData</key>
+                       <string>document.getElementById("rect").style.fill = "green";</string>
+                       <key>WebResourceMIMEType</key>
+                       <string>text/javascript</string>
+                       <key>WebResourceResponse</key>
+                       <dict>
+                               <key>MIMEType</key>
+                               <string>text/javascript</string>
+                               <key>URL</key>
+                               <string>file:///LayoutTests/svg/webarchive/resources/svg-script-subresources.js</string>
+                               <key>expectedContentLength</key>
+                               <integer>53</integer>
+                       </dict>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/svg/webarchive/resources/svg-script-subresources.js</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/svg/webarchive/svg-script-subresouces.svg b/LayoutTests/svg/webarchive/svg-script-subresouces.svg
new file mode 100644 (file)
index 0000000..283f6f5
--- /dev/null
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <script>
+    if (window.layoutTestController)
+        layoutTestController.dumpDOMAsWebArchive();
+  </script>
+  <rect id="rect" width="100" height="100" fill="red" />
+  <script xlink:href="resources/svg-script-subresources.js" type="text/ecmascript" />
+</svg>
index 8e62e8e..d86ecb3 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
        <key>WebMainResource</key>
                        <key>WebResourceMIMEType</key>
                        <string>text/css</string>
                        <key>WebResourceResponse</key>
-                       <data>
-                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
-                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
-                       E1dlYlJlc291cmNlUmVzcG9uc2WAAaQLDBscVSRudWxs1w0ODxAR
-                       EhMUFRYXGBkVUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYACgAAQ
-                       HxAHgAMjf+////////+AAFh0ZXh0L2Nzc9IdHh8gWCRjbGFzc2Vz
-                       WiRjbGFzc25hbWWiICFdTlNVUkxSZXNwb25zZVhOU09iamVjdAgR
-                       GyQpMkRJTGJkaW9+gYSHipGUl5mbnZ+hqqy1usPO0d8AAAAAAAAB
-                       AQAAAAAAAAAiAAAAAAAAAAAAAAAAAAAA6A==
-                       </data>
+                       <dict>
+                               <key>MIMEType</key>
+                               <string>text/css</string>
+                               <key>URL</key>
+                               <string>file:///LayoutTests/webarchive/resources/test-xml-stylesheet.css</string>
+                               <key>expectedContentLength</key>
+                               <integer>31</integer>
+                       </dict>
                        <key>WebResourceURL</key>
                        <string>file:///LayoutTests/webarchive/resources/test-xml-stylesheet.css</string>
                </dict>
index 22b8a63..f664997 100644 (file)
@@ -2,6 +2,22 @@
 
         Reviewed by Oliver Hunt.
         
+        SVG Subresources will not be saved when creating WebArchives
+        http://bugs.webkit.org/show_bug.cgi?id=15280
+        
+        Implement _subresourceURLs methods for more SVGElement types
+        more such methods will be needed as we add support for other
+        external references (such as use, mpath, tref, etc.)
+
+        * DOM/WebDOMOperations.mm:
+        (-[DOMSVGScriptElement _subresourceURLs]): added.
+        (-[DOMSVGCursorElement _subresourceURLs]): added.
+        (-[DOMSVGFEImageElement _subresourceURLs]): added.
+
+2007-10-01  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Oliver Hunt.
+        
         WebArchives do not embed stylesheets referenced by xml-stylesheeet
         http://bugs.webkit.org/show_bug.cgi?id=15320
 
index 6ed4650..ce9088b 100644 (file)
 
 @end
 
+@implementation DOMSVGScriptElement (WebDOMSVGScriptElementOperationsPrivate)
+
+- (NSArray *)_subresourceURLs
+{
+    return [self _URLsFromSelectors:@selector(href), nil];
+}
+
+@end
+
+@implementation DOMSVGCursorElement (WebDOMSVGCursorElementOperationsPrivate)
+
+- (NSArray *)_subresourceURLs
+{
+    return [self _URLsFromSelectors:@selector(href), nil];
+}
+
+@end
+
+@implementation DOMSVGFEImageElement (WebDOMSVGFEImageElementOperationsPrivate)
+
+- (NSArray *)_subresourceURLs
+{
+    return [self _URLsFromSelectors:@selector(href), nil];
+}
+
+@end
+
 #endif
 
 @implementation DOMProcessingInstruction (WebDOMProcessingInstructionOperationsPrivate)