WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Sync previous versions with the new code layout
new-qrect-fix.diff (text/plain), 77.88 KB, created by
Kimmo Kinnunen
on 2005-12-30 05:26:54 PST
(
hide
)
Description:
Sync previous versions with the new code layout
Filename:
MIME Type:
Creator:
Kimmo Kinnunen
Created:
2005-12-30 05:26:54 PST
Size:
77.88 KB
patch
obsolete
>Index: WebCore/ForwardingHeaders/QPointF >=================================================================== >diff -Npu WebCore/ForwardingHeaders/QPointF >--- WebCore/ForwardingHeaders/QPointF 1 Jan 1970 00:00:00 -0000 >+++ WebCore/ForwardingHeaders/QPointF 30 Dec 2005 08:48:24 -0000 >@@ -0,0 +1 @@ >+#import "KWQPointF.h" >Index: WebCore/ForwardingHeaders/QRectF >=================================================================== >diff -Npu WebCore/ForwardingHeaders/QRectF >--- WebCore/ForwardingHeaders/QRectF 1 Jan 1970 00:00:00 -0000 >+++ WebCore/ForwardingHeaders/QRectF 30 Dec 2005 08:48:24 -0000 >@@ -0,0 +1 @@ >+#import "KWQRectF.h" >Index: WebCore/ForwardingHeaders/QSizeF >=================================================================== >diff -Npu WebCore/ForwardingHeaders/QSizeF >--- WebCore/ForwardingHeaders/QSizeF 1 Jan 1970 00:00:00 -0000 >+++ WebCore/ForwardingHeaders/QSizeF 30 Dec 2005 08:48:24 -0000 >@@ -0,0 +1 @@ >+#import "KWQSizeF.h" >Index: WebCore/kwq/KWQPointF.h >=================================================================== >diff -Npu WebCore/kwq/KWQPointF.h >--- WebCore/kwq/KWQPointF.h 1 Jan 1970 00:00:00 -0000 >+++ WebCore/kwq/KWQPointF.h 30 Dec 2005 08:48:24 -0000 >@@ -0,0 +1,78 @@ >+/* >+ * Copyright (C) 2004 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 >Index: WebCore/kwq/KWQPointF.mm >=================================================================== >diff -Npu WebCore/kwq/KWQPointF.mm >--- WebCore/kwq/KWQPointF.mm 1 Jan 1970 00:00:00 -0000 >+++ WebCore/kwq/KWQPointF.mm 30 Dec 2005 08:48:24 -0000 >@@ -0,0 +1,78 @@ >+/* >+ * Copyright (C) 2004 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((int)(p.xCoord * s), (int)(p.yCoord * s)); >+} >Index: WebCore/kwq/KWQRectF.h >=================================================================== >diff -Npu WebCore/kwq/KWQRectF.h >--- WebCore/kwq/KWQRectF.h 1 Jan 1970 00:00:00 -0000 >+++ WebCore/kwq/KWQRectF.h 30 Dec 2005 10:01:01 -0000 >@@ -0,0 +1,113 @@ >+/* >+ * Copyright (C) 2003 Apple Computer, Inc. All rights reserved. >+ * Copyright (C) 2003 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 "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; >+ QRect toRect() const; >+private: >+ float xp; >+ float yp; >+ float w; >+ float h; >+ >+ friend bool operator==(const QRectF &, const QRectF &); >+ friend bool operator!=(const QRectF &, const QRectF &); >+}; >+ >+#endif >Index: WebCore/kwq/KWQRectF.mm >=================================================================== >diff -Npu WebCore/kwq/KWQRectF.mm >--- WebCore/kwq/KWQRectF.mm 1 Jan 1970 00:00:00 -0000 >+++ WebCore/kwq/KWQRectF.mm 30 Dec 2005 10:01:19 -0000 >@@ -0,0 +1,221 @@ >+/* >+ * Copyright (C) 2003 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); >+} >+ >+QRect QRectF::toRect() const >+{ >+ return QRect(int(xp), int(yp), int(w), int(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); >+} >+ >+ >Index: WebCore/kwq/KWQSizeF.h >=================================================================== >diff -Npu WebCore/kwq/KWQSizeF.h >--- WebCore/kwq/KWQSizeF.h 1 Jan 1970 00:00:00 -0000 >+++ WebCore/kwq/KWQSizeF.h 30 Dec 2005 08:48:24 -0000 >@@ -0,0 +1,76 @@ >+/* >+ * Copyright (C) 2003 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 >Index: WebCore/kwq/KWQSizeF.mm >=================================================================== >diff -Npu WebCore/kwq/KWQSizeF.mm >--- WebCore/kwq/KWQSizeF.mm 1 Jan 1970 00:00:00 -0000 >+++ WebCore/kwq/KWQSizeF.mm 30 Dec 2005 08:48:24 -0000 >@@ -0,0 +1,89 @@ >+/* >+ * Copyright (C) 2003 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; >+} >+ >Index: WebCore/ChangeLog >=================================================================== >RCS file: /cvs/root/WebCore/ChangeLog,v >retrieving revision 1.65 >diff -p -u -r1.65 WebCore/ChangeLog >--- WebCore/ChangeLog 30 Dec 2005 09:48:55 -0000 1.65 >+++ WebCore/ChangeLog 30 Dec 2005 13:22:07 -0000 >@@ -1,3 +1,104 @@ >+2005-12-30 Kimmo Kinnunen <kimmo.kinnunen@nokia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Changed use of QRect to QRectF in the points where SVG can have >+ fractional numbers >+ http://bugzilla.opendarwin.org/show_bug.cgi?id=4462 >+ >+ WARNING: NO TEST CASES ADDED >+ >+ * 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 >+ > 2005-12-30 Eric Seidel <eseidel@apple.com> > > Reviewed by mjs. >Index: WebCore/WebCore.xcodeproj/project.pbxproj >=================================================================== >RCS file: /cvs/root/WebCore/WebCore.xcodeproj/project.pbxproj,v >retrieving revision 1.62 >diff -p -u -r1.62 WebCore/WebCore.xcodeproj/project.pbxproj >--- WebCore/WebCore.xcodeproj/project.pbxproj 23 Dec 2005 18:44:00 -0000 1.62 >+++ WebCore/WebCore.xcodeproj/project.pbxproj 30 Dec 2005 13:22:11 -0000 >@@ -9,6 +9,12 @@ > /* 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 */; }; > 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 +1626,12 @@ > 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>"; }; > 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; }; >@@ -4172,6 +4184,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 +4716,9 @@ > 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 */, > ); > runOnlyForDeploymentPostprocessing = 0; > }; >@@ -6536,6 +6557,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; > }; >Index: WebCore/kcanvas/KCanvasContainer.cpp >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasContainer.cpp,v >retrieving revision 1.11 >diff -p -u -r1.11 WebCore/kcanvas/KCanvasContainer.cpp >--- WebCore/kcanvas/KCanvasContainer.cpp 29 Nov 2005 11:20:42 -0000 1.11 >+++ WebCore/kcanvas/KCanvasContainer.cpp 30 Dec 2005 13:22:12 -0000 >@@ -68,7 +68,7 @@ void KCanvasContainer::setLocalTransform > 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 @@ bool KCanvasContainer::fillContains(cons > 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 @@ bool KCanvasContainer::strokeContains(co > 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 @@ bool KCanvasContainer::slice() const > 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; > >Index: WebCore/kcanvas/KCanvasContainer.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasContainer.h,v >retrieving revision 1.7 >diff -p -u -r1.7 WebCore/kcanvas/KCanvasContainer.h >--- WebCore/kcanvas/KCanvasContainer.h 23 Nov 2005 15:14:05 -0000 1.7 >+++ WebCore/kcanvas/KCanvasContainer.h 30 Dec 2005 13:22:12 -0000 >@@ -59,9 +59,9 @@ public: > 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); >@@ -79,7 +79,7 @@ public: > 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; >Index: WebCore/kcanvas/KCanvasFilters.cpp >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasFilters.cpp,v >retrieving revision 1.12 >diff -p -u -r1.12 WebCore/kcanvas/KCanvasFilters.cpp >--- WebCore/kcanvas/KCanvasFilters.cpp 20 Dec 2005 09:30:24 -0000 1.12 >+++ WebCore/kcanvas/KCanvasFilters.cpp 30 Dec 2005 13:22:12 -0000 >@@ -71,12 +71,12 @@ QTextStream &operator<<(QTextStream &ts, > 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 @@ QTextStream &KCDistantLightSource::exter > 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 @@ static QTextStream &operator<<(QTextStre > 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] "; >Index: WebCore/kcanvas/KCanvasFilters.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasFilters.h,v >retrieving revision 1.16 >diff -p -u -r1.16 WebCore/kcanvas/KCanvasFilters.h >--- WebCore/kcanvas/KCanvasFilters.h 20 Dec 2005 09:30:24 -0000 1.16 >+++ WebCore/kcanvas/KCanvasFilters.h 30 Dec 2005 13:22:12 -0000 >@@ -25,7 +25,7 @@ > #define KCanvasFilters_H > > #include "KCanvasResources.h" >- >+#include <QSizeF> > // Enumerations > typedef enum > { >@@ -75,41 +75,6 @@ private: > 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 @@ public: > 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 @@ public: > > 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 @@ public: > virtual QTextStream &externalRepresentation(QTextStream &) const; > > private: >- QRect m_subregion; >+ QRectF m_subregion; > QString m_in; > QString m_result; > }; >@@ -327,8 +292,8 @@ class KCanvasFEConvolveMatrix : public K > 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 @@ public: > 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 @@ public: > 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; >Index: WebCore/kcanvas/KCanvasItem.cpp >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasItem.cpp,v >retrieving revision 1.10 >diff -p -u -r1.10 WebCore/kcanvas/KCanvasItem.cpp >--- WebCore/kcanvas/KCanvasItem.cpp 6 Dec 2005 01:23:18 -0000 1.10 >+++ WebCore/kcanvas/KCanvasItem.cpp 30 Dec 2005 13:22:12 -0000 >@@ -53,7 +53,7 @@ public: > KSVG::KCanvasRenderingStyle *style; > RefPtr<KCanvasPath> path; > >- QRect fillBBox, strokeBbox; >+ QRectF fillBBox, strokeBbox; > QMatrix matrix; > }; > >@@ -85,7 +85,7 @@ void RenderPath::setLocalTransform(const > 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 @@ bool RenderPath::fillContains(const QPoi > 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 @@ bool RenderPath::strokeContains(const QP > return false; > } > >-QRect RenderPath::relativeBBox(bool includeStroke) const >+QRectF RenderPath::relativeBBox(bool includeStroke) const > { >- QRect result; >+ QRectF result; > > if (!d->path) > return result; >Index: WebCore/kcanvas/KCanvasItem.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasItem.h,v >retrieving revision 1.7 >diff -p -u -r1.7 WebCore/kcanvas/KCanvasItem.h >--- WebCore/kcanvas/KCanvasItem.h 6 Dec 2005 01:23:18 -0000 1.7 >+++ WebCore/kcanvas/KCanvasItem.h 30 Dec 2005 13:22:12 -0000 >@@ -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 @@ public: > 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 @@ public: > 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; >Index: WebCore/kcanvas/KCanvasResources.cpp >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasResources.cpp,v >retrieving revision 1.12 >diff -p -u -r1.12 WebCore/kcanvas/KCanvasResources.cpp >--- WebCore/kcanvas/KCanvasResources.cpp 6 Dec 2005 01:23:19 -0000 1.12 >+++ WebCore/kcanvas/KCanvasResources.cpp 30 Dec 2005 13:22:12 -0000 >@@ -195,7 +195,7 @@ float KCanvasMarker::scaleY() const > 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 @@ void KCanvasMarker::draw(const QRect &re > 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, rect.toRect(), PaintActionForeground, 0); > m_marker->setLocalTransform(rotation.multiply(translation).qmatrix()); > static_cast<KCanvasContainer *>(m_marker)->setDrawsContents(true); > m_marker->paint(info, 0, 0); >Index: WebCore/kcanvas/KCanvasResources.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasResources.h,v >retrieving revision 1.11 >diff -p -u -r1.11 WebCore/kcanvas/KCanvasResources.h >--- WebCore/kcanvas/KCanvasResources.h 6 Dec 2005 01:23:19 -0000 1.11 >+++ WebCore/kcanvas/KCanvasResources.h 30 Dec 2005 13:22:12 -0000 >@@ -114,7 +114,7 @@ public: > 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: >Index: WebCore/kcanvas/KCanvasTreeDebug.cpp >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasTreeDebug.cpp,v >retrieving revision 1.12 >diff -p -u -r1.12 WebCore/kcanvas/KCanvasTreeDebug.cpp >--- WebCore/kcanvas/KCanvasTreeDebug.cpp 6 Dec 2005 01:53:12 -0000 1.12 >+++ WebCore/kcanvas/KCanvasTreeDebug.cpp 30 Dec 2005 13:22:12 -0000 >@@ -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 @@ QTextStream &operator<<(QTextStream &ts, > 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()) >Index: WebCore/kcanvas/KCanvasTreeDebug.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/KCanvasTreeDebug.h,v >retrieving revision 1.5 >diff -p -u -r1.5 WebCore/kcanvas/KCanvasTreeDebug.h >--- WebCore/kcanvas/KCanvasTreeDebug.h 27 Nov 2005 11:02:15 -0000 1.5 >+++ WebCore/kcanvas/KCanvasTreeDebug.h 30 Dec 2005 13:22:12 -0000 >@@ -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, > 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. >Index: WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp,v >retrieving revision 1.9 >diff -p -u -r1.9 WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp >--- WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp 27 Nov 2005 11:02:16 -0000 1.9 >+++ WebCore/kcanvas/device/KRenderingPaintServerGradient.cpp 30 Dec 2005 13:22:12 -0000 >@@ -172,7 +172,7 @@ public: > Private() { } > ~Private() { } > >- QPoint start, end; >+ QPointF start, end; > }; > > KRenderingPaintServerLinearGradient::KRenderingPaintServerLinearGradient() : KRenderingPaintServerGradient(), d(new Private()) >@@ -184,22 +184,22 @@ KRenderingPaintServerLinearGradient::~KR > 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 @@ public: > ~Private() { } > > float radius; >- QPoint center, focal; >+ QPointF center, focal; > }; > > KRenderingPaintServerRadialGradient::KRenderingPaintServerRadialGradient() : KRenderingPaintServerGradient(), d(new Private()) >@@ -238,22 +238,22 @@ KRenderingPaintServerRadialGradient::~KR > delete d; > } > >-QPoint KRenderingPaintServerRadialGradient::gradientCenter() const >+QPointF KRenderingPaintServerRadialGradient::gradientCenter() const > { > return d->center; > } > >-void KRenderingPaintServerRadialGradient::setGradientCenter(const QPoint ¢er) >+void KRenderingPaintServerRadialGradient::setGradientCenter(const QPointF ¢er) > { > 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; > } >Index: WebCore/kcanvas/device/KRenderingPaintServerGradient.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerGradient.h,v >retrieving revision 1.6 >diff -p -u -r1.6 WebCore/kcanvas/device/KRenderingPaintServerGradient.h >--- WebCore/kcanvas/device/KRenderingPaintServerGradient.h 8 Sep 2005 08:03:13 -0000 1.6 >+++ WebCore/kcanvas/device/KRenderingPaintServerGradient.h 30 Dec 2005 13:22:12 -0000 >@@ -102,11 +102,11 @@ public: > 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 @@ public: > virtual KCPaintServerType type() const; > > // 'Radial Gradient' interface >- QPoint gradientCenter() const; >- void setGradientCenter(const QPoint ¢er); >+ QPointF gradientCenter() const; >+ void setGradientCenter(const QPointF ¢er); > >- QPoint gradientFocal() const; >- void setGradientFocal(const QPoint &focal); >+ QPointF gradientFocal() const; >+ void setGradientFocal(const QPointF &focal); > > float gradientRadius() const; > void setGradientRadius(float radius); >Index: WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp,v >retrieving revision 1.7 >diff -p -u -r1.7 WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp >--- WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp 21 Nov 2005 08:29:14 -0000 1.7 >+++ WebCore/kcanvas/device/KRenderingPaintServerPattern.cpp 30 Dec 2005 13:22:12 -0000 >@@ -34,7 +34,6 @@ public: > Private() > { > tile = 0; >- x = y = width = height = 0; > useBoundingBoxMode = true; > listener = 0; > } >@@ -42,7 +41,7 @@ public: > > KCanvasImage *tile; > KCanvasMatrix patternTransform; >- float x, y, width, height; >+ QRectF bbox; > bool useBoundingBoxMode; > KCanvasResourceListener *listener; > }; >@@ -56,24 +55,14 @@ KRenderingPaintServerPattern::~KRenderin > 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 @@ void KRenderingPaintServerPattern::setBo > 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 @@ void KRenderingPaintServerPattern::setLi > 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()) >Index: WebCore/kcanvas/device/KRenderingPaintServerPattern.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/KRenderingPaintServerPattern.h,v >retrieving revision 1.5 >diff -p -u -r1.5 WebCore/kcanvas/device/KRenderingPaintServerPattern.h >--- WebCore/kcanvas/device/KRenderingPaintServerPattern.h 8 Sep 2005 08:03:13 -0000 1.5 >+++ WebCore/kcanvas/device/KRenderingPaintServerPattern.h 30 Dec 2005 13:22:12 -0000 >@@ -38,24 +38,15 @@ public: > > 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); >Index: WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.h,v >retrieving revision 1.8 >diff -p -u -r1.8 WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.h >--- WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.h 28 Nov 2005 23:33:59 -0000 1.8 >+++ WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.h 30 Dec 2005 13:22:12 -0000 >@@ -41,8 +41,8 @@ public: > 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); >Index: WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm,v >retrieving revision 1.22 >diff -p -u -r1.22 WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm >--- WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm 30 Dec 2005 09:48:55 -0000 1.22 >+++ WebCore/kcanvas/device/quartz/KCanvasFilterQuartz.mm 30 Dec 2005 13:22:12 -0000 >@@ -75,7 +75,7 @@ KCanvasFilterQuartz::~KCanvasFilterQuart > [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 @@ void KCanvasFilterQuartz::prepareFilter( > 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; >Index: WebCore/kcanvas/device/quartz/KCanvasItemQuartz.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasItemQuartz.h,v >retrieving revision 1.5 >diff -p -u -r1.5 WebCore/kcanvas/device/quartz/KCanvasItemQuartz.h >--- WebCore/kcanvas/device/quartz/KCanvasItemQuartz.h 29 Nov 2005 02:03:55 -0000 1.5 >+++ WebCore/kcanvas/device/quartz/KCanvasItemQuartz.h 30 Dec 2005 13:22:12 -0000 >@@ -31,10 +31,10 @@ public: > 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 absoluteTransform().mapRect(relativeBBox(true)).toRect(); } > > virtual bool requiresLayer() { return false; } > virtual void layout() { setNeedsLayout(false); } >@@ -42,5 +42,5 @@ public: > 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; > }; >Index: WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm,v >retrieving revision 1.15 >diff -p -u -r1.15 WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm >--- WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm 6 Dec 2005 01:53:12 -0000 1.15 >+++ WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm 30 Dec 2005 13:22:12 -0000 >@@ -104,7 +104,7 @@ void drawMarkerWithData(MarkerData &data > 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 @@ void DrawStartAndMidMarkers(void *info, > 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 @@ void KCanvasItemQuartz::paint(PaintInfo > paintInfo.p->save(); > CGContextRef context = quartzDevice->currentCGContext(); > >- QRect dirtyRect = paintInfo.r; >+ QRectF dirtyRect = paintInfo.r; > > RenderPath::setupForDraw(); > >@@ -262,7 +262,7 @@ bool KCanvasItemQuartz::nodeAtPoint(Node > 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 @@ CGContextRef getSharedContext() > } > > >-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 @@ QRect KCanvasItemQuartz::bboxForPath(boo > // 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); >Index: WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h,v >retrieving revision 1.6 >diff -p -u -r1.6 WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h >--- WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h 23 Nov 2005 15:14:07 -0000 1.6 >+++ WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.h 30 Dec 2005 13:22:12 -0000 >@@ -42,7 +42,7 @@ public: > virtual void layout(); > virtual void paint(PaintInfo &paintInfo, int parentX, int parentY); > >- virtual QRect getAbsoluteRepaintRect() { return absoluteTransform().mapRect(relativeBBox(true)); } >+ virtual QRect getAbsoluteRepaintRect() { return absoluteTransform().mapRect(relativeBBox(true)).toRect(); } > virtual QMatrix absoluteTransform() const; > > virtual void setViewport(const QRect &viewport); >Index: WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm >=================================================================== >RCS file: /cvs/root/WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm,v >retrieving revision 1.12 >diff -p -u -r1.12 WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm >--- WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm 30 Dec 2005 09:48:55 -0000 1.12 >+++ WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm 30 Dec 2005 13:22:12 -0000 >@@ -104,7 +104,7 @@ void KRenderingPaintServerPatternQuartz: > 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 @@ void KRenderingPaintServerPatternQuartz: > 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 ); >Index: WebCore/khtml/rendering/render_object.h >=================================================================== >RCS file: /cvs/root/WebCore/khtml/rendering/render_object.h,v >retrieving revision 1.171 >diff -p -u -r1.171 WebCore/khtml/rendering/render_object.h >--- WebCore/khtml/rendering/render_object.h 21 Dec 2005 22:51:11 -0000 1.171 >+++ WebCore/khtml/rendering/render_object.h 30 Dec 2005 13:22:13 -0000 >@@ -29,6 +29,9 @@ > #include <qrect.h> > #include <assert.h> > #include <qwmatrix.h> >+#if SVG_SUPPORT >+#include <QRectF> >+#endif > > #include "editing/text_affinity.h" > #include "misc/khtmllayout.h" >@@ -279,8 +282,8 @@ public: > #if SVG_SUPPORT > virtual bool isKCanvasContainer() const { return false; } > virtual bool isRenderPath() const { return false; } >- virtual QRect relativeBBox(bool includeStroke = true) const { return QRect(); } >- // We may eventually want to make these non-virtual >+ virtual QRectF relativeBBox(bool includeStroke = true) const { return QRectF(); } >+ // We may eventually want to make these non-virtual (and QWMatrix) > virtual QMatrix localTransform() const { return QMatrix(1, 0, 0, 1, xPos(), yPos()); } > virtual void setLocalTransform(const QMatrix&) { } > virtual QMatrix absoluteTransform() const; >Index: WebCore/ksvg2/svg/SVGFilterElementImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGFilterElementImpl.cpp,v >retrieving revision 1.12 >diff -p -u -r1.12 WebCore/ksvg2/svg/SVGFilterElementImpl.cpp >--- WebCore/ksvg2/svg/SVGFilterElementImpl.cpp 27 Nov 2005 11:02:25 -0000 1.12 >+++ WebCore/ksvg2/svg/SVGFilterElementImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -181,9 +181,9 @@ KCanvasFilter *SVGFilterElementImpl::can > 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); >Index: WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp,v >retrieving revision 1.10 >diff -p -u -r1.10 WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp >--- WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp 26 Nov 2005 22:19:11 -0000 1.10 >+++ WebCore/ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -118,9 +118,9 @@ void SVGFilterPrimitiveStandardAttribute > 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()); > } >Index: WebCore/ksvg2/svg/SVGLengthImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGLengthImpl.cpp,v >retrieving revision 1.8 >diff -p -u -r1.8 WebCore/ksvg2/svg/SVGLengthImpl.cpp >--- WebCore/ksvg2/svg/SVGLengthImpl.cpp 23 Nov 2005 15:14:09 -0000 1.8 >+++ WebCore/ksvg2/svg/SVGLengthImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -97,7 +97,7 @@ float SVGLengthImpl::value() const > 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) >Index: WebCore/ksvg2/svg/SVGLinearGradientElementImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGLinearGradientElementImpl.cpp,v >retrieving revision 1.10 >diff -p -u -r1.10 WebCore/ksvg2/svg/SVGLinearGradientElementImpl.cpp >--- WebCore/ksvg2/svg/SVGLinearGradientElementImpl.cpp 19 Dec 2005 19:52:53 -0000 1.10 >+++ WebCore/ksvg2/svg/SVGLinearGradientElementImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -190,8 +190,8 @@ void SVGLinearGradientElementImpl::build > > 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 >Index: WebCore/ksvg2/svg/SVGLocatableImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGLocatableImpl.cpp,v >retrieving revision 1.11 >diff -p -u -r1.11 WebCore/ksvg2/svg/SVGLocatableImpl.cpp >--- WebCore/ksvg2/svg/SVGLocatableImpl.cpp 2 Dec 2005 22:44:27 -0000 1.11 >+++ WebCore/ksvg2/svg/SVGLocatableImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -81,7 +81,7 @@ SVGRectImpl *SVGLocatableImpl::getBBox(c > > 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()); >Index: WebCore/ksvg2/svg/SVGPatternElementImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGPatternElementImpl.cpp,v >retrieving revision 1.16 >diff -p -u -r1.16 WebCore/ksvg2/svg/SVGPatternElementImpl.cpp >--- WebCore/ksvg2/svg/SVGPatternElementImpl.cpp 19 Dec 2005 19:52:54 -0000 1.16 >+++ WebCore/ksvg2/svg/SVGPatternElementImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -223,11 +223,8 @@ void SVGPatternElementImpl::drawPatternC > > 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); > >Index: WebCore/ksvg2/svg/SVGRadialGradientElementImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGRadialGradientElementImpl.cpp,v >retrieving revision 1.9 >diff -p -u -r1.9 WebCore/ksvg2/svg/SVGRadialGradientElementImpl.cpp >--- WebCore/ksvg2/svg/SVGRadialGradientElementImpl.cpp 19 Dec 2005 19:52:54 -0000 1.9 >+++ WebCore/ksvg2/svg/SVGRadialGradientElementImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -215,8 +215,8 @@ void SVGRadialGradientElementImpl::build > > 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); > } > >Index: WebCore/ksvg2/svg/SVGSVGElementImpl.cpp >=================================================================== >RCS file: /cvs/root/WebCore/ksvg2/svg/SVGSVGElementImpl.cpp,v >retrieving revision 1.17 >diff -p -u -r1.17 WebCore/ksvg2/svg/SVGSVGElementImpl.cpp >--- WebCore/ksvg2/svg/SVGSVGElementImpl.cpp 16 Dec 2005 02:30:13 -0000 1.17 >+++ WebCore/ksvg2/svg/SVGSVGElementImpl.cpp 30 Dec 2005 13:22:15 -0000 >@@ -334,8 +334,8 @@ bool SVGSVGElementImpl::checkIntersectio > // 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 @@ bool SVGSVGElementImpl::checkEnclosure(S > // 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); > } >Index: WebCore/kwq/KWQRect.h >=================================================================== >RCS file: /cvs/root/WebCore/kwq/KWQRect.h,v >retrieving revision 1.35 >diff -p -u -r1.35 WebCore/kwq/KWQRect.h >--- WebCore/kwq/KWQRect.h 19 Dec 2005 19:53:00 -0000 1.35 >+++ WebCore/kwq/KWQRect.h 30 Dec 2005 13:22:15 -0000 >@@ -46,7 +46,7 @@ public: > explicit QRect(const NSRect &); // don't do this implicitly since it's lossy > #endif > explicit QRect(const CGRect &); // don't do this implicitly since it's lossy >- >+ > bool isNull() const; > bool isValid() const; > bool isEmpty() const; >Index: WebCore/kwq/KWQWMatrix.h >=================================================================== >RCS file: /cvs/root/WebCore/kwq/KWQWMatrix.h,v >retrieving revision 1.4 >diff -p -u -r1.4 WebCore/kwq/KWQWMatrix.h >--- WebCore/kwq/KWQWMatrix.h 26 Nov 2005 22:27:07 -0000 1.4 >+++ WebCore/kwq/KWQWMatrix.h 30 Dec 2005 13:22:15 -0000 >@@ -27,6 +27,7 @@ > #define QWMATRIX_H_ > > #include <ApplicationServices/ApplicationServices.h> >+#include <QRectF> > > class QRect; > >@@ -39,6 +40,7 @@ public: > 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; > >Index: WebCore/kwq/KWQWMatrix.mm >=================================================================== >RCS file: /cvs/root/WebCore/kwq/KWQWMatrix.mm,v >retrieving revision 1.11 >diff -p -u -r1.11 WebCore/kwq/KWQWMatrix.mm >--- WebCore/kwq/KWQWMatrix.mm 26 Nov 2005 22:27:07 -0000 1.11 >+++ WebCore/kwq/KWQWMatrix.mm 30 Dec 2005 13:22:15 -0000 >@@ -60,6 +60,11 @@ QRect QWMatrix::mapRect(const QRect &rec > 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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 4462
:
3898
|
3903
|
3904
|
3905
|
3908
|
3910
|
4399
|
4400
|
4401
|
5378
|
5379
|
5441
|
5443