Reviewed by Lars Knoll.
authorzimmermann <zimmermann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Mar 2007 19:41:17 +0000 (19:41 +0000)
committerzimmermann <zimmermann@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Mar 2007 19:41:17 +0000 (19:41 +0000)
Fix crash when opening a SVG document which contains SVG elements, but no <svg> root element.
Moving the mouse was crashing WebKit. Fixes svg/hixie/dynamic/006.xml.

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

LayoutTests/ChangeLog
LayoutTests/svg/hixie/error/006-expected.checksum [new file with mode: 0644]
LayoutTests/svg/hixie/error/006-expected.png [new file with mode: 0644]
LayoutTests/svg/hixie/error/006-expected.txt [new file with mode: 0644]
LayoutTests/svg/hixie/error/006.xml [moved from LayoutTests/svg/hixie/error/006.xml-disabled with 100% similarity]
WebCore/ChangeLog
WebCore/rendering/RenderObject.cpp

index 9f1db4f990349815f6d37fc2d5ba2119bc8f89a4..501d413c702c14078b9f3ee5302c458e5ce0d737 100644 (file)
@@ -1,3 +1,14 @@
+2007-03-19  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Lars Knoll.
+
+        Reeanble svg/hixie/error/006.xml. Doesn't crash anymore.
+
+        * svg/hixie/error/006-expected.checksum: Added.
+        * svg/hixie/error/006-expected.png: Added.
+        * svg/hixie/error/006-expected.txt: Added.
+        * svg/hixie/error/006.xml-disabled: Removed.
+
 2007-03-19  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed by Maciej.
diff --git a/LayoutTests/svg/hixie/error/006-expected.checksum b/LayoutTests/svg/hixie/error/006-expected.checksum
new file mode 100644 (file)
index 0000000..d69a371
--- /dev/null
@@ -0,0 +1 @@
+853de00567d121bea0b7bece66a5d61c
\ No newline at end of file
diff --git a/LayoutTests/svg/hixie/error/006-expected.png b/LayoutTests/svg/hixie/error/006-expected.png
new file mode 100644 (file)
index 0000000..113fea4
Binary files /dev/null and b/LayoutTests/svg/hixie/error/006-expected.png differ
diff --git a/LayoutTests/svg/hixie/error/006-expected.txt b/LayoutTests/svg/hixie/error/006-expected.txt
new file mode 100644 (file)
index 0000000..e50061b
--- /dev/null
@@ -0,0 +1,2 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
index 3e68e214fa870c19ab0dbb4e014520a5b6b4bf12..639c896c02da2230c7b9aa6217adc41b0a5ee5b9 100644 (file)
@@ -1,3 +1,13 @@
+2007-03-19  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Lars Knoll.
+
+        Fix crash when opening a SVG document which contains SVG elements, but no <svg> root element.
+        Moving the mouse was crashing WebKit. Fixes svg/hixie/dynamic/006.xml.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::updateHitTestResult):
+
 2007-03-19  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Hyatt.
index 1616546ea2369dcdfa0f1d6bdc9f744ba4ebdec2..b3dea80c494aae3ba9a119fe9193766356888e47 100644 (file)
@@ -2590,7 +2590,7 @@ void RenderObject::updateHitTestResult(HitTestResult& result, const IntPoint& po
         node = continuation()->element();
 
     if (node) {
-        if (node->renderer()->continuation() && node->renderer() != this) {
+        if (node->renderer() && node->renderer()->continuation() && node->renderer() != this) {
             // We're in the continuation of a split inline.  Adjust our local point to be in the coordinate space
             // of the principal renderer's containing block.  This will end up being the innerNonSharedNode.
             RenderObject* firstBlock = node->renderer()->containingBlock();