[webkit-changes] cvs commit: WebCore/kwq KWQPointF.h KWQPointF.mm KWQRectF.h KWQRectF.mm KWQSizeF.h KWQSizeF.mm KWQWMatrix.h KWQWMatrix.mm

Eric eseidel at opensource.apple.com
Wed Jan 4 00:20:35 PST 2006


eseidel     06/01/04 00:20:34

  Modified:    .        ChangeLog
               WebCore.xcodeproj project.pbxproj
               kcanvas  KCanvasContainer.cpp KCanvasContainer.h
                        KCanvasFilters.cpp KCanvasFilters.h KCanvasItem.cpp
                        KCanvasItem.h KCanvasResources.cpp
                        KCanvasResources.h KCanvasTreeDebug.cpp
                        KCanvasTreeDebug.h
               kcanvas/device KRenderingPaintServerGradient.cpp
                        KRenderingPaintServerGradient.h
                        KRenderingPaintServerPattern.cpp
                        KRenderingPaintServerPattern.h
               kcanvas/device/quartz KCanvasFilterQuartz.h
                        KCanvasFilterQuartz.mm KCanvasItemQuartz.h
                        KCanvasItemQuartz.mm KCanvasResourcesQuartz.h
                        KCanvasResourcesQuartz.mm
                        KRenderingPaintServerQuartz.mm
               khtml/rendering render_object.h
               ksvg2/svg SVGFilterElementImpl.cpp
                        SVGFilterPrimitiveStandardAttributesImpl.cpp
                        SVGLengthImpl.cpp SVGLinearGradientElementImpl.cpp
                        SVGLocatableImpl.cpp SVGPatternElementImpl.cpp
                        SVGRadialGradientElementImpl.cpp
                        SVGSVGElementImpl.cpp
               kwq      KWQWMatrix.h KWQWMatrix.mm
  Added:       ForwardingHeaders QPointF QRectF QSizeF
               kwq      KWQPointF.h KWQPointF.mm KWQRectF.h KWQRectF.mm
                        KWQSizeF.h KWQSizeF.mm
  Log:
  Bug #: 4462
  Submitted by: kimmo
  Reviewed by: eseidel
  	Changed use of QRect to QRectF in the points where SVG can have
  	fractional numbers
          http://bugzilla.opendarwin.org/show_bug.cgi?id=4462
  
          Added test cases:
  	* svg/custom/fractional-rects.svg: copy of rounded-rects.svg with
  	fractional coordinates.
  
          * WebCore.xcodeproj/project.pbxproj:
          * kwq/KWQWMatrix.h:
          * kwq/KWQWMatrix.mm:
          (QWMatrix::mapRect): mapRect for QRectF
          * kwq/KWQRectF.h:
          * kwq/KWQRectF.mm:  Added. QRectF impl
          * kwq/KWQSizeF.h:
          * kwq/KWQSizeF.mm:  Added.QSizeF impl
          * kwq/KWQPointF.h:
          * kwq/KWQPointF.mm: Added. QPointF impl
          * kcanvas/KCanvasContainer.cpp:
          (KCanvasContainer::fillContains):
          (KCanvasContainer::strokeContains):
          (KCanvasContainer::relativeBBox):
          (KCanvasContainer::getAspectRatio): QRect -> QRectF
          * kcanvas/KCanvasContainer.h:
          * kcanvas/KCanvasFilters.cpp:
          (KCanvasFilterEffect::subRegion):
          (KCanvasFilterEffect::setSubRegion): QRect -> QRectF
          * kcanvas/KCanvasFilters.h:
          (KCanvasFilter::filterRect):
          (KCanvasFilter::setFilterRect):	QRect -> QRectF
          (KCanvasFEConvolveMatrix::kernelSize):
          (KCanvasFEConvolveMatrix::setKernelSize):
          (KCanvasFEConvolveMatrix::targetOffset):
          (KCanvasFEConvolveMatrix::setTargetOffset): QSize -> QSizeF
          * kcanvas/KCanvasItem.cpp:
          (RenderPath::fillContains):
          (RenderPath::strokeContains):
          (RenderPath::relativeBBox): QRect -> QRectF
          * kcanvas/KCanvasItem.h:
          * kcanvas/KCanvasResources.cpp:
          (KCanvasMarker::draw): QRect -> QRectF
          * kcanvas/KCanvasResources.h:
          * kcanvas/KCanvasTreeDebug.cpp:
          (hasFractions): helper function
          (operator<<): QSizeF operator, QRectF operator
          * kcanvas/KCanvasTreeDebug.h:
          * kcanvas/device/KRenderingPaintServerGradient.cpp:
          (KRenderingPaintServerLinearGradient::gradientStart):
          (KRenderingPaintServerLinearGradient::setGradientStart):
          (KRenderingPaintServerLinearGradient::gradientEnd):
          (KRenderingPaintServerLinearGradient::setGradientEnd):
          (KRenderingPaintServerRadialGradient::gradientCenter):
          (KRenderingPaintServerRadialGradient::setGradientCenter):
          (KRenderingPaintServerRadialGradient::gradientFocal):
          (KRenderingPaintServerRadialGradient::setGradientFocal): QPoint -> QPointF
          * kcanvas/device/KRenderingPaintServerGradient.h:
          * kcanvas/device/KRenderingPaintServerPattern.cpp:
          (KRenderingPaintServerPattern::Private::Private): x, y, width, height -> QRectF
          (KRenderingPaintServerPattern::setBbox): replaced get/set methods
          (KRenderingPaintServerPattern::bbox): replaced get/set methods
          (KRenderingPaintServerPattern::externalRepresentation):
          * kcanvas/device/KRenderingPaintServerPattern.h:
          * kcanvas/device/quartz/KCanvasFilterQuartz.h:
          * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
          (KCanvasFilterQuartz::prepareFilter):
          (KCanvasFilterQuartz::applyFilter): QRect -> QRectF
          * kcanvas/device/quartz/KCanvasItemQuartz.h:
          (KCanvasItemQuartz::getAbsoluteRepaintRect): QRect -> QRectF
          * kcanvas/device/quartz/KCanvasItemQuartz.mm:
          (drawMarkerWithData):
          (KCanvasItemQuartz::drawMarkersIfNeeded):
          (KCanvasItemQuartz::paint): QRect -> QRectF
          (KCanvasItemQuartz::nodeAtPoint): QPoint -> QPointF
          (KCanvasItemQuartz::bboxForPath) :QRect -> QRectF
          (KCanvasItemQuartz::hitsPath):
          * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
          (KCanvasContainerQuartz::getAbsoluteRepaintRect): QRect -> QRectF
          * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
          (KRenderingPaintServerPatternQuartz::draw): QRect -> QRectF
          * khtml/rendering/render_object.h:
          (khtml::RenderObject::relativeBBox):QRect -> QRectF
          * ksvg2/svg/SVGFilterElementImpl.cpp:
          (SVGFilterElementImpl::canvasResource): QRect -> QRectF
          * ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp:
          (SVGFilterPrimitiveStandardAttributesImpl::setStandardAttributes):
          * ksvg2/svg/SVGLengthImpl.cpp:
          (SVGLengthImpl::value): QRect -> QRectF
          * ksvg2/svg/SVGLinearGradientElementImpl.cpp:
          (SVGLinearGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
          * ksvg2/svg/SVGLocatableImpl.cpp:
          (SVGLocatableImpl::getBBox): Rect -> QRectF
          * ksvg2/svg/SVGPatternElementImpl.cpp:
          (SVGPatternElementImpl::drawPatternContentIntoTile): QRect -> QRectF
          * ksvg2/svg/SVGRadialGradientElementImpl.cpp:
          (SVGRadialGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
          * ksvg2/svg/SVGSVGElementImpl.cpp:
          (SVGSVGElementImpl::checkIntersection): QRect -> QRectF, removed integer conversions
          (SVGSVGElementImpl::checkEnclosure): QRect -> QRectF, removed integer conversions
  
  Revision  Changes    Path
  1.84      +103 -0    WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- ChangeLog	4 Jan 2006 01:02:43 -0000	1.83
  +++ ChangeLog	4 Jan 2006 08:20:13 -0000	1.84
  @@ -1,3 +1,106 @@
  +2005-12-30  Kimmo Kinnunen  <kimmo.kinnunen at nokia.com>
  +
  +        Reviewed by eseidel.
  +
  +	Changed use of QRect to QRectF in the points where SVG can have
  +	fractional numbers
  +        http://bugzilla.opendarwin.org/show_bug.cgi?id=4462
  +
  +        Added test cases:
  +	* svg/custom/fractional-rects.svg: copy of rounded-rects.svg with
  +	fractional coordinates.
  +
  +        * WebCore.xcodeproj/project.pbxproj:
  +        * kwq/KWQWMatrix.h:
  +        * kwq/KWQWMatrix.mm:
  +        (QWMatrix::mapRect): mapRect for QRectF
  +        * kwq/KWQRectF.h:
  +        * kwq/KWQRectF.mm:  Added. QRectF impl
  +        * kwq/KWQSizeF.h:
  +        * kwq/KWQSizeF.mm:  Added.QSizeF impl
  +        * kwq/KWQPointF.h:
  +        * kwq/KWQPointF.mm: Added. QPointF impl
  +        * kcanvas/KCanvasContainer.cpp:
  +        (KCanvasContainer::fillContains):
  +        (KCanvasContainer::strokeContains):
  +        (KCanvasContainer::relativeBBox):
  +        (KCanvasContainer::getAspectRatio): QRect -> QRectF
  +        * kcanvas/KCanvasContainer.h:
  +        * kcanvas/KCanvasFilters.cpp:
  +        (KCanvasFilterEffect::subRegion):
  +        (KCanvasFilterEffect::setSubRegion): QRect -> QRectF
  +        * kcanvas/KCanvasFilters.h:
  +        (KCanvasFilter::filterRect):
  +        (KCanvasFilter::setFilterRect):	QRect -> QRectF
  +        (KCanvasFEConvolveMatrix::kernelSize):
  +        (KCanvasFEConvolveMatrix::setKernelSize):
  +        (KCanvasFEConvolveMatrix::targetOffset):
  +        (KCanvasFEConvolveMatrix::setTargetOffset): QSize -> QSizeF
  +        * kcanvas/KCanvasItem.cpp:
  +        (RenderPath::fillContains):
  +        (RenderPath::strokeContains):
  +        (RenderPath::relativeBBox): QRect -> QRectF
  +        * kcanvas/KCanvasItem.h:
  +        * kcanvas/KCanvasResources.cpp:
  +        (KCanvasMarker::draw): QRect -> QRectF
  +        * kcanvas/KCanvasResources.h:
  +        * kcanvas/KCanvasTreeDebug.cpp:
  +        (hasFractions): helper function
  +        (operator<<): QSizeF operator, QRectF operator
  +        * kcanvas/KCanvasTreeDebug.h:
  +        * kcanvas/device/KRenderingPaintServerGradient.cpp:
  +        (KRenderingPaintServerLinearGradient::gradientStart):
  +        (KRenderingPaintServerLinearGradient::setGradientStart):
  +        (KRenderingPaintServerLinearGradient::gradientEnd):
  +        (KRenderingPaintServerLinearGradient::setGradientEnd):
  +        (KRenderingPaintServerRadialGradient::gradientCenter):
  +        (KRenderingPaintServerRadialGradient::setGradientCenter):
  +        (KRenderingPaintServerRadialGradient::gradientFocal):
  +        (KRenderingPaintServerRadialGradient::setGradientFocal): QPoint -> QPointF
  +        * kcanvas/device/KRenderingPaintServerGradient.h:
  +        * kcanvas/device/KRenderingPaintServerPattern.cpp:
  +        (KRenderingPaintServerPattern::Private::Private): x, y, width, height -> QRectF
  +        (KRenderingPaintServerPattern::setBbox): replaced get/set methods
  +        (KRenderingPaintServerPattern::bbox): replaced get/set methods
  +        (KRenderingPaintServerPattern::externalRepresentation):
  +        * kcanvas/device/KRenderingPaintServerPattern.h:
  +        * kcanvas/device/quartz/KCanvasFilterQuartz.h:
  +        * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
  +        (KCanvasFilterQuartz::prepareFilter):
  +        (KCanvasFilterQuartz::applyFilter): QRect -> QRectF
  +        * kcanvas/device/quartz/KCanvasItemQuartz.h:
  +        (KCanvasItemQuartz::getAbsoluteRepaintRect): QRect -> QRectF
  +        * kcanvas/device/quartz/KCanvasItemQuartz.mm:
  +        (drawMarkerWithData):
  +        (KCanvasItemQuartz::drawMarkersIfNeeded):
  +        (KCanvasItemQuartz::paint): QRect -> QRectF
  +        (KCanvasItemQuartz::nodeAtPoint): QPoint -> QPointF
  +        (KCanvasItemQuartz::bboxForPath) :QRect -> QRectF
  +        (KCanvasItemQuartz::hitsPath):
  +        * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
  +        (KCanvasContainerQuartz::getAbsoluteRepaintRect): QRect -> QRectF
  +        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
  +        (KRenderingPaintServerPatternQuartz::draw): QRect -> QRectF
  +        * khtml/rendering/render_object.h:
  +        (khtml::RenderObject::relativeBBox):QRect -> QRectF
  +        * ksvg2/svg/SVGFilterElementImpl.cpp:
  +        (SVGFilterElementImpl::canvasResource): QRect -> QRectF
  +        * ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp:
  +        (SVGFilterPrimitiveStandardAttributesImpl::setStandardAttributes):
  +        * ksvg2/svg/SVGLengthImpl.cpp:
  +        (SVGLengthImpl::value): QRect -> QRectF
  +        * ksvg2/svg/SVGLinearGradientElementImpl.cpp:
  +        (SVGLinearGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
  +        * ksvg2/svg/SVGLocatableImpl.cpp:
  +        (SVGLocatableImpl::getBBox): Rect -> QRectF
  +        * ksvg2/svg/SVGPatternElementImpl.cpp:
  +        (SVGPatternElementImpl::drawPatternContentIntoTile): QRect -> QRectF
  +        * ksvg2/svg/SVGRadialGradientElementImpl.cpp:
  +        (SVGRadialGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
  +        * ksvg2/svg/SVGSVGElementImpl.cpp:
  +        (SVGSVGElementImpl::checkIntersection): QRect -> QRectF, removed integer conversions
  +        (SVGSVGElementImpl::checkEnclosure): QRect -> QRectF, removed integer conversions
  +
   2006-01-03  Maciej Stachowiak  <mjs at apple.com>
   
           Reviewed by Vicki.
  
  
  
  1.1                  WebCore/ForwardingHeaders/QPointF
  
  Index: QPointF
  ===================================================================
  #import "KWQPointF.h"
  
  
  
  1.1                  WebCore/ForwardingHeaders/QRectF
  
  Index: QRectF
  ===================================================================
  #import "KWQRectF.h"
  
  
  
  1.1                  WebCore/ForwardingHeaders/QSizeF
  
  Index: QSizeF
  ===================================================================
  #import "KWQSizeF.h"
  
  
  
  1.63      +28 -0     WebCore/WebCore.xcodeproj/project.pbxproj
  
  Index: project.pbxproj
  ===================================================================
  RCS file: /cvs/root/WebCore/WebCore.xcodeproj/project.pbxproj,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- project.pbxproj	23 Dec 2005 18:44:00 -0000	1.62
  +++ project.pbxproj	4 Jan 2006 08:20:15 -0000	1.63
  @@ -9,6 +9,13 @@
   /* Begin PBXBuildFile section */
   		1A69D381085627410009880D /* domparser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A69D37F085627410009880D /* domparser.h */; };
   		1A69D382085627410009880D /* domparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A69D380085627410009880D /* domparser.cpp */; };
  +		4756536509652C5D00BD9F29 /* KWQPointF.h in Headers */ = {isa = PBXBuildFile; fileRef = 4756535F09652C5D00BD9F29 /* KWQPointF.h */; };
  +		4756536609652C5D00BD9F29 /* KWQPointF.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4756536009652C5D00BD9F29 /* KWQPointF.mm */; };
  +		4756536709652C5D00BD9F29 /* KWQRectF.h in Headers */ = {isa = PBXBuildFile; fileRef = 4756536109652C5D00BD9F29 /* KWQRectF.h */; };
  +		4756536809652C5D00BD9F29 /* KWQRectF.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4756536209652C5D00BD9F29 /* KWQRectF.mm */; };
  +		4756536909652C5D00BD9F29 /* KWQSizeF.h in Headers */ = {isa = PBXBuildFile; fileRef = 4756536309652C5D00BD9F29 /* KWQSizeF.h */; };
  +		4756536A09652C5D00BD9F29 /* KWQSizeF.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4756536409652C5D00BD9F29 /* KWQSizeF.mm */; };
  +		475658CB096A728100BD9F29 /* KCanvasHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 475658CA096A728100BD9F29 /* KCanvasHelper.h */; };
   		550A0BC9085F6039007353D6 /* dom_qname.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* dom_qname.cpp */; };
   		550A0BCA085F6039007353D6 /* dom_qname.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* dom_qname.h */; };
   		550A0BCD085F604D007353D6 /* htmlnames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BCB085F604D007353D6 /* htmlnames.cpp */; };
  @@ -1620,6 +1627,13 @@
   		1A69D380085627410009880D /* domparser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = domparser.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
   		2D90660B0665D937006B6F1A /* KWQClipboard.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KWQClipboard.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
   		2D90660C0665D937006B6F1A /* KWQClipboard.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQClipboard.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
  +		4756535F09652C5D00BD9F29 /* KWQPointF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQPointF.h; sourceTree = "<group>"; };
  +		4756536009652C5D00BD9F29 /* KWQPointF.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQPointF.mm; sourceTree = "<group>"; };
  +		4756536109652C5D00BD9F29 /* KWQRectF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQRectF.h; sourceTree = "<group>"; };
  +		4756536209652C5D00BD9F29 /* KWQRectF.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQRectF.mm; sourceTree = "<group>"; };
  +		4756536309652C5D00BD9F29 /* KWQSizeF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KWQSizeF.h; sourceTree = "<group>"; };
  +		4756536409652C5D00BD9F29 /* KWQSizeF.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQSizeF.mm; sourceTree = "<group>"; };
  +		475658CA096A728100BD9F29 /* KCanvasHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasHelper.h; sourceTree = "<group>"; };
   		4758C44308C5F217009BAF05 /* KCanvasPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasPath.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
   		51111AC007BD812C00B7162C /* DOMUtility.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMUtility.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
   		5150C2A10702629000AF642C /* WebDashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDashboardRegion.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
  @@ -3355,6 +3369,7 @@
   				A8C0FB8A089701F800BA5114 /* KCanvasResources.cpp */,
   				A8C0FB8B089701F800BA5114 /* KCanvasResources.h */,
   				A8C0FB8C089701F800BA5114 /* KCanvasTypes.h */,
  +				475658CA096A728100BD9F29 /* KCanvasHelper.h */,
   				A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */,
   				A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */,
   			);
  @@ -4172,6 +4187,12 @@
   				F58786BA02DE3B8601EA4122 /* KWQStringList.h */,
   				F587853202DE375901EA4122 /* KWQStringList.mm */,
   				F58786BB02DE3B8601EA4122 /* KWQStyle.h */,
  +				4756535F09652C5D00BD9F29 /* KWQPointF.h */,
  +				4756536009652C5D00BD9F29 /* KWQPointF.mm */,
  +				4756536109652C5D00BD9F29 /* KWQRectF.h */,
  +				4756536209652C5D00BD9F29 /* KWQRectF.mm */,
  +				4756536309652C5D00BD9F29 /* KWQSizeF.h */,
  +				4756536409652C5D00BD9F29 /* KWQSizeF.mm */,
   				F57B0EE002EBC78B018635CA /* KWQStyle.mm */,
   				F58786BC02DE3B8601EA4122 /* KWQStyleSheet.h */,
   				F58786BD02DE3B8601EA4122 /* KWQTextCodec.h */,
  @@ -4698,6 +4719,10 @@
   				A88AD5180952499F001DD196 /* RGBColorImpl.h in Headers */,
   				A88AD5190952499F001DD196 /* KDOMHeaders.h in Headers */,
   				A88AD51A0952499F001DD196 /* KDOMSettings.h in Headers */,
  +				4756536509652C5D00BD9F29 /* KWQPointF.h in Headers */,
  +				4756536709652C5D00BD9F29 /* KWQRectF.h in Headers */,
  +				4756536909652C5D00BD9F29 /* KWQSizeF.h in Headers */,
  +				475658CB096A728100BD9F29 /* KCanvasHelper.h in Headers */,
   			);
   			runOnlyForDeploymentPostprocessing = 0;
   		};
  @@ -6536,6 +6561,9 @@
   				A88AD51D0952499F001DD196 /* XLinkNamesWrapper.cpp in Sources */,
   				A88AD51E0952499F001DD196 /* SVGNamesWrapper.cpp in Sources */,
   				A88AD5AA09525131001DD196 /* SVGCSSStyleSelector.cpp in Sources */,
  +				4756536609652C5D00BD9F29 /* KWQPointF.mm in Sources */,
  +				4756536809652C5D00BD9F29 /* KWQRectF.mm in Sources */,
  +				4756536A09652C5D00BD9F29 /* KWQSizeF.mm in Sources */,
   			);
   			runOnlyForDeploymentPostprocessing = 0;
   		};
  
  
  
  1.12      +7 -7      WebCore/kcanvas/KCanvasContainer.cpp
  
  Index: KCanvasContainer.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasContainer.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- KCanvasContainer.cpp	29 Nov 2005 11:20:42 -0000	1.11
  +++ KCanvasContainer.cpp	4 Jan 2006 08:20:18 -0000	1.12
  @@ -68,7 +68,7 @@
       d->matrix = matrix;
   }
   
  -bool KCanvasContainer::fillContains(const QPoint &p) const
  +bool KCanvasContainer::fillContains(const QPointF &p) const
   {
       khtml::RenderObject *current = firstChild();
       for(; current != 0; current = current->nextSibling())
  @@ -80,7 +80,7 @@
       return false;
   }
   
  -bool KCanvasContainer::strokeContains(const QPoint &p) const
  +bool KCanvasContainer::strokeContains(const QPointF &p) const
   {
       khtml::RenderObject *current = firstChild();
       for(; current != 0; current = current->nextSibling())
  @@ -92,14 +92,14 @@
       return false;
   }
   
  -QRect KCanvasContainer::relativeBBox(bool includeStroke) const
  +QRectF KCanvasContainer::relativeBBox(bool includeStroke) const
   {
  -    QRect rect(0,0,0,0);
  +    QRectF rect;
       
       khtml::RenderObject *current = firstChild();
       for(; current != 0; current = current->nextSibling()) {
  -        QRect childBBox = current->relativeBBox(includeStroke);
  -        QRect mappedBBox = current->localTransform().mapRect(childBBox);
  +        QRectF childBBox = current->relativeBBox(includeStroke);
  +        QRectF mappedBBox = current->localTransform().mapRect(childBBox);
           rect = rect.unite(mappedBBox);
       }
   
  @@ -116,7 +116,7 @@
       return d->slice;
   }
   
  -KCanvasMatrix KCanvasContainer::getAspectRatio(const QRect logical, const QRect physical) const
  +KCanvasMatrix KCanvasContainer::getAspectRatio(const QRectF logical, const QRectF physical) const
   {
       KCanvasMatrix temp;
   
  
  
  
  1.8       +8 -8      WebCore/kcanvas/KCanvasContainer.h
  
  Index: KCanvasContainer.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasContainer.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- KCanvasContainer.h	23 Nov 2005 15:14:05 -0000	1.7
  +++ KCanvasContainer.h	4 Jan 2006 08:20:18 -0000	1.8
  @@ -59,18 +59,18 @@
       virtual bool isKCanvasContainer() const { return true; }
       virtual const char *renderName() const { return "KCanvasContainer"; }
   
  -    virtual bool fillContains(const QPoint &p) const;
  -    virtual bool strokeContains(const QPoint &p) const;
  -    virtual QRect relativeBBox(bool includeStroke = true) const;
  +    virtual bool fillContains(const QPointF &p) const;
  +    virtual bool strokeContains(const QPointF &p) const;
  +    virtual QRectF relativeBBox(bool includeStroke = true) const;
       
       virtual QMatrix localTransform() const;
       virtual void setLocalTransform(const QMatrix &matrix);
       
  -    virtual void setViewport(const QRect &viewport) = 0;
  -    virtual QRect viewport() const = 0;
  +    virtual void setViewport(const QRectF& viewport) = 0;
  +    virtual QRectF viewport() const = 0;
   
  -    virtual void setViewBox(const QRect &viewBox) = 0;
  -    virtual QRect viewBox() const = 0;
  +    virtual void setViewBox(const QRectF& viewBox) = 0;
  +    virtual QRectF viewBox() const = 0;
   
       virtual void setAlign(KCAlign align) = 0;
       virtual KCAlign align() const = 0;
  @@ -79,7 +79,7 @@
       bool slice() const;
       
   protected:
  -    KCanvasMatrix getAspectRatio(const QRect logical, const QRect physical) const;
  +    KCanvasMatrix getAspectRatio(const QRectF logical, const QRectF physical) const;
   
   private:
       class Private;
  
  
  
  1.13      +2 -14     WebCore/kcanvas/KCanvasFilters.cpp
  
  Index: KCanvasFilters.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasFilters.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- KCanvasFilters.cpp	20 Dec 2005 09:30:24 -0000	1.12
  +++ KCanvasFilters.cpp	4 Jan 2006 08:20:19 -0000	1.13
  @@ -71,12 +71,12 @@
       return e.externalRepresentation(ts);
   }
   
  -QRect KCanvasFilterEffect::subRegion() const
  +QRectF KCanvasFilterEffect::subRegion() const
   {
       return m_subregion;
   }
   
  -void KCanvasFilterEffect::setSubRegion(const QRect &subregion)
  +void KCanvasFilterEffect::setSubRegion(const QRectF &subregion)
   {
       m_subregion = subregion;
   }
  @@ -142,12 +142,6 @@
       return ts;  
   }
   
  -static QTextStream &operator<<(QTextStream &ts, QPointF p)
  -{
  -    ts << "x=" << p.x() << " y=" << p.y();
  -    return ts;  
  -}
  -
   static QTextStream &operator<<(QTextStream &ts, KCBlendModeType t)
   {
       switch (t) 
  @@ -266,12 +260,6 @@
       return ts;
   }
   
  -static QTextStream &operator<<(QTextStream &ts, QSize s)
  -{   
  -    ts << "x=" << s.width() << " y=" << s.height(); 
  -    return ts;
  -}
  -
   QTextStream &KCanvasFEConvolveMatrix::externalRepresentation(QTextStream &ts) const
   {
       ts << "[type=CONVOLVE-MATRIX] ";
  
  
  
  1.17      +15 -50    WebCore/kcanvas/KCanvasFilters.h
  
  Index: KCanvasFilters.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasFilters.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- KCanvasFilters.h	20 Dec 2005 09:30:24 -0000	1.16
  +++ KCanvasFilters.h	4 Jan 2006 08:20:19 -0000	1.17
  @@ -25,7 +25,7 @@
   #define KCanvasFilters_H
   
   #include "KCanvasResources.h"
  -
  +#include <QSizeF>
   // Enumerations
   typedef enum
   {
  @@ -75,41 +75,6 @@
       float m_z;
   };
   
  -// FIXME: QPointF and QSizeF will be removed from this file when
  -// http://bugzilla.opendarwin.org/show_bug.cgi?id=4462 is resolved.
  -
  -class QPointF {
  -public:
  -    QPointF(float x, float y) : m_x(x), m_y(y) { }
  -    // this constructor is needed for building on gcc 3.3
  -    QPointF() { }
  -
  -    float x() const { return m_x; }
  -    void setX(float x) { m_x = x; }
  -    
  -    float y() const { return m_y; }
  -    void setY(float y) { m_y = y; }
  -    
  -private:
  -    float m_x;
  -    float m_y;
  -};
  -
  -class QSizeF {
  -public:
  -    QSizeF(float w, float h) : m_width(w), m_height(h) { }
  -
  -    float width() const { return m_width; }
  -    void setWidth(float width) { m_width = width; }
  -    
  -    float height() const { return m_height; }
  -    void setHeight(float height) { m_height = height; }
  -    
  -private:
  -    float m_width;
  -    float m_height;
  -};
  -
   class KCanvasFilterEffect;
   class KRenderingDevice;
   
  @@ -127,18 +92,18 @@
       bool effectBoundingBoxMode() const { return m_effectBBoxMode; }
       void setEffectBoundingBoxMode(bool bboxMode) { m_effectBBoxMode = bboxMode; }    
   
  -    QRect filterRect() const { return m_filterRect; }
  -    void setFilterRect(const QRect &rect) { m_filterRect = rect; }
  +    QRectF filterRect() const { return m_filterRect; }
  +    void setFilterRect(const QRectF &rect) { m_filterRect = rect; }
   
       void addFilterEffect(KCanvasFilterEffect *effect);
   
  -    virtual void prepareFilter(KRenderingDevice *device, const QRect &bbox) = 0;
  -    virtual void applyFilter(KRenderingDevice *device, const QRect &bbox) = 0;
  +    virtual void prepareFilter(KRenderingDevice *device, const QRectF &bbox) = 0;
  +    virtual void applyFilter(KRenderingDevice *device, const QRectF &bbox) = 0;
   
       QTextStream &externalRepresentation(QTextStream &) const;
   
   protected:
  -    QRect m_filterRect;
  +    QRectF m_filterRect;
       Q3ValueList<KCanvasFilterEffect *> m_effects;
       bool m_filterBBoxMode;
       bool m_effectBBoxMode;
  @@ -165,8 +130,8 @@
   
       virtual KCFilterEffectType effectType() const { return FE_TURBULENCE; }
   
  -    QRect subRegion() const;
  -    void setSubRegion(const QRect &subregion);
  +    QRectF subRegion() const;
  +    void setSubRegion(const QRectF &subregion);
   
       QString in() const;
       void setIn(const QString &in);
  @@ -181,7 +146,7 @@
       virtual QTextStream &externalRepresentation(QTextStream &) const;
   
   private:
  -    QRect m_subregion;
  +    QRectF m_subregion;
       QString m_in;
       QString m_result;
   };
  @@ -327,8 +292,8 @@
   public:
       KCanvasFEConvolveMatrix() { };
   
  -    QSize kernelSize() const { return m_kernelSize; }
  -    void setKernelSize(QSize kernelSize) { m_kernelSize = kernelSize; }
  +    QSizeF kernelSize() const { return m_kernelSize; }
  +    void setKernelSize(QSizeF kernelSize) { m_kernelSize = kernelSize; }
       
       Q3ValueList<float> kernel() const { return m_kernelMatrix; }
       void setKernel(Q3ValueList<float> kernel) { m_kernelMatrix = kernel; }
  @@ -339,8 +304,8 @@
       float bias() const { return m_bias; }
       void setBias(float bias) { m_bias = bias; }
       
  -    QSize targetOffset() const { return m_targetOffset; }
  -    void setTargetOffset(QSize targetOffset) { m_targetOffset = targetOffset; }
  +    QSizeF targetOffset() const { return m_targetOffset; }
  +    void setTargetOffset(QSizeF targetOffset) { m_targetOffset = targetOffset; }
       
       KCEdgeModeType edgeMode() const { return m_edgeMode; }
       void setEdgeMode(KCEdgeModeType edgeMode) { m_edgeMode = edgeMode; }
  @@ -354,11 +319,11 @@
       QTextStream &externalRepresentation(QTextStream &) const;
   
   private:
  -    QSize m_kernelSize;
  +    QSizeF m_kernelSize;
       Q3ValueList<float> m_kernelMatrix; // maybe should be a real matrix?
       float m_divisor;
       float m_bias;
  -    QSize m_targetOffset;
  +    QSizeF m_targetOffset;
       KCEdgeModeType m_edgeMode;
       QPointF m_kernelUnitLength;
       bool m_preserveAlpha;
  
  
  
  1.11      +5 -5      WebCore/kcanvas/KCanvasItem.cpp
  
  Index: KCanvasItem.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasItem.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- KCanvasItem.cpp	6 Dec 2005 01:23:18 -0000	1.10
  +++ KCanvasItem.cpp	4 Jan 2006 08:20:19 -0000	1.11
  @@ -53,7 +53,7 @@
       KSVG::KCanvasRenderingStyle *style;
       RefPtr<KCanvasPath> path;
   
  -    QRect fillBBox, strokeBbox;
  +    QRectF fillBBox, strokeBbox;
       QMatrix matrix;
   };        
   
  @@ -85,7 +85,7 @@
       d->matrix = matrix;
   }
   
  -bool RenderPath::fillContains(const QPoint &p) const
  +bool RenderPath::fillContains(const QPointF &p) const
   {
       if(d->path && d->style)
           return hitsPath(p, true);
  @@ -93,7 +93,7 @@
       return false;
   }
   
  -bool RenderPath::strokeContains(const QPoint &p) const
  +bool RenderPath::strokeContains(const QPointF &p) const
   {
       if(d->path && d->style)
           return hitsPath(p, false);
  @@ -101,9 +101,9 @@
       return false;
   }
   
  -QRect RenderPath::relativeBBox(bool includeStroke) const
  +QRectF RenderPath::relativeBBox(bool includeStroke) const
   {
  -    QRect result;
  +    QRectF result;
       
       if (!d->path)
           return result;
  
  
  
  1.8       +7 -5      WebCore/kcanvas/KCanvasItem.h
  
  Index: KCanvasItem.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasItem.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- KCanvasItem.h	6 Dec 2005 01:23:18 -0000	1.7
  +++ KCanvasItem.h	4 Jan 2006 08:20:19 -0000	1.8
  @@ -28,10 +28,12 @@
   #include <qpoint.h>
   #include <qrect.h>
   #include <q3valuelist.h>
  +#include <QRectF>
   
   #include <kcanvas/KCanvasTypes.h>
   #include "khtml/rendering/render_object.h"
   
  +class QPointF;
   namespace KSVG {
       class SVGStyledElementImpl;
   };
  @@ -48,11 +50,11 @@
       virtual ~RenderPath();
   
       // Hit-detection seperated for the fill and the stroke
  -    virtual bool fillContains(const QPoint &p) const;
  -    virtual bool strokeContains(const QPoint &p) const;
  +    virtual bool fillContains(const QPointF &p) const;
  +    virtual bool strokeContains(const QPointF &p) const;
   
       // Returns an unscaled bounding box (not even including localTransform()) for this vector path
  -    virtual QRect relativeBBox(bool includeStroke = true) const;
  +    virtual QRectF relativeBBox(bool includeStroke = true) const;
   
       // Drawing
       void setupForDraw() const;
  @@ -73,8 +75,8 @@
   protected:
       // restricted set of args for passing to paint servers, etc.
       const KCanvasCommonArgs commonArgs() const;
  -    virtual bool hitsPath(const QPoint &hitPoint, bool fill) const = 0;
  -    virtual QRect bboxForPath(bool includeStroke) const = 0;
  +    virtual bool hitsPath(const QPointF &hitPoint, bool fill) const = 0;
  +    virtual QRectF bboxForPath(bool includeStroke) const = 0;
   
   private:
       class Private;
  
  
  
  1.13      +3 -2      WebCore/kcanvas/KCanvasResources.cpp
  
  Index: KCanvasResources.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasResources.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- KCanvasResources.cpp	6 Dec 2005 01:23:19 -0000	1.12
  +++ KCanvasResources.cpp	4 Jan 2006 08:20:19 -0000	1.13
  @@ -195,7 +195,7 @@
       return m_scaleY;
   }
   
  -void KCanvasMarker::draw(const QRect &rect, double x, double y, double strokeWidth, double angle)
  +void KCanvasMarker::draw(const QRectF &rect, double x, double y, double strokeWidth, double angle)
   {
       if(m_marker)
       {
  @@ -213,8 +213,9 @@
               rotation.scale(strokeWidth, strokeWidth);
   
           // FIXME: PaintInfo should be passed into this method instead.
  +        // FIXME: bounding box fractions lost
           QPainter p;
  -        khtml::RenderObject::PaintInfo info(&p, rect, PaintActionForeground, 0);
  +        khtml::RenderObject::PaintInfo info(&p, enclosingQRect(rect), PaintActionForeground, 0);
           m_marker->setLocalTransform(rotation.multiply(translation).qmatrix());
           static_cast<KCanvasContainer *>(m_marker)->setDrawsContents(true);
           m_marker->paint(info, 0, 0);
  
  
  
  1.12      +1 -1      WebCore/kcanvas/KCanvasResources.h
  
  Index: KCanvasResources.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasResources.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- KCanvasResources.h	6 Dec 2005 01:23:19 -0000	1.11
  +++ KCanvasResources.h	4 Jan 2006 08:20:20 -0000	1.12
  @@ -114,7 +114,7 @@
       float scaleY() const;
   
        // Draw onto the canvas
  -    void draw(const QRect &rect, double x, double y, double strokeWidth = 1., double angle = 0.0);
  +    void draw(const QRectF &rect, double x, double y, double strokeWidth = 1., double angle = 0.0);
   
       QTextStream& externalRepresentation(QTextStream &) const; 
   private:
  
  
  
  1.13      +66 -0     WebCore/kcanvas/KCanvasTreeDebug.cpp
  
  Index: KCanvasTreeDebug.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasTreeDebug.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- KCanvasTreeDebug.cpp	6 Dec 2005 01:53:12 -0000	1.12
  +++ KCanvasTreeDebug.cpp	4 Jan 2006 08:20:20 -0000	1.13
  @@ -27,6 +27,7 @@
   #include "config.h"
   #include "KCanvasTreeDebug.h"
   
  +#include <math.h>
   #include <kcanvas/KCanvas.h>
   #include <kcanvas/KCanvasMatrix.h>
   #include <kcanvas/RenderPath.h>
  @@ -56,6 +57,7 @@
   #include "htmlnames.h"
   
   #include <qtextstream.h>
  +#include <QSizeF>
   
   using namespace KSVG;
   
  @@ -95,6 +97,70 @@
       return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
   }
   
  +bool hasFractions(double val)
  +{
  +    double epsilon = 0.0001;
  +    int ival = int(val);
  +    double dval = double(ival);    
  +    return (fabs(val-dval) > epsilon);
  +}
  +
  +QTextStream &operator<<(QTextStream &ts, const QRectF &r)
  +{
  +    ts << "at ("; 
  +    if (hasFractions(r.x())) 
  +        ts << r.x();
  +    else 
  +        ts << int(r.x());
  +    ts << ",";
  +    if (hasFractions(r.y())) 
  +        ts << r.y();
  +    else 
  +        ts << int(r.y());
  +    ts << ") size ";
  +    if (hasFractions(r.width())) 
  +        ts << r.width(); 
  +    else 
  +        ts << int(r.width()); 
  +    ts << "x";
  +    if (hasFractions(r.height())) 
  +        ts << r.height();
  +    else 
  +        ts << int(r.height());
  +    return ts;
  +}
  +
  +QTextStream &operator<<(QTextStream &ts, const QPointF &p)
  +{
  +    ts << "(";    
  +    if (hasFractions(p.x()))
  +        ts << p.x();
  +    else 
  +        ts << int(p.x());    
  +    ts << ",";
  +    if (hasFractions(p.y())) 
  +        ts << p.y();
  +    else 
  +        ts << int(p.y());    
  +    return ts << ")";
  +}
  +
  +QTextStream &operator<<(QTextStream &ts, const QSizeF &s)
  +{   
  +    ts << "width=";
  +    if (hasFractions(s.width()))
  +        ts << s.width();
  +    else
  +        ts << int(s.width());
  +    ts << " height=";
  +    if (hasFractions(s.height())) 
  +        ts << s.height();
  +    else
  +        ts << int(s.height());
  +     return ts;
  +}
  +
  +
   QTextStream &operator<<(QTextStream &ts, const QMatrix &m)
   {
       if (m.isIdentity())
  
  
  
  1.6       +6 -0      WebCore/kcanvas/KCanvasTreeDebug.h
  
  Index: KCanvasTreeDebug.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/KCanvasTreeDebug.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- KCanvasTreeDebug.h	27 Nov 2005 11:02:15 -0000	1.5
  +++ KCanvasTreeDebug.h	4 Jan 2006 08:20:20 -0000	1.6
  @@ -28,9 +28,12 @@
   #include <q3valuelist.h>
   
   class QMatrix;
  +class QSizeF;
   class QRect;
   class QPoint;
   class QColor;
  +class QRectF;
  +class QPointF;
   class QStringList;
   class KCClipData;
   class KCPathData;
  @@ -52,6 +55,9 @@
   QTextStream &operator<<(QTextStream &ts, const QRect &);
   QTextStream &operator<<(QTextStream &ts, const QColor &);
   QTextStream &operator<<(QTextStream &ts, const QPoint &);
  +QTextStream &operator<<(QTextStream &ts, const QSizeF &);
  +QTextStream &operator<<(QTextStream &ts, const QRectF &);
  +QTextStream &operator<<(QTextStream &ts, const QPointF &);
   
   // helper operators specific to dumping the render tree. these are used in various classes to dump the render tree
   // these could be defined in separate namespace to avoid matching these generic signatures unintentionally.
  
  
  
  1.10      +10 -10    WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp
  
  Index: KRenderingPaintServerGradient.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- KRenderingPaintServerGradient.cpp	27 Nov 2005 11:02:16 -0000	1.9
  +++ KRenderingPaintServerGradient.cpp	4 Jan 2006 08:20:22 -0000	1.10
  @@ -172,7 +172,7 @@
       Private() { }
       ~Private() { }
   
  -    QPoint start, end;
  +    QPointF start, end;
   };
   
   KRenderingPaintServerLinearGradient::KRenderingPaintServerLinearGradient() : KRenderingPaintServerGradient(), d(new Private())
  @@ -184,22 +184,22 @@
       delete d;
   }
   
  -QPoint KRenderingPaintServerLinearGradient::gradientStart() const
  +QPointF KRenderingPaintServerLinearGradient::gradientStart() const
   {
       return d->start;
   }
   
  -void KRenderingPaintServerLinearGradient::setGradientStart(const QPoint &start)
  +void KRenderingPaintServerLinearGradient::setGradientStart(const QPointF &start)
   {
       d->start = start;
   }
   
  -QPoint KRenderingPaintServerLinearGradient::gradientEnd() const
  +QPointF KRenderingPaintServerLinearGradient::gradientEnd() const
   {
       return d->end;
   }
   
  -void KRenderingPaintServerLinearGradient::setGradientEnd(const QPoint &end)
  +void KRenderingPaintServerLinearGradient::setGradientEnd(const QPointF &end)
   {
       d->end = end;
   }
  @@ -226,7 +226,7 @@
       ~Private() { }
   
       float radius;
  -    QPoint center, focal;
  +    QPointF center, focal;
   };
   
   KRenderingPaintServerRadialGradient::KRenderingPaintServerRadialGradient() : KRenderingPaintServerGradient(), d(new Private())
  @@ -238,22 +238,22 @@
       delete d;
   }
   
  -QPoint KRenderingPaintServerRadialGradient::gradientCenter() const
  +QPointF KRenderingPaintServerRadialGradient::gradientCenter() const
   {
       return d->center;
   }
   
  -void KRenderingPaintServerRadialGradient::setGradientCenter(const QPoint &center)
  +void KRenderingPaintServerRadialGradient::setGradientCenter(const QPointF &center)
   {
       d->center = center;
   }
   
  -QPoint KRenderingPaintServerRadialGradient::gradientFocal() const
  +QPointF KRenderingPaintServerRadialGradient::gradientFocal() const
   {
       return d->focal;
   }
   
  -void KRenderingPaintServerRadialGradient::setGradientFocal(const QPoint &focal)
  +void KRenderingPaintServerRadialGradient::setGradientFocal(const QPointF &focal)
   {
       d->focal = focal;
   }
  
  
  
  1.7       +8 -8      WebCore/kcanvas/device/KRenderingPaintServerGradient.h
  
  Index: KRenderingPaintServerGradient.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerGradient.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- KRenderingPaintServerGradient.h	8 Sep 2005 08:03:13 -0000	1.6
  +++ KRenderingPaintServerGradient.h	4 Jan 2006 08:20:22 -0000	1.7
  @@ -102,11 +102,11 @@
       virtual KCPaintServerType type() const;
   
       // 'Linear Gradient' interface
  -    QPoint gradientStart() const;
  -    void setGradientStart(const QPoint &start);
  +    QPointF gradientStart() const;
  +    void setGradientStart(const QPointF &start);
   
  -    QPoint gradientEnd() const;
  -    void setGradientEnd(const QPoint &end);
  +    QPointF gradientEnd() const;
  +    void setGradientEnd(const QPointF &end);
   
       QTextStream &externalRepresentation(QTextStream &) const;
   private:
  @@ -123,11 +123,11 @@
       virtual KCPaintServerType type() const;
   
       // 'Radial Gradient' interface
  -    QPoint gradientCenter() const;
  -    void setGradientCenter(const QPoint &center);
  +    QPointF gradientCenter() const;
  +    void setGradientCenter(const QPointF &center);
   
  -    QPoint gradientFocal() const;
  -    void setGradientFocal(const QPoint &focal);
  +    QPointF gradientFocal() const;
  +    void setGradientFocal(const QPointF &focal);
   
       float gradientRadius() const;
       void setGradientRadius(float radius);
  
  
  
  1.8       +6 -37     WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp
  
  Index: KRenderingPaintServerPattern.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- KRenderingPaintServerPattern.cpp	21 Nov 2005 08:29:14 -0000	1.7
  +++ KRenderingPaintServerPattern.cpp	4 Jan 2006 08:20:22 -0000	1.8
  @@ -34,7 +34,6 @@
       Private()
       {
           tile = 0;
  -        x = y = width = height = 0;
           useBoundingBoxMode = true;
           listener = 0;
       }
  @@ -42,7 +41,7 @@
   
       KCanvasImage *tile;
       KCanvasMatrix patternTransform;
  -    float x, y, width, height;
  +    QRectF bbox;
       bool useBoundingBoxMode;
       KCanvasResourceListener *listener;
   };
  @@ -56,24 +55,14 @@
       delete d;
   }
   
  -float KRenderingPaintServerPattern::x() const
  +void KRenderingPaintServerPattern::setBbox(const QRectF& rect)
   {
  -    return d->x;
  +    d->bbox = rect;
   }
   
  -void KRenderingPaintServerPattern::setX(float x)
  +QRectF KRenderingPaintServerPattern::bbox() const
   {
  -    d->x = x;
  -}
  -    
  -float KRenderingPaintServerPattern::y() const
  -{
  -    return d->y;
  -}
  -
  -void KRenderingPaintServerPattern::setY(float y)
  -{
  -    d->y = y;
  +    return d->bbox;
   }
   
   bool KRenderingPaintServerPattern::boundingBoxMode() const
  @@ -86,26 +75,6 @@
       d->useBoundingBoxMode = mode;
   }
   
  -float KRenderingPaintServerPattern::width() const
  -{
  -    return d->width;
  -}
  -
  -void KRenderingPaintServerPattern::setWidth(float width)
  -{
  -    d->width = width;
  -}
  -
  -float KRenderingPaintServerPattern::height() const
  -{
  -    return d->height;
  -}
  -
  -void KRenderingPaintServerPattern::setHeight(float height)
  -{
  -    d->height = height;
  -}
  -
   KCanvasImage *KRenderingPaintServerPattern::tile() const
   {
       return d->tile;
  @@ -144,7 +113,7 @@
   QTextStream &KRenderingPaintServerPattern::externalRepresentation(QTextStream &ts) const
   {
        ts << "[type=PATTERN]"
  -        << " [x="<< x() << " y=" << y() << " w=" << width() << " h=" << height() << "]";
  +        << " [bbox=" << bbox() << "]";
       if (!boundingBoxMode())
           ts << " [bounding box mode=" << boundingBoxMode() << "]";        
       if (!patternTransform().qmatrix().isIdentity())
  
  
  
  1.6       +3 -12     WebCore/kcanvas/device/KRenderingPaintServerPattern.h
  
  Index: KRenderingPaintServerPattern.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerPattern.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- KRenderingPaintServerPattern.h	8 Sep 2005 08:03:13 -0000	1.5
  +++ KRenderingPaintServerPattern.h	4 Jan 2006 08:20:23 -0000	1.6
  @@ -38,24 +38,15 @@
   
       virtual KCPaintServerType type() const;
   
  -    // Pattern bbox (should be QRectF!)
  -    float x() const;
  -    void setX(float x);
  -    
  -    float y() const;
  -    void setY(float y);
  +    // Pattern bbox
  +    void setBbox(const QRectF &rect);
  +    QRectF bbox() const;
       
       // Pattern x,y phase points are relative when in boundingBoxMode
       // BoundingBox mode is true by default.
       bool boundingBoxMode() const;
       void setBoundingBoxMode(bool mode = true);
       
  -    float width() const;
  -    void setWidth(float width);
  -    
  -    float height() const;
  -    void setHeight(float height);
  -    
       // 'Pattern' interface
       KCanvasImage *tile() const;
       void setTile(KCanvasImage *tile);
  
  
  
  1.9       +2 -2      WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.h
  
  Index: KCanvasFilterQuartz.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- KCanvasFilterQuartz.h	28 Nov 2005 23:33:59 -0000	1.8
  +++ KCanvasFilterQuartz.h	4 Jan 2006 08:20:24 -0000	1.9
  @@ -41,8 +41,8 @@
       KCanvasFilterQuartz();
       virtual ~KCanvasFilterQuartz();
       
  -    virtual void prepareFilter(KRenderingDevice *device, const QRect &bbox);
  -    virtual void applyFilter(KRenderingDevice *device, const QRect &bbox);
  +    virtual void prepareFilter(KRenderingDevice *device, const QRectF &bbox);
  +    virtual void applyFilter(KRenderingDevice *device, const QRectF &bbox);
       
       CIImage *imageForName(const QString &name) const;
       void setImageForName(CIImage *image, const QString &name);
  
  
  
  1.23      +3 -3      WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm
  
  Index: KCanvasFilterQuartz.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- KCanvasFilterQuartz.mm	30 Dec 2005 09:48:55 -0000	1.22
  +++ KCanvasFilterQuartz.mm	4 Jan 2006 08:20:24 -0000	1.23
  @@ -75,7 +75,7 @@
       [m_imagesByName release];
   }
   
  -void KCanvasFilterQuartz::prepareFilter(KRenderingDevice *device, const QRect &bbox)
  +void KCanvasFilterQuartz::prepareFilter(KRenderingDevice *device, const QRectF &bbox)
   {
       if (!bbox.isValid() || !KRenderingDeviceQuartz::filtersEnabled())
           return;
  @@ -99,10 +99,10 @@
       CGContext *filterCGContext = CGLayerGetContext(m_filterCGLayer);
       device->pushContext(new KRenderingDeviceContextQuartz(filterCGContext));
       
  -    CGContextConcatCTM(filterCGContext, CGAffineTransformMakeTranslation(float(-1 * bbox.x()), float(-1 * bbox.y())));
  +    CGContextConcatCTM(filterCGContext, CGAffineTransformMakeTranslation(-1.0f * bbox.x(), -1.0f * bbox.y()));
   }
   
  -void KCanvasFilterQuartz::applyFilter(KRenderingDevice *device, const QRect &bbox)
  +void KCanvasFilterQuartz::applyFilter(KRenderingDevice *device, const QRectF &bbox)
   {
       if (!bbox.isValid() || !KRenderingDeviceQuartz::filtersEnabled() || m_effects.isEmpty())
           return;
  
  
  
  1.6       +4 -4      WebCore/kcanvas/device/quartz/KCanvasItemQuartz.h
  
  Index: KCanvasItemQuartz.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasItemQuartz.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- KCanvasItemQuartz.h	29 Nov 2005 02:03:55 -0000	1.5
  +++ KCanvasItemQuartz.h	4 Jan 2006 08:20:24 -0000	1.6
  @@ -31,10 +31,10 @@
       KCanvasItemQuartz(khtml::RenderStyle *style, KSVG::SVGStyledElementImpl *node);
       virtual ~KCanvasItemQuartz() { }
       
  -    virtual QRect bboxForPath(bool includeStroke) const;
  -    virtual bool hitsPath(const QPoint &p, bool fill /* false means stroke */) const;
  +    virtual QRectF bboxForPath(bool includeStroke) const;
  +    virtual bool hitsPath(const QPointF &p, bool fill /* false means stroke */) const;
       
  -    virtual QRect getAbsoluteRepaintRect() { return absoluteTransform().mapRect(relativeBBox(true)); }
  +    virtual QRect getAbsoluteRepaintRect() { return enclosingQRect(absoluteTransform().mapRect(relativeBBox(true))); }
       
       virtual bool requiresLayer() { return false; }
       virtual void layout() { setNeedsLayout(false); }
  @@ -42,5 +42,5 @@
       virtual bool nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
                               HitTestAction hitTestAction);
   private:
  -    void drawMarkersIfNeeded(const QRect &rect, CGPathRef path) const;
  +    void drawMarkersIfNeeded(const QRectF &rect, CGPathRef path) const;
   };
  
  
  
  1.16      +7 -7      WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm
  
  Index: KCanvasItemQuartz.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- KCanvasItemQuartz.mm	6 Dec 2005 01:53:12 -0000	1.15
  +++ KCanvasItemQuartz.mm	4 Jan 2006 08:20:24 -0000	1.16
  @@ -104,7 +104,7 @@
       else // (data.type == End)
           angle = inslope;
       
  -    data.marker->draw(QRect(), data.origin.x, data.origin.y, data.strokeWidth, angle);
  +    data.marker->draw(QRectF(), data.origin.x, data.origin.y, data.strokeWidth, angle);
   }
   
   static inline void updateMarkerDataForElement(MarkerData &previousMarkerData, const CGPathElement *element)
  @@ -158,7 +158,7 @@
       data.elementIndex++;
   }
   
  -void KCanvasItemQuartz::drawMarkersIfNeeded(const QRect &rect, CGPathRef path) const
  +void KCanvasItemQuartz::drawMarkersIfNeeded(const QRectF &rect, CGPathRef path) const
   {
       KDOM::DocumentImpl *doc = document();
       const KSVG::SVGRenderStyle *svgStyle = style()->svgStyle();
  @@ -200,7 +200,7 @@
       paintInfo.p->save();
       CGContextRef context = quartzDevice->currentCGContext();
   
  -    QRect dirtyRect = paintInfo.r;
  +    QRectF dirtyRect = paintInfo.r;
       
       RenderPath::setupForDraw();
   
  @@ -262,7 +262,7 @@
       if (hitTestAction != HitTestForeground)
           return false;
   
  -    if (hitsPath(QPoint(_x, _y), true)) {
  +    if (hitsPath(QPointF(_x, _y), true)) {
           setInnerNode(info);
           return true;
       }
  @@ -287,7 +287,7 @@
   }
   
   
  -QRect KCanvasItemQuartz::bboxForPath(bool includeStroke) const
  +QRectF KCanvasItemQuartz::bboxForPath(bool includeStroke) const
   {
       CGPathRef cgPath = static_cast<KCanvasPathQuartz*>(path())->cgPath();
       ASSERT(cgPath != 0);
  @@ -312,10 +312,10 @@
           // the easy (and efficient) case:
           bbox = CGPathGetBoundingBox(cgPath);
       
  -    return QRect(bbox);
  +    return QRectF(bbox);
   }
   
  -bool KCanvasItemQuartz::hitsPath(const QPoint &hitPoint, bool fill) const
  +bool KCanvasItemQuartz::hitsPath(const QPointF &hitPoint, bool fill) const
   {
       CGPathRef cgPath = static_cast<KCanvasPathQuartz*>(path())->cgPath();
       ASSERT(cgPath != 0);
  
  
  
  1.7       +7 -7      WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h
  
  Index: KCanvasResourcesQuartz.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- KCanvasResourcesQuartz.h	23 Nov 2005 15:14:07 -0000	1.6
  +++ KCanvasResourcesQuartz.h	4 Jan 2006 08:20:25 -0000	1.7
  @@ -42,21 +42,21 @@
       virtual void layout();
       virtual void paint(PaintInfo &paintInfo, int parentX, int parentY);
       
  -    virtual QRect getAbsoluteRepaintRect() { return absoluteTransform().mapRect(relativeBBox(true)); }
  +    virtual QRect getAbsoluteRepaintRect() { return enclosingQRect(absoluteTransform().mapRect(relativeBBox(true))); }
       virtual QMatrix absoluteTransform() const;
   
  -    virtual void setViewport(const QRect &viewport);
  -    virtual QRect viewport() const;
  +    virtual void setViewport(const QRectF&);
  +    virtual QRectF viewport() const;
   
  -    virtual void setViewBox(const QRect &viewBox);
  -    virtual QRect viewBox() const;
  +    virtual void setViewBox(const QRectF&);
  +    virtual QRectF viewBox() const;
   
       virtual void setAlign(KCAlign align);
       virtual KCAlign align() const;
       
   private:
  -    QRect m_viewport;
  -    QRect m_viewBox;
  +    QRectF m_viewport;
  +    QRectF m_viewBox;
       KCAlign m_align;
   };
   
  
  
  
  1.14      +8 -8      WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.mm
  
  Index: KCanvasResourcesQuartz.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.mm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- KCanvasResourcesQuartz.mm	30 Dec 2005 09:48:55 -0000	1.13
  +++ KCanvasResourcesQuartz.mm	4 Jan 2006 08:20:25 -0000	1.14
  @@ -124,9 +124,9 @@
           filter->prepareFilter(quartzDevice, relativeBBox(true));
       
       if (!viewBox().isNull()) {
  -        QRect viewportRect = viewport();
  +        QRectF viewportRect = viewport();
           if (!parent()->isKCanvasContainer())
  -            viewportRect = QRect(viewport().x(), viewport().y(), width(), height());
  +            viewportRect = QRectF(viewport().x(), viewport().y(), width(), height());
           CGContextConcatCTM(paintInfo.p->currentContext(), CGAffineTransform(getAspectRatio(viewBox(), viewportRect).qmatrix()));
       }
       
  @@ -146,22 +146,22 @@
       }
   }
   
  -void KCanvasContainerQuartz::setViewport(const QRect &viewport)
  +void KCanvasContainerQuartz::setViewport(const QRectF& viewport)
   {
       m_viewport = viewport;
   }
   
  -QRect KCanvasContainerQuartz::viewport() const
  +QRectF KCanvasContainerQuartz::viewport() const
   {
      return m_viewport;
   }
   
  -void KCanvasContainerQuartz::setViewBox(const QRect &viewBox)
  +void KCanvasContainerQuartz::setViewBox(const QRectF& viewBox)
   {
       m_viewBox = viewBox;
   }
   
  -QRect KCanvasContainerQuartz::viewBox() const
  +QRectF KCanvasContainerQuartz::viewBox() const
   {
       return m_viewBox;
   }
  @@ -180,9 +180,9 @@
   {
       QMatrix transform = KCanvasContainer::absoluteTransform();
       if (!viewBox().isNull()) {
  -        QRect viewportRect = viewport();
  +        QRectF viewportRect = viewport();
           if (!parent()->isKCanvasContainer())
  -            viewportRect = QRect(viewport().x(), viewport().y(), width(), height());
  +            viewportRect = QRectF(viewport().x(), viewport().y(), width(), height());
           transform *= getAspectRatio(viewBox(), viewportRect).qmatrix();
       }
       return transform;
  
  
  
  1.13      +3 -3      WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm
  
  Index: KRenderingPaintServerQuartz.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- KRenderingPaintServerQuartz.mm	30 Dec 2005 09:48:55 -0000	1.12
  +++ KRenderingPaintServerQuartz.mm	4 Jan 2006 08:20:25 -0000	1.13
  @@ -104,7 +104,7 @@
       CGAffineTransform transform = CGAffineTransform(patternTransform().qmatrix());
       transform = CGAffineTransformConcat(transform, ctm);
   
  -    CGSize phase = CGSizeMake(x(), y());
  +    CGSize phase = CGSizeMake(bbox().x(), bbox().y());
       CGContextSetPatternPhase(context, phase);
   		
       CGPatternCallbacks callbacks = {0, patternCallback, NULL};
  @@ -112,8 +112,8 @@
           tile(),
           CGRectMake(0,0,cellSize.width,cellSize.height),
           transform,
  -        width(), //cellSize.width,
  -        height(), //cellSize.height,
  +        bbox().width(), //cellSize.width,
  +        bbox().height(), //cellSize.height,
           kCGPatternTilingConstantSpacing,  // FIXME: should ask CG guys.
           true, // has color
           &callbacks );
  
  
  
  1.172     +2 -1      WebCore/khtml/rendering/render_object.h
  
  Index: render_object.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_object.h,v
  retrieving revision 1.171
  retrieving revision 1.172
  diff -u -r1.171 -r1.172
  --- render_object.h	21 Dec 2005 22:51:11 -0000	1.171
  +++ render_object.h	4 Jan 2006 08:20:27 -0000	1.172
  @@ -29,6 +29,7 @@
   #include <qrect.h>
   #include <assert.h>
   #include <qwmatrix.h>
  +#include <QRectF>
   
   #include "editing/text_affinity.h"
   #include "misc/khtmllayout.h"
  @@ -279,7 +280,7 @@
   #if SVG_SUPPORT
       virtual bool isKCanvasContainer() const { return false; }
       virtual bool isRenderPath() const { return false; }
  -    virtual QRect relativeBBox(bool includeStroke = true) const { return QRect(); }
  +    virtual QRectF relativeBBox(bool includeStroke = true) const { return QRectF(); }
       // We may eventually want to make these non-virtual
       virtual QMatrix localTransform() const { return QMatrix(1, 0, 0, 1, xPos(), yPos()); }
       virtual void setLocalTransform(const QMatrix&) { }
  
  
  
  1.13      +2 -2      WebCore/ksvg2/svg/SVGFilterElementImpl.cpp
  
  Index: SVGFilterElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGFilterElementImpl.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SVGFilterElementImpl.cpp	27 Nov 2005 11:02:25 -0000	1.12
  +++ SVGFilterElementImpl.cpp	4 Jan 2006 08:20:28 -0000	1.13
  @@ -181,9 +181,9 @@
       float _x = x()->baseVal()->value(), _y = y()->baseVal()->value();
       float _width = width()->baseVal()->value(), _height = height()->baseVal()->value();
       if(filterBBoxMode)
  -        m_filter->setFilterRect(QRect(int(_x * 100.f), int(_y * 100.f), int(_width * 100.f), int(_height * 100.f)));
  +        m_filter->setFilterRect(QRectF(_x * 100.f, _y * 100.f, _width * 100.f, _height * 100.f));
       else
  -        m_filter->setFilterRect(QRect(int(_x), int(_y), int(_width), int(_height)));
  +        m_filter->setFilterRect(QRectF(_x, _y, _width, _height));
       
       bool primitiveBBoxMode = primitiveUnits()->baseVal() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
       m_filter->setEffectBoundingBoxMode(primitiveBBoxMode);
  
  
  
  1.11      +2 -2      WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp
  
  Index: SVGFilterPrimitiveStandardAttributesImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SVGFilterPrimitiveStandardAttributesImpl.cpp	26 Nov 2005 22:19:11 -0000	1.10
  +++ SVGFilterPrimitiveStandardAttributesImpl.cpp	4 Jan 2006 08:20:28 -0000	1.11
  @@ -118,9 +118,9 @@
       float _x = x()->baseVal()->value(), _y = y()->baseVal()->value();
       float _width = width()->baseVal()->value(), _height = height()->baseVal()->value();
       if(bbox)
  -        filterEffect->setSubRegion(QRect(int(_x * 100.f), int(_y * 100.f), int(_width * 100.f), int(_height * 100.f)));
  +        filterEffect->setSubRegion(QRectF(_x * 100.f, _y * 100.f, _width * 100.f, _height * 100.f));
       else
  -        filterEffect->setSubRegion(QRect(int(_x), int(_y), int(_width), int(_height)));
  +        filterEffect->setSubRegion(QRectF(_x, _y, _width, _height));
   
       filterEffect->setResult(KDOM::DOMString(result()->baseVal()).qstring());
   }
  
  
  
  1.9       +1 -1      WebCore/ksvg2/svg/SVGLengthImpl.cpp
  
  Index: SVGLengthImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGLengthImpl.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SVGLengthImpl.cpp	23 Nov 2005 15:14:09 -0000	1.8
  +++ SVGLengthImpl.cpp	4 Jan 2006 08:20:28 -0000	1.9
  @@ -97,7 +97,7 @@
       khtml::RenderObject *item = (m_context ? m_context->renderer() : 0);
       if(item)
       {
  -        QRect bbox = item->relativeBBox();
  +        QRectF bbox = item->relativeBBox();
   
           float result = 0;
           if(m_mode == LM_WIDTH)
  
  
  
  1.11      +2 -2      WebCore/ksvg2/svg/SVGLinearGradientElementImpl.cpp
  
  Index: SVGLinearGradientElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGLinearGradientElementImpl.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SVGLinearGradientElementImpl.cpp	19 Dec 2005 19:52:53 -0000	1.10
  +++ SVGLinearGradientElementImpl.cpp	4 Jan 2006 08:20:28 -0000	1.11
  @@ -190,8 +190,8 @@
   
       grad->setGradientTransform(mat);
       grad->setBoundingBoxMode(bbox);
  -    grad->setGradientStart(QPoint(lroundf(_x1), lroundf(_y1)));
  -    grad->setGradientEnd(QPoint(lroundf(_x2), lroundf(_y2)));
  +    grad->setGradientStart(QPointF(_x1, _y1));
  +    grad->setGradientEnd(QPointF(_x2, _y2));
   }
   
   // vim:ts=4:noet
  
  
  
  1.12      +1 -1      WebCore/ksvg2/svg/SVGLocatableImpl.cpp
  
  Index: SVGLocatableImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGLocatableImpl.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SVGLocatableImpl.cpp	2 Dec 2005 22:44:27 -0000	1.11
  +++ SVGLocatableImpl.cpp	4 Jan 2006 08:20:29 -0000	1.12
  @@ -81,7 +81,7 @@
   
       if(e && e->renderer())
       {
  -        QRect bboxRect = e->renderer()->relativeBBox(false);
  +        QRectF bboxRect = e->renderer()->relativeBBox(false);
           rect = new SVGRectImpl(0);
           rect->setX(bboxRect.x());
           rect->setY(bboxRect.y());
  
  
  
  1.17      +2 -5      WebCore/ksvg2/svg/SVGPatternElementImpl.cpp
  
  Index: SVGPatternElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGPatternElementImpl.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SVGPatternElementImpl.cpp	19 Dec 2005 19:52:54 -0000	1.16
  +++ SVGPatternElementImpl.cpp	4 Jan 2006 08:20:29 -0000	1.17
  @@ -223,11 +223,8 @@
   
       KRenderingDeviceContext *patternContext = device->contextForImage(m_tile);
       device->pushContext(patternContext);
  -    
  -    m_paintServer->setX(x()->baseVal()->value());
  -    m_paintServer->setY(y()->baseVal()->value());
  -    m_paintServer->setWidth(width()->baseVal()->value());
  -    m_paintServer->setHeight(height()->baseVal()->value());
  +    QRectF rect(x()->baseVal()->value(), y()->baseVal()->value(), width()->baseVal()->value(), height()->baseVal()->value());
  +    m_paintServer->setBbox(rect);
       m_paintServer->setPatternTransform(patternTransformMatrix);
       m_paintServer->setTile(m_tile);
   
  
  
  
  1.10      +2 -2      WebCore/ksvg2/svg/SVGRadialGradientElementImpl.cpp
  
  Index: SVGRadialGradientElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGRadialGradientElementImpl.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SVGRadialGradientElementImpl.cpp	19 Dec 2005 19:52:54 -0000	1.9
  +++ SVGRadialGradientElementImpl.cpp	4 Jan 2006 08:20:29 -0000	1.10
  @@ -215,8 +215,8 @@
   
       grad->setGradientTransform(mat);
       grad->setBoundingBoxMode(bbox);
  -    grad->setGradientCenter(QPoint(lroundf(_cx), lroundf(_cy)));
  -    grad->setGradientFocal(QPoint(lroundf(_fx), lroundf(_fy)));
  +    grad->setGradientCenter(QPointF(_cx, _cy));
  +    grad->setGradientFocal(QPointF(_fx, _fy));
       grad->setGradientRadius(_r);
   }
   
  
  
  
  1.18      +6 -6      WebCore/ksvg2/svg/SVGSVGElementImpl.cpp
  
  Index: SVGSVGElementImpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/ksvg2/svg/SVGSVGElementImpl.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SVGSVGElementImpl.cpp	16 Dec 2005 02:30:13 -0000	1.17
  +++ SVGSVGElementImpl.cpp	4 Jan 2006 08:20:29 -0000	1.18
  @@ -334,8 +334,8 @@
       // TODO : take into account pointer-events?
       RefPtr<SVGRectImpl> bbox = getBBox();
       
  -    QRect r(int(rect->x()), int(rect->y()), int(rect->width()), int(rect->height()));
  -    QRect r2(int(bbox->x()), int(bbox->y()), int(bbox->width()), int(bbox->height()));
  +    QRectF r(rect->x(), rect->y(), rect->width(), rect->height());
  +    QRectF r2(bbox->x(), bbox->y(), bbox->width(), bbox->height());
       
       return r.intersects(r2);
   }
  @@ -345,8 +345,8 @@
       // TODO : take into account pointer-events?
       RefPtr<SVGRectImpl> bbox = getBBox();
       
  -    QRect r(int(rect->x()), int(rect->y()), int(rect->width()), int(rect->height()));
  -    QRect r2(int(bbox->x()), int(bbox->y()), int(bbox->width()), int(bbox->height()));
  +    QRectF r(rect->x(), rect->y(), rect->width(), rect->height());
  +    QRectF r2(bbox->x(), bbox->y(), bbox->width(), bbox->height());
       
       return r.contains(r2);
   }
  @@ -445,8 +445,8 @@
       float _width = width()->baseVal()->value();
       float _height = height()->baseVal()->value();
   
  -    rootContainer->setViewport(QRect((int)_x, (int)_y, (int)_width, (int)_height));
  -    rootContainer->setViewBox(QRect((int)viewBox()->baseVal()->x(), (int)viewBox()->baseVal()->y(), (int)viewBox()->baseVal()->width(), (int)viewBox()->baseVal()->height()));
  +    rootContainer->setViewport(QRectF(_x, _y, _width, _height));
  +    rootContainer->setViewBox(QRectF(viewBox()->baseVal()->x(), viewBox()->baseVal()->y(), viewBox()->baseVal()->width(), viewBox()->baseVal()->height()));
       rootContainer->setAlign(KCAlign(preserveAspectRatio()->baseVal()->align() - 1));
       rootContainer->setSlice(preserveAspectRatio()->baseVal()->meetOrSlice() == SVG_MEETORSLICE_SLICE);
       
  
  
  
  1.5       +2 -0      WebCore/kwq/KWQWMatrix.h
  
  Index: KWQWMatrix.h
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQWMatrix.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- KWQWMatrix.h	26 Nov 2005 22:27:07 -0000	1.4
  +++ KWQWMatrix.h	4 Jan 2006 08:20:32 -0000	1.5
  @@ -27,6 +27,7 @@
   #define QWMATRIX_H_
   
   #include <ApplicationServices/ApplicationServices.h>
  +#include <QRectF>
   
   class QRect;
   
  @@ -39,6 +40,7 @@
       void setMatrix(double a, double b, double c, double d, double tx, double ty);
       void map(double x, double y, double *x2, double *y2) const;
       QRect QWMatrix::mapRect(const QRect &rect) const;
  +    QRectF QWMatrix::mapRect(const QRectF &rect) const;
       
       bool isIdentity() const;
       
  
  
  
  1.12      +5 -0      WebCore/kwq/KWQWMatrix.mm
  
  Index: KWQWMatrix.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQWMatrix.mm,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- KWQWMatrix.mm	26 Nov 2005 22:27:07 -0000	1.11
  +++ KWQWMatrix.mm	4 Jan 2006 08:20:32 -0000	1.12
  @@ -60,6 +60,11 @@
       return QRect(CGRectApplyAffineTransform(CGRect(rect), m_transform));
   }
   
  +QRectF QWMatrix::mapRect(const QRectF &rect) const
  +{
  +    return QRectF(CGRectApplyAffineTransform(CGRect(rect), m_transform));
  +}
  +
   bool QWMatrix::isIdentity() const
   {
       return CGAffineTransformIsIdentity(m_transform);
  
  
  
  1.1                  WebCore/kwq/KWQPointF.h
  
  Index: KWQPointF.h
  ===================================================================
  /*
   * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
   * Copyright (C) 2005 Nokia.  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.
   */
  
  #ifndef QPOINTF_H_
  #define QPOINTF_H_
  
  #include "KWQDef.h"
  
  // workaround for <rdar://problem/4294625>
  #if ! __LP64__ && ! NS_BUILD_32_LIKE_64
  #undef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  #endif
  
  #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  typedef struct CGPoint NSPoint;
  #else
  typedef struct _NSPoint NSPoint;
  #endif
  typedef struct CGPoint CGPoint;
  class QPoint;
  
  class QPointF {
  public:
      QPointF();
      QPointF(float, float);
      QPointF(const QPoint&);
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
      explicit QPointF(const NSPoint&);
  #endif
      explicit QPointF(const CGPoint&);
  
      float x() const { return xCoord; }
      float y() const { return yCoord; }
  
      void setX(int x) { xCoord = x; }
      void setY(int y) { yCoord = y; }
  
      bool isNull() const { return xCoord == 0.0f && yCoord == 0.0f; }
  
      QPointF& operator -=(const QPointF& two) { xCoord -= two.xCoord; yCoord -= two.yCoord; return *this; }
      friend const QPointF operator*(const QPointF& p, double s);
      friend QPointF operator+(const QPointF&, const QPointF&);
      friend QPointF operator-(const QPointF&, const QPointF&);
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
      operator NSPoint() const;
  #endif
      operator CGPoint() const;
  
  private:
      float xCoord;
      float yCoord;
  };
  
  #endif
  
  
  
  1.1                  WebCore/kwq/KWQPointF.mm
  
  Index: KWQPointF.mm
  ===================================================================
  /*
   * Copyright (C) 2004, 2006 Apple Computer, Inc.  All rights reserved.
   * Copyright (C) 2005 Nokia.  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. 
   */
  
  #include "config.h"
  #import "KWQPointF.h"
  #import "KWQPointArray.h"
  
  QPointF::QPointF() : xCoord(0), yCoord(0)
  {
  }
  
  QPointF::QPointF(float xIn, float yIn) : xCoord(xIn), yCoord(yIn)
  {
  }
  
  QPointF::QPointF(const QPoint& p) :xCoord(p.x()), yCoord(p.y())
  {
  }
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  QPointF::QPointF(const NSPoint& p) : xCoord(p.x), yCoord(p.y)
  {
  }
  #endif
  
  QPointF::QPointF(const CGPoint& p) : xCoord(p.x), yCoord(p.y)
  {
  }
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  QPointF::operator NSPoint() const
  {
      return NSMakePoint(xCoord, yCoord);
  }
  #endif
  
  QPointF::operator CGPoint() const
  {
      return CGPointMake(xCoord, yCoord);
  }
  
  QPointF operator+(const QPointF& a, const QPointF& b)
  {
      return QPointF(a.xCoord + b.xCoord, a.yCoord + b.yCoord);
  }
  
  QPointF operator-(const QPointF& a, const QPointF& b)
  {
      return QPointF(a.xCoord - b.xCoord, a.yCoord - b.yCoord);
  }
  
  const QPointF operator*(const QPointF& p, double s)
  {
      return QPointF(p.xCoord * s, p.yCoord * s);
  }
  
  
  
  1.1                  WebCore/kwq/KWQRectF.h
  
  Index: KWQRectF.h
  ===================================================================
  /*
   * Copyright (C) 2003, 2006 Apple Computer, Inc.  All rights reserved.
   * Copyright (C) 2005 Nokia.  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.
   */
  
  #ifndef QRECTF_H_
  #define QRECTF_H_
  
  #include <math.h>
  #include "KWQSizeF.h"
  #include "KWQPointF.h"
  #include "KWQRect.h"
  
  #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  typedef struct CGRect NSRect;
  #else
  typedef struct _NSRect NSRect;
  #endif
  typedef struct CGRect CGRect;
  class QRect;
  
  class QRectF {
  public:
      QRectF();
      QRectF(QPointF p, QSizeF s);
      QRectF(float, float, float, float);
      QRectF(const QPointF&, const QPointF&);
      QRectF(const QRect&);
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
      explicit QRectF(const NSRect&);
  #endif
      explicit QRectF(const CGRect&);
  
      bool isNull() const;
      bool isValid() const;
      bool isEmpty() const;
  
      float x() const { return xp; }
      float y() const { return yp; }
      float left() const { return xp; }
      float top() const { return yp; }
      float right() const;
      float bottom() const;
      float width() const { return w; }
      float height() const { return h; }
  
      QPointF topLeft() const;
      QPointF topRight() const;
      QPointF bottomRight() const;
      QPointF bottomLeft() const;
  
      QSizeF size() const;
      void setX(float x) { xp = x; }
      void setY(float y) { yp = y; }
      void setWidth(float width) { w = width; }
      void setHeight(float height) { h = height; }
      void setRect(float x, float y, float width, float height) { xp = x; yp = y; w = width; h = height; }
      QRectF intersect(const QRectF&) const;
      bool intersects(const QRectF&) const;
      QRectF unite(const QRectF&) const;
      QRectF normalize() const;
  
      bool contains(const QPointF& point) const { return contains(point.x(), point.y()); }
  
      bool contains(float x, float y, bool proper = false) const
      {
          if (proper)
              return x > xp && (x < (xp + w - 1)) && y > yp && y < (yp + h - 1);
          return x >= xp && x < (xp + w) && y >= yp && y < (yp + h);
      }
  
      bool contains(const QRectF& rect) const { return intersect(rect) == rect; }
  
      void inflate(float s);
  
      inline QRectF operator&(const QRectF& r) const { return intersect(r); }
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
      operator NSRect() const;
  #endif
      operator CGRect() const;
      operator QRect() const;
  private:
      float xp;
      float yp;
      float w;
      float h;
  
      friend bool operator==(const QRectF&, const QRectF&);
      friend bool operator!=(const QRectF&, const QRectF&);
  };
  
  inline QRect enclosingQRect(const QRectF& fr)
  {
      int x = int(floor(fr.x()));
      int y = int(floor(fr.y()));
      return QRect(x, y, int(ceil(fr.x() + fr.width())) - x, int(ceil(fr.y() + fr.height())) - y);
  }
  
  #endif
  
  
  
  1.1                  WebCore/kwq/KWQRectF.mm
  
  Index: KWQRectF.mm
  ===================================================================
  /*
   * Copyright (C) 2003, 2006 Apple Computer, Inc.  All rights reserved.
   * Copyright (C) 2005 Nokia.  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.
   */
  
  #include "config.h"
  #import "KWQRectF.h"
  
  #import <algorithm>
  
  using std::max;
  using std::min;
  
  QRectF::QRectF() : xp(0.0f), yp(0.0f), w(0.0f), h(0.0f)
  {
  }
  
  QRectF::QRectF(float x, float y, float width, float height) : xp(x), yp(y), w(width), h(height)
  {
  }
  
  QRectF::QRectF(QPointF p, QSizeF s) : xp(p.x()), yp(p.y()), w(s.width()), h(s.height())
  {
  }
  
  QRectF::QRectF(const QPointF &topLeft, const QPointF &bottomRight)
    : xp(topLeft.x()), yp(topLeft.y()),
    w(bottomRight.x() - topLeft.x() + 1.0f), h(bottomRight.y() - topLeft.y() + 1.0f)
  {
  }
  
  QRectF::QRectF(const QRect& r) : xp(r.x()), yp(r.y()), w(r.width()), h(r.height())
  {
  }
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  QRectF::QRectF(const NSRect &r) : xp(r.origin.x), yp(r.origin.y), w(r.size.width), h(r.size.height)
  {
  }
  #endif
  
  QRectF::QRectF(const CGRect &r) : xp(r.origin.x), yp(r.origin.y), w(r.size.width), h(r.size.height)
  {
  }
  
  bool QRectF::isNull() const
  {
      return w == 0.0f && h == 0.0f;
  }
  
  bool QRectF::isValid() const
  {
      return w > 0.0f && h > 0.0f;
  }
  
  bool QRectF::isEmpty() const
  {
      return w <= 0.0f || h <= 0.0f;
  }
  
  float QRectF::right() const
  {
      return xp + w - 1.0f;
  }
  
  float QRectF::bottom() const
  {
      return yp + h - 1.0f;
  }
  
  QPointF QRectF::topLeft() const
  {
      return QPointF(xp,yp);
  }
  
  QPointF QRectF::topRight() const
  {
      return QPointF(right(),top());
  }
  
  QPointF QRectF::bottomRight() const
  {
      return QPointF(right(),bottom());
  }
  
  QPointF QRectF::bottomLeft() const
  {
      return QPointF(left(),bottom());
  }
  
  QSizeF QRectF::size() const
  {
      return QSizeF(w,h);
  }
  
  QRectF QRectF::unite(const QRectF &r) const
  {
      if (r.isEmpty())
          return *this;
  
      if (isEmpty())
          return r;
  
      float nx, ny, nw, nh;
  
      nx = min(xp, r.xp);
      ny = min(yp, r.yp);
  
      if (xp + w >= r.xp + r.w)
          nw = xp + w - nx;
      else
          nw = r.xp + r.w - nx;
  
      if (yp + h >= r.yp + r.h)
          nh = yp + h - ny;
      else
          nh = r.yp + r.h - ny;
  
      return QRectF(nx, ny, nw, nh);
  }
  
  QRectF QRectF::normalize() const
  {
      QRectF newRect;
  
      newRect.xp  = (w < 0.0f) ? (xp - w) : xp;
      newRect.w   = (w < 0.0f) ? -w : w;
  
      newRect.yp  = (h < 0.0f) ? (yp - h) : yp;
      newRect.h   = (h < 0.0f) ? -h : h;
  
      return newRect;
  }
  
  bool QRectF::intersects(const QRectF &r) const
  {
      return intersect(r).isValid();
  }
  
  QRectF QRectF::intersect(const QRectF &r) const
  {
      float nx, ny, nw, nh;
  
      nx = max(xp, r.xp);
      ny = max(yp, r.yp);
  
      if (xp + w <= r.xp + r.w)
          nw = xp + w - nx;
      else
          nw = r.xp + r.w - nx;
  
      if (yp + h <= r.yp + r.h)
          nh = yp + h - ny;
      else
          nh = r.yp + r.h - ny;
  
      return QRectF(nx, ny, nw, nh);
  }
  
  void QRectF::inflate(float s)
  {
      xp -= s;
      yp -= s;
      w += 2.0f * s;
      h += 2.0f * s;
  }
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  QRectF::operator NSRect() const
  {
      return NSMakeRect(xp, yp, w, h);
  }
  #endif
  
  QRectF::operator CGRect() const
  {
      return CGRectMake(xp, yp, w, h);
  }
  
  bool operator==(const QRectF& a, const QRectF &b)
  {
      return a.xp == b.xp && a.yp == b.yp && a.w == b.w && a.h == b.h;
  }
  
  bool operator!=(const QRectF &a, const QRectF &b)
  {
      return !(a == b);
  }
  
  
  
  1.1                  WebCore/kwq/KWQSizeF.h
  
  Index: KWQSizeF.h
  ===================================================================
  /*
   * Copyright (C) 2003, 2006 Apple Computer, Inc.  All rights reserved.
   * Copyright (C) 2005 Nokia.  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.
   */
  
  #ifndef QSIZEF_H_
  #define QSIZEF_H_
  
  #include "KWQDef.h"
  
  // workaround for <rdar://problem/4294625>
  #if ! __LP64__ && ! NS_BUILD_32_LIKE_64
  #undef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  #endif
  
  #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  typedef struct CGSize NSSize;
  #else
  typedef struct _NSSize NSSize;
  #endif
  typedef struct CGSize CGSize;
  class QSize;
  
  class QSizeF {
  public:
      QSizeF();
      QSizeF(float, float);
      QSizeF(const QSize&);
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
      explicit QSizeF(const NSSize&);
  #endif
      explicit QSizeF(const CGSize&);
  
      bool isValid() const;
      float width() const { return w; }
      float height() const { return h; }
      void setWidth(float width) { w = width; }
      void setHeight(float height) { h = height; }
      QSizeF expandedTo(const QSizeF&) const;
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
      operator NSSize() const;
  #endif
      operator CGSize() const;
  
      friend QSizeF operator+(const QSizeF&, const QSizeF&);
      friend bool operator==(const QSizeF&, const QSizeF&);
      friend bool operator!=(const QSizeF&, const QSizeF&);
  
  private:
      float w;
      float h;
  };
  
  #endif
  
  
  
  1.1                  WebCore/kwq/KWQSizeF.mm
  
  Index: KWQSizeF.mm
  ===================================================================
  /*
   * Copyright (C) 2003, 2006 Apple Computer, Inc.  All rights reserved.
   * Copyright (C) 2005 Nokia.  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. 
   */
  
  #include "config.h"
  #import "KWQSizeF.h"
  #import "KWQSize.h"
  
  QSizeF::QSizeF() : w(-1.0f), h(-1.0f)
  {
  }
  
  QSizeF::QSizeF(float width, float height) : w(width), h(height)
  {
  }
  
  QSizeF::QSizeF(const QSize& o) : w(o.width()), h(o.height())
  {
  }
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  QSizeF::QSizeF(const NSSize& s) : w(s.width), h(s.height)
  {
  }
  #endif
  
  QSizeF::QSizeF(const CGSize& s) : w(s.width), h(s.height)
  {
  }
  
  bool QSizeF::isValid() const
  {
      return w >= 0.0f && h >= 0.0f;
  }
  
  QSizeF QSizeF::expandedTo(const QSizeF& o) const
  {
      return QSizeF(w > o.w ? w : o.w, h > o.h ? h : o.h);
  }
  
  #ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
  QSizeF::operator NSSize() const
  {
      return NSMakeSize(w, h);
  }
  #endif
  
  QSizeF::operator CGSize() const
  {
      return CGSizeMake(w, h);
  }
  
  QSizeF operator+(const QSizeF& a, const QSizeF& b)
  {
      return QSizeF(a.w + b.w, a.h + b.h);
  }
  
  bool operator==(const QSizeF& a, const QSizeF& b)
  {
      return a.w == b.w && a.h == b.h;
  }
  
  bool operator!=(const QSizeF& a, const QSizeF& b)
  {
      return a.w != b.w || a.h != b.h;
  }
  
  
  



More information about the webkit-changes mailing list