2007-09-28 Eric Seidel <eric@webkit.org>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2007 14:07:59 +0000 (14:07 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2007 14:07:59 +0000 (14:07 +0000)
        Reviewed by Sam Wenig.

        ASSERT when dragging <svg:image> with non-null prefix
        http://bugs.webkit.org/show_bug.cgi?id=15308

        * bindings/objc/DOM.mm:
        (WebCore::lookupElementClass): added
        (WebCore::elementClass): use new lookupElementClass function

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

LayoutTests/ChangeLog
LayoutTests/svg/custom/image-with-prefix-in-webarchive-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/image-with-prefix-in-webarchive.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bindings/objc/DOM.mm

index 33254dec7cc6974143160929a852f3085a520f80..93fb3d85fb8f9845bf6d853a4913f317fe4fa857 100644 (file)
@@ -1,3 +1,13 @@
+2007-09-28  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Sam Wenig.
+        
+        Elements with a prefix cause ASSERT when creating WebArchive
+        http://bugs.webkit.org/show_bug.cgi?id=15308
+
+        * svg/custom/image-with-prefix-in-webarchive-expected.txt: Added.
+        * svg/custom/image-with-prefix-in-webarchive.svg: Added.
+
 2007-09-09  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Oliver.
diff --git a/LayoutTests/svg/custom/image-with-prefix-in-webarchive-expected.txt b/LayoutTests/svg/custom/image-with-prefix-in-webarchive-expected.txt
new file mode 100644 (file)
index 0000000..75d098d
--- /dev/null
@@ -0,0 +1,193 @@
+<?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">
+<plist version="1.0">
+<dict>
+       <key>WebMainResource</key>
+       <dict>
+               <key>WebResourceData</key>
+               <data>
+               PHN2ZzpzdmcgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2
+               ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsi
+               PgogPHN2ZzpzY3JpcHQ+CiAgICBpZiAod2luZG93LmxheW91dFRlc3RDb250
+               cm9sbGVyKQogICAgICAgIGxheW91dFRlc3RDb250cm9sbGVyLmR1bXBET01B
+               c1dlYkFyY2hpdmUoKTsKICA8L3N2ZzpzY3JpcHQ+CiAgPHN2ZzppbWFnZSB4
+               bGluazpocmVmPSJyZXNvdXJjZXMvZ3JlZW4tY2hlY2tlci5wbmciIHdpZHRo
+               PSIxMDAiIGhlaWdodD0iMTAwIi8+Cjwvc3ZnOnN2Zz4=
+               </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/custom/image-with-prefix-in-webarchive.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>
+                       <data>
+                       YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0
+                       b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
+                       E1dlYlJlc291cmNlUmVzcG9uc2WAAaQLDBscVSRudWxs1w0ODxAR
+                       EhMUFRYXGBkVUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYACgAAR
+                       FbAQB4ADI3/v////////gABZaW1hZ2UvcG5n0h0eHyBYJGNsYXNz
+                       ZXNaJGNsYXNzbmFtZaIgIV1OU1VSTFJlc3BvbnNlWE5TT2JqZWN0
+                       CBEbJCkyRElMYmRpb36BhIeKkZSXmZueoKKrrbe8xdDT4QAAAAAA
+                       AAEBAAAAAAAAACIAAAAAAAAAAAAAAAAAAADq
+                       </data>
+                       <key>WebResourceURL</key>
+                       <string>file:///LayoutTests/svg/custom/resources/green-checker.png</string>
+               </dict>
+       </array>
+</dict>
+</plist>
diff --git a/LayoutTests/svg/custom/image-with-prefix-in-webarchive.svg b/LayoutTests/svg/custom/image-with-prefix-in-webarchive.svg
new file mode 100644 (file)
index 0000000..f6b95dc
--- /dev/null
@@ -0,0 +1,8 @@
+<svg:svg xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+ <svg:script>
+    if (window.layoutTestController)
+        layoutTestController.dumpDOMAsWebArchive();
+  </svg:script>
+  <svg:image xlink:href="resources/green-checker.png" width="100" height="100" />
+</svg:svg>
index 6b919424c9012ba78320a585b238cff9f507b661..d9905eb675377bd37e9cc8aa18b38ad2d7037265 100644 (file)
@@ -1,3 +1,14 @@
+2007-09-28  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Sam Wenig.
+
+        ASSERT when dragging <svg:image> with non-null prefix
+        http://bugs.webkit.org/show_bug.cgi?id=15308
+
+        * bindings/objc/DOM.mm:
+        (WebCore::lookupElementClass): added
+        (WebCore::elementClass): use new lookupElementClass function
+
 2007-09-25  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Mark Rowe.
index 9618019206dc92b54e18a621d082bae58a4c3363..7763702a09fe7ab211a698c8952366eafad59906 100644 (file)
@@ -254,11 +254,20 @@ static void createElementClassMap()
 #endif
 }
 
+static Class lookupElementClass(const QualifiedName& tag)
+{
+    // Do a special lookup to ignore element prefixes
+    if (tag.hasPrefix())
+        return elementClassMap->get(QualifiedName(nullAtom, tag.localName(), tag.namespaceURI()).impl());
+    
+    return elementClassMap->get(tag.impl());
+}
+
 static Class elementClass(const QualifiedName& tag, Class defaultClass)
 {
     if (!elementClassMap)
         createElementClassMap();
-    Class objcClass = elementClassMap->get(tag.impl());
+    Class objcClass = lookupElementClass(tag);
     if (!objcClass)
         objcClass = defaultClass;
     return objcClass;