[webkit-changes] cvs commit: WebCore/ksvg2/svg SVGDocumentImpl.cpp SVGElementImpl.cpp SVGElementImpl.h

Eric eseidel at opensource.apple.com
Sun Dec 11 01:26:26 PST 2005


eseidel     05/12/11 01:26:25

  Modified:    .        ChangeLog
               WebCore+SVG DrawDocument.mm
               WebCore.xcodeproj project.pbxproj
               kcanvas/device/quartz KCanvasFilterQuartz.mm
               khtml    khtml_part.h
               khtml/css cssparser.cpp cssparser.h cssstyleselector.cpp
                        cssstyleselector.h
               khtml/ecma kjs_window.cpp
               khtml/html html_objectimpl.cpp
               khtml/rendering DataRef.h render_canvas.cpp render_object.h
                        render_style.cpp
               khtml/xml dom_docimpl.cpp dom_elementimpl.cpp
                        dom_elementimpl.h dom_textimpl.cpp
               ksvg2/css KSVGCSSParser.cpp svg.css
               ksvg2/svg SVGDocumentImpl.cpp SVGElementImpl.cpp
                        SVGElementImpl.h
  Log:
  Bug #: 5999
  Submitted by: eseidel
  Reviewed by: hyatt
          Small fixes made during SVG code review.
          http://bugzilla.opendarwin.org/show_bug.cgi?id=5999
  
          One test case added for conditional processing directives
          used outside of switch statements.
  
          * WebCore+SVG/DrawDocument.mm:
          (-[DrawView description]):
          * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
          (KCanvasFEGaussianBlurQuartz::getCIFilter):
          * khtml/css/cssparser.cpp:
          (CSSParser::parseValue):
          * khtml/css/cssparser.h:
          * khtml/css/cssstyleselector.cpp:
          (khtml::CSSStyleSelector::loadDefaultStyle):
          (khtml::CSSStyleSelector::applyProperty):
          * khtml/css/cssstyleselector.h:
          * khtml/ecma/kjs_window.cpp:
          (KJS::Window::retrieveWindow):
          (KJS::Window::retrieveActive):
          * khtml/html/html_objectimpl.cpp:
          (DOM::HTMLObjectElementImpl::isImageType):
          * khtml/khtml_part.h:
          * khtml/rendering/DataRef.h:
          (khtml::DataRef::operator == ):
          (khtml::DataRef::operator != ):
          * khtml/rendering/render_canvas.cpp:
          * khtml/rendering/render_object.h:
          (khtml::RenderObject::localTransform):
          * khtml/rendering/render_style.cpp:
          (RenderStyle::diff):
          * khtml/xml/dom_docimpl.cpp:
          (DocumentImpl::createElementNS):
          (DocumentImpl::createEvent):
          * khtml/xml/dom_elementimpl.cpp:
          * khtml/xml/dom_elementimpl.h:
          * khtml/xml/dom_textimpl.cpp:
          (TextImpl::rendererIsNeeded):
          * ksvg2/css/KSVGCSSParser.cpp:
          (DOM::CSSParser::parseSVGValue):
          * ksvg2/css/svg.css:
          * ksvg2/svg/SVGDocumentImpl.cpp:
          * ksvg2/svg/SVGElementImpl.cpp:
          (SVGElementImpl::childShouldCreateRenderer):
          * ksvg2/svg/SVGElementImpl.h:
          (KSVG::SVGElementImpl::isValid):
  
  Revision  Changes    Path
  1.509     +51 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.508
  retrieving revision 1.509
  diff -u -r1.508 -r1.509
  --- ChangeLog	11 Dec 2005 07:28:31 -0000	1.508
  +++ ChangeLog	11 Dec 2005 09:25:53 -0000	1.509
  @@ -1,3 +1,54 @@
  +2005-12-11  Eric Seidel  <eseidel at apple.com>
  +
  +        Reviewed by hyatt.
  +
  +        Small fixes made during SVG code review.
  +        http://bugzilla.opendarwin.org/show_bug.cgi?id=5999
  +
  +        One test case added for conditional processing directives
  +        used outside of switch statements.
  +
  +        * WebCore+SVG/DrawDocument.mm:
  +        (-[DrawView description]):
  +        * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
  +        (KCanvasFEGaussianBlurQuartz::getCIFilter):
  +        * khtml/css/cssparser.cpp:
  +        (CSSParser::parseValue):
  +        * khtml/css/cssparser.h:
  +        * khtml/css/cssstyleselector.cpp:
  +        (khtml::CSSStyleSelector::loadDefaultStyle):
  +        (khtml::CSSStyleSelector::applyProperty):
  +        * khtml/css/cssstyleselector.h:
  +        * khtml/ecma/kjs_window.cpp:
  +        (KJS::Window::retrieveWindow):
  +        (KJS::Window::retrieveActive):
  +        * khtml/html/html_objectimpl.cpp:
  +        (DOM::HTMLObjectElementImpl::isImageType):
  +        * khtml/khtml_part.h:
  +        * khtml/rendering/DataRef.h:
  +        (khtml::DataRef::operator == ):
  +        (khtml::DataRef::operator != ):
  +        * khtml/rendering/render_canvas.cpp:
  +        * khtml/rendering/render_object.h:
  +        (khtml::RenderObject::localTransform):
  +        * khtml/rendering/render_style.cpp:
  +        (RenderStyle::diff):
  +        * khtml/xml/dom_docimpl.cpp:
  +        (DocumentImpl::createElementNS):
  +        (DocumentImpl::createEvent):
  +        * khtml/xml/dom_elementimpl.cpp:
  +        * khtml/xml/dom_elementimpl.h:
  +        * khtml/xml/dom_textimpl.cpp:
  +        (TextImpl::rendererIsNeeded):
  +        * ksvg2/css/KSVGCSSParser.cpp:
  +        (DOM::CSSParser::parseSVGValue):
  +        * ksvg2/css/svg.css:
  +        * ksvg2/svg/SVGDocumentImpl.cpp:
  +        * ksvg2/svg/SVGElementImpl.cpp:
  +        (SVGElementImpl::childShouldCreateRenderer):
  +        * ksvg2/svg/SVGElementImpl.h:
  +        (KSVG::SVGElementImpl::isValid):
  +
   2005-12-10  Maciej Stachowiak  <mjs at apple.com>
   
           Not reviewed, build fix.
  
  
  
  1.9       +0 -6      WebCore/WebCore+SVG/DrawDocument.mm
  
  Index: DrawDocument.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/WebCore+SVG/DrawDocument.mm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DrawDocument.mm	21 Nov 2005 08:29:08 -0000	1.8
  +++ DrawDocument.mm	11 Dec 2005 09:25:59 -0000	1.9
  @@ -238,12 +238,6 @@
   
   - (NSString *)description
   {
  -    // Detect description if possible...
  -//  KDOM::NodeListImpl *descList = _private->svgDocument->getElementsByTagName("desc");
  -//  if(descList && (descList->length() > 0)) {
  -//  SVGDescElementImpl *descImpl = dynamic_cast<SVGDescElementImpl *>(descList->item(0));
  -//  return descImpl->description().string().getNSString();
  -//  }
       return nil;
   }
   
  
  
  
  1.54      +2 -0      WebCore/WebCore.xcodeproj/project.pbxproj
  
  Index: project.pbxproj
  ===================================================================
  RCS file: /cvs/root/WebCore/WebCore.xcodeproj/project.pbxproj,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- project.pbxproj	6 Dec 2005 02:41:47 -0000	1.53
  +++ project.pbxproj	11 Dec 2005 09:26:00 -0000	1.54
  @@ -1931,6 +1931,7 @@
   		A8122CF308D564B100844FA3 /* SVGZoomAndPan.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGZoomAndPan.idl; sourceTree = "<group>"; };
   		A8122CF408D564B100844FA3 /* SVGZoomEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGZoomEvent.idl; sourceTree = "<group>"; };
   		A8212D0708794A2300677359 /* WebCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
  +		A82336B1094C23BE0085A296 /* DataRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataRef.h; sourceTree = "<group>"; };
   		A82FC33B08CBB07C00EFEE23 /* SVGCursorElementImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGCursorElementImpl.h; sourceTree = "<group>"; };
   		A82FC33C08CBB07C00EFEE23 /* SVGCursorElementImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGCursorElementImpl.cpp; sourceTree = "<group>"; };
   		A83C819F091189B9009BF4A7 /* XSLTProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTProcessor.h; sourceTree = "<group>"; };
  @@ -3835,6 +3836,7 @@
   		F523D2F302DE443B018635CA /* rendering */ = {
   			isa = PBXGroup;
   			children = (
  +				A82336B1094C23BE0085A296 /* DataRef.h */,
   				F523D29E02DE4438018635CA /* bidi.h */,
   				F523D29D02DE4438018635CA /* bidi.cpp */,
   				F523D2A002DE4438018635CA /* break_lines.h */,
  
  
  
  1.19      +1 -1      WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm
  
  Index: KCanvasFilterQuartz.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- KCanvasFilterQuartz.mm	11 Dec 2005 00:07:25 -0000	1.18
  +++ KCanvasFilterQuartz.mm	11 Dec 2005 09:26:04 -0000	1.19
  @@ -652,7 +652,7 @@
   
   CIFilter *KCanvasFEGaussianBlurQuartz::getCIFilter(KCanvasFilterQuartz *quartzFilter) const
   {
  -	FE_QUARTZ_SETUP_INPUT(@"CIGaussianBlur");
  +	FE_QUARTZ_SETUP_INPUT(@"CIGaussianPyramid");
   	
   	float inputRadius = stdDeviationX();
   	if (inputRadius != stdDeviationY()) {
  
  
  
  1.142     +0 -11     WebCore/khtml/khtml_part.h
  
  Index: khtml_part.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/khtml_part.h,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- khtml_part.h	4 Dec 2005 11:35:02 -0000	1.141
  +++ khtml_part.h	11 Dec 2005 09:26:05 -0000	1.142
  @@ -89,12 +89,6 @@
     class XMLTokenizer;
   }
   
  -#ifdef SVG_SUPPORT
  -namespace KSVG {
  -    class SVGAElementImpl;
  -}
  -#endif
  -
   namespace KJS {
       class DOMDocument;
       class Selection;
  @@ -177,9 +171,6 @@
     friend class khtml::RenderWidget;
     friend class khtml::CSSStyleSelector;
     friend class KHTMLPartIface;
  -#ifdef SVG_SUPPORT
  -    friend class KSVG::SVGAElementImpl;
  -#endif
   
     Q_PROPERTY( bool javaScriptEnabled READ jScriptEnabled WRITE setJScriptEnabled )
     Q_PROPERTY( bool javaEnabled READ javaEnabled WRITE setJavaEnabled )
  @@ -909,8 +900,6 @@
      */
     KURL completeURL( const QString &url );
   
  -protected:
  -
     /**
      * presents a detailed error message to the user.
      * @p errorCode kio error code, eg KIO::ERR_SERVER_TIMEOUT.
  
  
  
  1.116     +2 -5      WebCore/khtml/css/cssparser.cpp
  
  Index: cssparser.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssparser.cpp,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- cssparser.cpp	8 Dec 2005 08:40:25 -0000	1.115
  +++ cssparser.cpp	11 Dec 2005 09:26:06 -0000	1.116
  @@ -1248,12 +1248,9 @@
   	return parseShorthand(propId, properties, 3, important);
       }
       default:
  -// #ifdef CSS_DEBUG
  -// 	kdDebug( 6080 ) << "illegal or CSS2 Aural property: " << val << endl;
  -// #endif
   #if SVG_SUPPORT
  -    if (parseSVGValue(propId, important))
  -        return true;
  +        if (parseSVGValue(propId, important))
  +            return true;
   #endif
   	break;
       }
  
  
  
  1.35      +1 -1      WebCore/khtml/css/cssparser.h
  
  Index: cssparser.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssparser.h,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- cssparser.h	7 Dec 2005 01:12:36 -0000	1.34
  +++ cssparser.h	11 Dec 2005 09:26:06 -0000	1.35
  @@ -147,7 +147,7 @@
   	CSSPrimitiveValueImpl *parseColorFromValue(Value* val);
           
   #if SVG_SUPPORT
  -        bool parseSVGValue(int propId, bool important, int expected = 1);
  +        bool parseSVGValue(int propId, bool important);
           CSSValueImpl *parseSVGPaint();
           CSSValueImpl *parseSVGColor();
           CSSValueImpl *parseSVGStrokeDasharray();
  
  
  
  1.228     +6 -6      WebCore/khtml/css/cssstyleselector.cpp
  
  Index: cssstyleselector.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssstyleselector.cpp,v
  retrieving revision 1.227
  retrieving revision 1.228
  diff -u -r1.227 -r1.228
  --- cssstyleselector.cpp	8 Dec 2005 08:40:25 -0000	1.227
  +++ cssstyleselector.cpp	11 Dec 2005 09:26:07 -0000	1.228
  @@ -335,16 +335,16 @@
       defaultPrintStyle = new CSSRuleSet();
       defaultPrintStyle->addRulesFromSheet(defaultSheet, "print");
   
  -    // Collect only quirks-mode rules.
  -    quirksSheet = parseUASheet(0, "khtml/css/quirks.css");
  -    defaultQuirksStyle = new CSSRuleSet();
  -    defaultQuirksStyle->addRulesFromSheet(quirksSheet, "screen");
  -    
   #if SVG_SUPPORT
       svgSheet = parseUASheet(0, "ksvg2/css/svg.css");
       defaultStyle->addRulesFromSheet(svgSheet, "screen");
       defaultPrintStyle->addRulesFromSheet(svgSheet, "print");
   #endif
  +
  +    // Collect only quirks-mode rules.
  +    quirksSheet = parseUASheet(0, "khtml/css/quirks.css");
  +    defaultQuirksStyle = new CSSRuleSet();
  +    defaultQuirksStyle->addRulesFromSheet(quirksSheet, "screen");
   }
   
   void CSSStyleSelector::addMatchedRule(CSSRuleData* rule)
  @@ -4050,7 +4050,7 @@
           // Try the SVG properties
           applySVGProperty(id, value);
   #endif
  -        return;
  +        break;
       }
   }
   
  
  
  
  1.48      +0 -1      WebCore/khtml/css/cssstyleselector.h
  
  Index: cssstyleselector.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssstyleselector.h,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- cssstyleselector.h	7 Dec 2005 01:12:36 -0000	1.47
  +++ cssstyleselector.h	11 Dec 2005 09:26:08 -0000	1.48
  @@ -200,7 +200,6 @@
           void mapBackgroundXPosition(BackgroundLayer* layer, DOM::CSSValueImpl* value);
           void mapBackgroundYPosition(BackgroundLayer* layer, DOM::CSSValueImpl* value);
           
  -    protected:
           // We collect the set of decls that match in |m_matchedDecls|.  We then walk the
           // set of matched decls four times, once for those properties that others depend on (like font-size),
           // and then a second time for all the remaining properties.  We then do the same two passes
  
  
  
  1.197     +4 -12     WebCore/khtml/ecma/kjs_window.cpp
  
  Index: kjs_window.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/ecma/kjs_window.cpp,v
  retrieving revision 1.196
  retrieving revision 1.197
  diff -u -r1.196 -r1.197
  --- kjs_window.cpp	11 Dec 2005 02:06:07 -0000	1.196
  +++ kjs_window.cpp	11 Dec 2005 09:26:10 -0000	1.197
  @@ -366,13 +366,8 @@
     JSObject *obj = retrieve(p)->getObject();
   #ifndef NDEBUG
     // obj should never be null, except when javascript has been disabled in that part.
  -  if ( p && p->jScriptEnabled() )
  -  {
  +  if (p && p->jScriptEnabled())
       assert(obj);
  -#ifndef QWS
  -    //assert( dynamic_cast<Window*>(obj) ); // type checking
  -#endif
  -  }
   #endif
     if (!obj) // JS disabled
       return 0;
  @@ -381,12 +376,9 @@
   
   Window *Window::retrieveActive(ExecState *exec)
   {
  -  JSValue *imp = exec->dynamicInterpreter()->globalObject();
  -  assert( imp );
  -#ifndef QWS
  -  //assert( dynamic_cast<Window*>(imp) );
  -#endif
  -  return static_cast<Window*>(imp);
  +    JSValue *imp = exec->dynamicInterpreter()->globalObject();
  +    assert(imp);
  +    return static_cast<Window*>(imp);
   }
   
   JSValue *Window::retrieve(KHTMLPart *p)
  
  
  
  1.90      +0 -6      WebCore/khtml/html/html_objectimpl.cpp
  
  Index: html_objectimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_objectimpl.cpp,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- html_objectimpl.cpp	21 Nov 2005 01:20:13 -0000	1.89
  +++ html_objectimpl.cpp	11 Dec 2005 09:26:12 -0000	1.90
  @@ -813,12 +813,6 @@
           }
       }
       
  -#if SVG_SUPPORT
  -    // Even if the image system supports it, we don't want to render SVGs as images.
  -    if (serviceType == "image/svg+xml")
  -        return false;
  -#endif
  -
       return canRenderImageType(serviceType);
   }
   
  
  
  
  1.2       +2 -2      WebCore/khtml/rendering/DataRef.h
  
  Index: DataRef.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/DataRef.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DataRef.h	6 Dec 2005 01:53:13 -0000	1.1
  +++ DataRef.h	11 Dec 2005 09:26:13 -0000	1.2
  @@ -87,12 +87,12 @@
   
       bool operator == (const DataRef<DATA>& o) const
       {
  -	return (*m_data == *(o.m_data));
  +	return ((m_data == o.m_data) || (*m_data == *(o.m_data)));
       }
       
       bool operator != (const DataRef<DATA>& o) const
       {
  -	return (*m_data != *(o.m_data));
  +	return ((m_data != o.m_data) && (*m_data != *(o.m_data)));
       }
   
   private:
  
  
  
  1.38      +0 -4      WebCore/khtml/rendering/render_canvas.cpp
  
  Index: render_canvas.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_canvas.cpp,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- render_canvas.cpp	27 Nov 2005 11:02:18 -0000	1.37
  +++ render_canvas.cpp	11 Dec 2005 09:26:13 -0000	1.38
  @@ -29,10 +29,6 @@
   
   #include "khtml_part.h"
   
  -#if SVG_SUPPORT
  -#include "KRenderingDeviceQuartz.h"
  -#endif
  -
   using namespace khtml;
   
   //#define BOX_DEBUG
  
  
  
  1.170     +1 -3      WebCore/khtml/rendering/render_object.h
  
  Index: render_object.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_object.h,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -u -r1.169 -r1.170
  --- render_object.h	23 Nov 2005 15:14:08 -0000	1.169
  +++ render_object.h	11 Dec 2005 09:26:14 -0000	1.170
  @@ -28,9 +28,7 @@
   #include <qcolor.h>
   #include <qrect.h>
   #include <assert.h>
  -#if SVG_SUPPORT
   #include <qwmatrix.h>
  -#endif
   
   #include "editing/text_affinity.h"
   #include "misc/khtmllayout.h"
  @@ -283,7 +281,7 @@
       virtual bool isRenderPath() const { return false; }
       virtual QRect relativeBBox(bool includeStroke = true) const { return QRect(); }
       // We may eventually want to make these non-virtual
  -    virtual QMatrix localTransform() const { return QMatrix(1,0,0,1,xPos(),xPos()); }
  +    virtual QMatrix localTransform() const { return QMatrix(1, 0, 0, 1, xPos(), yPos()); }
       virtual void setLocalTransform(const QMatrix&) { }
       virtual QMatrix absoluteTransform() const;
   #endif
  
  
  
  1.79      +1 -1      WebCore/khtml/rendering/render_style.cpp
  
  Index: render_style.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_style.cpp,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- render_style.cpp	6 Dec 2005 01:53:13 -0000	1.78
  +++ render_style.cpp	11 Dec 2005 09:26:15 -0000	1.79
  @@ -702,7 +702,7 @@
   {
   #if SVG_SUPPORT
       // This is horribly inefficient.  Eventually we'll have to integrate
  -    // this more directly by caling: Diff svgDiff = svgStyle->diff(other)
  +    // this more directly by calling: Diff svgDiff = svgStyle->diff(other)
       // and then checking svgDiff and returning from the appropraite places below.
       if (m_svgStyle != other->m_svgStyle)
           return Layout;
  
  
  
  1.283     +3 -5      WebCore/khtml/xml/dom_docimpl.cpp
  
  Index: dom_docimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.cpp,v
  retrieving revision 1.282
  retrieving revision 1.283
  diff -u -r1.282 -r1.283
  --- dom_docimpl.cpp	4 Dec 2005 20:55:46 -0000	1.282
  +++ dom_docimpl.cpp	11 Dec 2005 09:26:17 -0000	1.283
  @@ -789,7 +789,7 @@
                   return 0;
           }
       }
  -#ifdef SVG_SUPPORT
  +#if SVG_SUPPORT
       else if (_namespaceURI == KSVG::SVGNames::svgNamespaceURI)
           e = KSVG::SVGElementFactory::createSVGElement(qName, this, false);
   #endif
  @@ -2411,8 +2411,6 @@
   
   EventImpl *DocumentImpl::createEvent(const DOMString &eventType, int &exceptioncode)
   {
  -    // createEvent ought to be at a time completely separate from DOM modifications that forbidEventDispatch
  -    // (of course, the event _could_ be sent later, but this seems like a good bottleneck)
       if (eventType == "UIEvents" || eventType == "UIEvent")
           return new UIEventImpl();
       else if (eventType == "MouseEvents" || eventType == "MouseEvent")
  @@ -2423,10 +2421,10 @@
           return new KeyboardEventImpl();
       else if (eventType == "HTMLEvents" || eventType == "Event" || eventType == "Events")
           return new EventImpl();
  -#ifdef SVG_SUPPORT
  +#if SVG_SUPPORT
       else if (eventType == "SVGEvents")
           return new EventImpl();
  -    else if(eventType == "SVGZoomEvents")
  +    else if (eventType == "SVGZoomEvents")
           return new KSVG::SVGZoomEventImpl();
   #endif
       else {
  
  
  
  1.98      +0 -14     WebCore/khtml/xml/dom_elementimpl.cpp
  
  Index: dom_elementimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_elementimpl.cpp,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- dom_elementimpl.cpp	2 Dec 2005 03:48:10 -0000	1.97
  +++ dom_elementimpl.cpp	11 Dec 2005 09:26:18 -0000	1.98
  @@ -37,10 +37,6 @@
   
   #include "html/htmlparser.h"
   
  -#if SVG_SUPPORT
  -#include "SVGNames.h"
  -#endif
  -
   #include "rendering/render_canvas.h"
   #include "css/css_valueimpl.h"
   #include "css/cssproperties.h"
  @@ -521,16 +517,6 @@
       ContainerNodeImpl::removedFromDocument();
   }
   
  -#if SVG_SUPPORT
  -bool ElementImpl::rendererIsNeeded(khtml::RenderStyle *style)
  -{
  -    // SVG ignores arbitrary xml elements in its render tree contrary to the normal CSS/XML behavior.
  -    if ((KSVG::SVGNames::svgNamespaceURI == parentNode()->namespaceURI())) // FIXME: && !parentNode()->hasTagName(KSVG::SVGNames::foreignObjectTag)
  -        return false;
  -    return NodeImpl::rendererIsNeeded(style);
  -}
  -#endif
  -
   void ElementImpl::attach()
   {
   #if SPEED_DEBUG < 1
  
  
  
  1.66      +0 -3      WebCore/khtml/xml/dom_elementimpl.h
  
  Index: dom_elementimpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_elementimpl.h,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- dom_elementimpl.h	10 Dec 2005 18:56:00 -0000	1.65
  +++ dom_elementimpl.h	11 Dec 2005 09:26:19 -0000	1.66
  @@ -239,9 +239,6 @@
       // State of the element.
       virtual QString state() { return QString::null; }
   
  -#if SVG_SUPPORT
  -    virtual bool rendererIsNeeded(khtml::RenderStyle *);
  -#endif
       virtual void attach();
       virtual khtml::RenderStyle *styleForRenderer(khtml::RenderObject *parent);
       virtual khtml::RenderObject *createRenderer(RenderArena *, khtml::RenderStyle *);
  
  
  
  1.38      +0 -9      WebCore/khtml/xml/dom_textimpl.cpp
  
  Index: dom_textimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/dom_textimpl.cpp,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- dom_textimpl.cpp	21 Nov 2005 04:01:59 -0000	1.37
  +++ dom_textimpl.cpp	11 Dec 2005 09:26:20 -0000	1.38
  @@ -31,10 +31,6 @@
   
   #include "rendering/render_text.h"
   
  -#if SVG_SUPPORT
  -#include "SVGNames.h"
  -#endif
  -
   #include <kdebug.h>
   
   using namespace DOM;
  @@ -458,11 +454,6 @@
               return false;
       }
       
  -#if SVG_SUPPORT
  -    if (par->element()->namespaceURI() == KSVG::SVGNames::svgNamespaceURI)
  -        return false;
  -#endif
  -    
       return true;
   }
   
  
  
  
  1.11      +4 -9      WebCore/ksvg2/css/KSVGCSSParser.cpp
  
  Index: KSVGCSSParser.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/css/KSVGCSSParser.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- KSVGCSSParser.cpp	8 Dec 2005 08:44:47 -0000	1.10
  +++ KSVGCSSParser.cpp	11 Dec 2005 09:26:22 -0000	1.11
  @@ -32,7 +32,7 @@
   typedef DOM::Value KDOMCSSValue;
   typedef DOM::ValueList KDOMCSSValueList;
   
  -bool CSSParser::parseSVGValue(int propId, bool important, int expected)
  +bool CSSParser::parseSVGValue(int propId, bool important)
   {
       if(!valueList)
           return false;
  @@ -42,13 +42,10 @@
           return false;
   
       int id = value->id;
  -    if(id == CSS_VAL_INHERIT && expected == 1)
  -    {
  +    if (id == CSS_VAL_INHERIT) {
           addProperty(propId, new CSSInheritedValueImpl(), important);
           return true;
  -    }
  -    else if(id == CSS_VAL_INITIAL && expected == 1)
  -    {
  +    } else if (id == CSS_VAL_INITIAL) {
           addProperty(propId, new CSSInitialValueImpl(), important);
           return true;
       }
  @@ -310,10 +307,8 @@
               // qDebug(" new quirks value: value=%.2f, unit=%d", value->fValue, value->unit);
               parsedValue = new CSSQuirkPrimitiveValueImpl(value->fValue, CSSPrimitiveValue::CSS_EMS);
           }
  -        --expected;
           valueList->next();
  -        if(valueList->current() && expected == 0)
  -        {
  +        if (valueList->current()) {
               delete parsedValue;
               parsedValue = 0;
           }
  
  
  
  1.3       +24 -3     WebCore/ksvg2/css/svg.css
  
  Index: svg.css
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/css/svg.css,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- svg.css	30 Nov 2005 00:11:10 -0000	1.2
  +++ svg.css	11 Dec 2005 09:26:23 -0000	1.3
  @@ -1,10 +1,31 @@
   /*
  + * Copyright (C) 2005 Apple Computer, Inc.  All rights reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in the
  + *    documentation and/or other materials provided with the distribution.
  + *
  + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
  + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  + * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
  + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    */
  - 
  +
   @namespace "http://www.w3.org/2000/svg";
   
   svg, symbol, marker, pattern, foreignObject
   {
  -	overflow: hidden;
  +    overflow: hidden;
   }
  -
  
  
  
  1.16      +0 -13     WebCore/ksvg2/svg/SVGDocumentImpl.cpp
  
  Index: SVGDocumentImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGDocumentImpl.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SVGDocumentImpl.cpp	6 Dec 2005 01:53:16 -0000	1.15
  +++ SVGDocumentImpl.cpp	11 Dec 2005 09:26:23 -0000	1.16
  @@ -140,19 +140,6 @@
       return static_cast<KSVGView *>(m_view);
   }
   
  -#if 0
  -KDOM::Ecma *SVGDocumentImpl::ecmaEngine() const
  -{
  -    if(m_ecmaEngine) // No need to initialize anymore...
  -        return m_ecmaEngine;
  -
  -    m_ecmaEngine = new Ecma(const_cast<SVGDocumentImpl *>(this));
  -    m_ecmaEngine->setup(implementation()->cdfInterface());
  -
  -    return m_ecmaEngine;
  -}
  -#endif
  -
   void SVGDocumentImpl::finishedParsing()
   {
       addScripts(rootElement());
  
  
  
  1.15      +7 -0      WebCore/ksvg2/svg/SVGElementImpl.cpp
  
  Index: SVGElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGElementImpl.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SVGElementImpl.cpp	30 Nov 2005 00:11:10 -0000	1.14
  +++ SVGElementImpl.cpp	11 Dec 2005 09:26:23 -0000	1.15
  @@ -135,4 +135,11 @@
           KDOM::StyledElementImpl::parseMappedAttribute(attr);
   }
   
  +bool SVGElementImpl::childShouldCreateRenderer(DOM::NodeImpl *child) const
  +{
  +    if (child->isSVGElement())
  +        return static_cast<SVGElementImpl *>(child)->isValid();
  +    return false;
  +}
  +
   // vim:ts=4:noet
  
  
  
  1.12      +2 -1      WebCore/ksvg2/svg/SVGElementImpl.h
  
  Index: SVGElementImpl.h
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGElementImpl.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SVGElementImpl.h	6 Dec 2005 01:53:16 -0000	1.11
  +++ SVGElementImpl.h	11 Dec 2005 09:26:24 -0000	1.12
  @@ -69,10 +69,11 @@
           virtual bool isGradientStop() const { return false; }
           
           // For SVGTestsImpl
  -        virtual bool isValid() const { return false; }
  +        virtual bool isValid() const { return true; }
           
           virtual void closeRenderer() { m_closed = true; }
           virtual bool rendererIsNeeded(khtml::RenderStyle *) { return false; }
  +        virtual bool childShouldCreateRenderer(DOM::NodeImpl *) const;
           
           // helper:
           bool isClosed() const { return m_closed; }
  
  
  



More information about the webkit-changes mailing list