2006-11-27 Oliver Hunt <oliver@apple.com>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2006 04:33:23 +0000 (04:33 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2006 04:33:23 +0000 (04:33 +0000)
        Reviewed by Adam.

        Fixes a crash in SVG caused by an attempt to
        perform css overflow clipping by preventing
        the css overflow clip from being set in SVG.

        <rdar:/problems/4839568>

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

WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/rendering/RenderForeignObject.cpp
WebCore/rendering/RenderForeignObject.h
WebCore/rendering/RenderSVGBlock.cpp [new file with mode: 0644]
WebCore/rendering/RenderSVGBlock.h [new file with mode: 0644]
WebCore/rendering/RenderSVGText.cpp
WebCore/rendering/RenderSVGText.h

index 94ddab6..348bc94 100644 (file)
@@ -1,3 +1,25 @@
+2006-11-27  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Adam.
+
+        Fixes a crash in SVG caused by an attempt to 
+        perform css overflow clipping by preventing
+        the css overflow clip from being set in SVG.
+        
+        <rdar:/problems/4839568>
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/RenderForeignObject.cpp:
+        (WebCore::RenderForeignObject::RenderForeignObject):
+        * rendering/RenderForeignObject.h:
+        * rendering/RenderSVGBlock.cpp: Added.
+        (WebCore::RenderSVGBlock::RenderSVGBlock):
+        (WebCore::RenderSVGBlock::setStyle):
+        * rendering/RenderSVGBlock.h: Added.
+        * rendering/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::RenderSVGText):
+        * rendering/RenderSVGText.h:
+
 2006-11-27  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Adam.
index 40a6849..dfb9a4f 100644 (file)
                A70023FD0B02BEAB00170215 /* MimeTypeRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A70023FB0B02BEAB00170215 /* MimeTypeRegistry.cpp */; };
                A70023FE0B02BEAB00170215 /* MimeTypeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = A70023FC0B02BEAB00170215 /* MimeTypeRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A70024000B02BECC00170215 /* MimeTypeRegistryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A70023FF0B02BECC00170215 /* MimeTypeRegistryMac.mm */; };
+               A7352C190B1BB89D00A986D0 /* RenderSVGBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7352C170B1BB89D00A986D0 /* RenderSVGBlock.cpp */; };
+               A7352C1A0B1BB89D00A986D0 /* RenderSVGBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = A7352C180B1BB89D00A986D0 /* RenderSVGBlock.h */; };
                A7638A970995965D0007E14F /* SVGFEDisplacementMapElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A7638A950995965D0007E14F /* SVGFEDisplacementMapElement.h */; };
                A7638A980995965D0007E14F /* SVGFEDisplacementMapElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7638A960995965D0007E14F /* SVGFEDisplacementMapElement.cpp */; };
                A7D23C540B03E41300582A4F /* WebMimeTypeRegistryBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D23C520B03E41300582A4F /* WebMimeTypeRegistryBridge.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A70023FB0B02BEAB00170215 /* MimeTypeRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MimeTypeRegistry.cpp; sourceTree = "<group>"; };
                A70023FC0B02BEAB00170215 /* MimeTypeRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MimeTypeRegistry.h; sourceTree = "<group>"; };
                A70023FF0B02BECC00170215 /* MimeTypeRegistryMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = MimeTypeRegistryMac.mm; sourceTree = "<group>"; };
+               A7352C170B1BB89D00A986D0 /* RenderSVGBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGBlock.cpp; sourceTree = "<group>"; };
+               A7352C180B1BB89D00A986D0 /* RenderSVGBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderSVGBlock.h; sourceTree = "<group>"; };
                A7638A950995965D0007E14F /* SVGFEDisplacementMapElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFEDisplacementMapElement.h; sourceTree = "<group>"; };
                A7638A960995965D0007E14F /* SVGFEDisplacementMapElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFEDisplacementMapElement.cpp; sourceTree = "<group>"; };
                A7D23C520B03E41300582A4F /* WebMimeTypeRegistryBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebMimeTypeRegistryBridge.h; sourceTree = "<group>"; };
                F523D2F302DE443B018635CA /* rendering */ = {
                        isa = PBXGroup;
                        children = (
+                               A7352C170B1BB89D00A986D0 /* RenderSVGBlock.cpp */,
+                               A7352C180B1BB89D00A986D0 /* RenderSVGBlock.h */,
                                AB247A6A0AFD6383003FA5FD /* RenderSlider.cpp */,
                                AB247A6B0AFD6383003FA5FD /* RenderSlider.h */,
                                A8CFF04B0A154F09000A4234 /* AutoTableLayout.cpp */,
                                B2D87C7E0B124E7300B0DE1E /* SVGPaintServerPattern.h in Headers */,
                                B2D87C800B124E7300B0DE1E /* SVGPaintServerRadialGradient.h in Headers */,
                                B2D87C820B124E7300B0DE1E /* SVGPaintServerSolid.h in Headers */,
+                               A7352C1A0B1BB89D00A986D0 /* RenderSVGBlock.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                        mainGroup = 0867D691FE84028FC02AAC07 /* WebKit */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
+                       projectRoot = "";
+                       shouldCheckCompatibility = 1;
                        targets = (
                                93F198A508245E59001E9ABC /* WebCore */,
                                DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
                                B2D87C880B124E9500B0DE1E /* SVGPaintServerGradientCg.cpp in Sources */,
                                B2D87C890B124E9500B0DE1E /* SVGPaintServerPatternCg.cpp in Sources */,
                                B2D87C8A0B124E9500B0DE1E /* SVGPaintServerSolidCg.cpp in Sources */,
+                               A7352C190B1BB89D00A986D0 /* RenderSVGBlock.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index ef7cfc9..1bb17d3 100644 (file)
@@ -34,7 +34,7 @@
 namespace WebCore {
 
 RenderForeignObject::RenderForeignObject(SVGForeignObjectElement* node) 
-    : RenderBlock(node)
+    : RenderSVGBlock(node)
 {
 }
 
index dab6624..6a71226 100644 (file)
 #ifdef SVG_SUPPORT
 
 #include "AffineTransform.h"
-#include "RenderBlock.h"
+#include "RenderSVGBlock.h"
 
 namespace WebCore {
 
 class SVGForeignObjectElement;
 
-class RenderForeignObject : public RenderBlock {
+class RenderForeignObject : public RenderSVGBlock {
 public:
     RenderForeignObject(SVGForeignObjectElement*);
 
diff --git a/WebCore/rendering/RenderSVGBlock.cpp b/WebCore/rendering/RenderSVGBlock.cpp
new file mode 100644 (file)
index 0000000..49efb30
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifdef SVG_SUPPORT
+#include "config.h"
+#include "RenderSVGBlock.h"
+#include "SVGElement.h"
+
+namespace WebCore
+{
+RenderSVGBlock::RenderSVGBlock(SVGElement* node) 
+    : RenderBlock(node)
+{
+}
+
+void RenderSVGBlock::setStyle(RenderStyle* style) 
+{
+    RenderBlock::setStyle(style);
+    //FIXME: Once overflow rules are supported by SVG we should
+    //probably map the CSS overflow rules rather than just ignoring
+    //them
+    setHasOverflowClip(false);
+}
+
+}
+
+#endif // SVG_SUPPORT
diff --git a/WebCore/rendering/RenderSVGBlock.h b/WebCore/rendering/RenderSVGBlock.h
new file mode 100644 (file)
index 0000000..42bb0f5
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2006 Apple Computer, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef RenderSVGBlock_h
+#define RenderSVGBlock_h
+#ifdef SVG_SUPPORT
+
+#include "RenderBlock.h"
+
+namespace WebCore {
+
+class SVGElement;
+
+class RenderSVGBlock : public RenderBlock {
+public:
+    RenderSVGBlock(SVGElement*);
+    virtual void setStyle(RenderStyle*);
+};
+
+}
+#endif // SVG_SUPPORT
+#endif // !RenderSVGBlock_h
index 329c124..6ae788a 100644 (file)
@@ -37,7 +37,7 @@
 namespace WebCore {
 
 RenderSVGText::RenderSVGText(SVGTextElement* node) 
-    : RenderBlock(node)
+    : RenderSVGBlock(node)
 {
 }
 
index 3f2b605..d5012d9 100644 (file)
 #define RenderSVGText_H
 #ifdef SVG_SUPPORT
 
-#include "RenderBlock.h"
+#include "RenderSVGBlock.h"
 #include "AffineTransform.h"
 
 namespace WebCore {
 
 class SVGTextElement;
 
-class RenderSVGText : public RenderBlock {
+class RenderSVGText : public RenderSVGBlock {
 public:
     RenderSVGText(SVGTextElement* node);