[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
cmarrin at apple.com
cmarrin at apple.com
Wed Dec 22 18:12:36 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b7d601f2508a15d4c5c8a33e7577d8aed46e8954
Author: cmarrin at apple.com <cmarrin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 8 20:43:43 2010 +0000
2010-12-08 Chris Marrin <cmarrin at apple.com>
Reviewed by Simon Fraser.
Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
https://bugs.webkit.org/show_bug.cgi?id=49388
Added copy constructors and casting operators to go between
TransformationMatrix and CATransform3D. Also added a copy
constructor to go from CGAffineTransform to TransformationMatrix.
Used these new methods to clean up platform CA code. This will
make it easier to port to Windows.
I also fixed a couple of build issues found when trying out a
Windows build.
This is a resubmission of changesets r73477 and r73483 with a
fix for the SL build. The failure was because TransformationMatrix
included QuartzCore/CATransform3D.h which brought in some system
libraries, including Quickdraw, which has a definition for
'Cursor' which clashed with WebCore's 'Cursor' class. So I had
to qualify its use in WebChromeClient.cpp in WebKit2.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 83cca4f..5feeb8d 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-08 Chris Marrin <cmarrin at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
+ https://bugs.webkit.org/show_bug.cgi?id=49388
+
+ Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
+ which was decided was the best way to identify a build with CoreAnimation
+
+ * wtf/Platform.h:
+
2010-12-07 Anders Carlsson <andersca at apple.com>
Build fix follow up build fix.
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index 12c3e3d..5c4aec2 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -530,6 +530,9 @@
#if PLATFORM(MAC) && !PLATFORM(IOS)
#define WTF_PLATFORM_CI 1
#endif
+#if PLATFORM(MAC) || PLATFORM(IOS) || (PLATFORM(WIN) && PLATFORM(CG))
+#define WTF_PLATFORM_CA 1
+#endif
/* PLATFORM(SKIA) for Win/Linux, CG/CI for Mac */
#if PLATFORM(CHROMIUM)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cd77601..6635e86 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,47 @@
+2010-12-08 Chris Marrin <cmarrin at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
+ https://bugs.webkit.org/show_bug.cgi?id=49388
+
+ Added copy constructors and casting operators to go between
+ TransformationMatrix and CATransform3D. Also added a copy
+ constructor to go from CGAffineTransform to TransformationMatrix.
+ Used these new methods to clean up platform CA code. This will
+ make it easier to port to Windows.
+
+ I also fixed a couple of build issues found when trying out a
+ Windows build.
+
+ This is a resubmission of changesets r73477 and r73483 with a
+ fix for the SL build. The failure was because TransformationMatrix
+ included QuartzCore/CATransform3D.h which brought in some system
+ libraries, including Quickdraw, which has a definition for
+ 'Cursor' which clashed with WebCore's 'Cursor' class. So I had
+ to qualify its use in WebChromeClient.cpp in WebKit2.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::updateContentsTransform):
+ (WebCore::GraphicsLayerCA::ensureCloneLayers):
+ (WebCore::GraphicsLayerCA::fetchCloneLayers):
+ * platform/graphics/ca/TransformationMatrixCA.cpp: Copied from WebCore/platform/graphics/ca/TransformationMatrixCA.cpp.
+ * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
+ (PlatformCAAnimation::setFromValue):
+ (PlatformCAAnimation::setToValue):
+ (PlatformCAAnimation::setValues):
+ * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+ (PlatformCALayer::transform):
+ (PlatformCALayer::setTransform):
+ (PlatformCALayer::sublayerTransform):
+ (PlatformCALayer::setSublayerTransform):
+ (PlatformCALayer::contentsTransform):
+ (PlatformCALayer::setContentsTransform):
+ * platform/graphics/cg/TransformationMatrixCG.cpp:
+ (WebCore::TransformationMatrix::TransformationMatrix):
+ * platform/graphics/transforms/TransformationMatrix.h:
+
2010-12-07 Brian Weinstein <bweinstein at apple.com>
Reviewed by John Sullivan.
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 64133da..b51a30c 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1009,6 +1009,7 @@
49484FCB102CF23C00187DD3 /* CanvasRenderingContext2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */; };
49484FCD102CF23C00187DD3 /* CanvasStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */; };
49484FCE102CF23C00187DD3 /* CanvasStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 49484FC0102CF23C00187DD3 /* CanvasStyle.h */; };
+ 494BC40D12AEDD9E00743BD2 /* TransformationMatrixCA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 494BC40C12AEDD9E00743BD2 /* TransformationMatrixCA.cpp */; };
494BD7950F55C8EE00747828 /* WebKitPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 494BD7930F55C8EE00747828 /* WebKitPoint.h */; };
494BD79D0F55C94C00747828 /* JSWebKitPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 494BD79B0F55C94C00747828 /* JSWebKitPoint.cpp */; };
494BD79E0F55C94C00747828 /* JSWebKitPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 494BD79C0F55C94C00747828 /* JSWebKitPoint.h */; };
@@ -7146,6 +7147,7 @@
49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CanvasRenderingContext2D.idl; path = canvas/CanvasRenderingContext2D.idl; sourceTree = "<group>"; };
49484FBF102CF23C00187DD3 /* CanvasStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasStyle.cpp; path = canvas/CanvasStyle.cpp; sourceTree = "<group>"; };
49484FC0102CF23C00187DD3 /* CanvasStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasStyle.h; path = canvas/CanvasStyle.h; sourceTree = "<group>"; };
+ 494BC40C12AEDD9E00743BD2 /* TransformationMatrixCA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TransformationMatrixCA.cpp; path = ca/TransformationMatrixCA.cpp; sourceTree = "<group>"; };
494BD7930F55C8EE00747828 /* WebKitPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitPoint.h; sourceTree = "<group>"; };
494BD7940F55C8EE00747828 /* WebKitPoint.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitPoint.idl; sourceTree = "<group>"; };
494BD79B0F55C94C00747828 /* JSWebKitPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitPoint.cpp; sourceTree = "<group>"; };
@@ -12805,6 +12807,7 @@
499B3ED4128CD31400E726C2 /* GraphicsLayerCA.cpp */,
499B3ED5128CD31400E726C2 /* GraphicsLayerCA.h */,
499B3EC3128CCC4700E726C2 /* PlatformCALayer.h */,
+ 494BC40C12AEDD9E00743BD2 /* TransformationMatrixCA.cpp */,
);
name = ca;
sourceTree = "<group>";
@@ -24098,6 +24101,7 @@
499B3ED6128CD31400E726C2 /* GraphicsLayerCA.cpp in Sources */,
4958782112A57DDF007238AC /* PlatformCAAnimationMac.mm in Sources */,
4958782212A57DDF007238AC /* PlatformCALayerMac.mm in Sources */,
+ 494BC40D12AEDD9E00743BD2 /* TransformationMatrixCA.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 548838e..4605168 100644
--- a/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -40,9 +40,7 @@
#include "TranslateTransformOperation.h"
#include <QuartzCore/QuartzCore.h>
#include <limits.h>
-#include <objc/objc-auto.h>
#include <wtf/CurrentTime.h>
-#include <wtf/UnusedParam.h>
#include <wtf/text/StringConcatenate.h>
using namespace std;
@@ -1990,8 +1988,7 @@ void GraphicsLayerCA::updateContentsTransform()
if (contentsOrientation() == CompositingCoordinatesBottomUp) {
CGAffineTransform contentsTransform = CGAffineTransformMakeScale(1, -1);
contentsTransform = CGAffineTransformTranslate(contentsTransform, 0, -m_layer->bounds().size().height());
- TransformationMatrix transform3D(contentsTransform.a, contentsTransform.b, contentsTransform.c, contentsTransform.d, contentsTransform.tx, contentsTransform.ty);
- m_layer->setContentsTransform(TransformationMatrix(transform3D));
+ m_layer->setContentsTransform(TransformationMatrix(contentsTransform));
}
#endif
}
@@ -2045,8 +2042,8 @@ PassRefPtr<PlatformCALayer> GraphicsLayerCA::findOrMakeClone(CloneID cloneID, Pl
void GraphicsLayerCA::ensureCloneLayers(CloneID cloneID, RefPtr<PlatformCALayer>& primaryLayer, RefPtr<PlatformCALayer>& structuralLayer, RefPtr<PlatformCALayer>& contentsLayer, CloneLevel cloneLevel)
{
- structuralLayer = nil;
- contentsLayer = nil;
+ structuralLayer = 0;
+ contentsLayer = 0;
if (!m_layerClones)
m_layerClones = new LayerMap;
@@ -2108,7 +2105,7 @@ PassRefPtr<PlatformCALayer> GraphicsLayerCA::fetchCloneLayers(GraphicsLayer* rep
// We are a replica being asked for clones of our layers.
RefPtr<PlatformCALayer> replicaRoot = replicatedLayerRoot(replicaState);
if (!replicaRoot)
- return nil;
+ return 0;
if (structuralLayer) {
structuralLayer->insertSublayer(replicaRoot.get(), 0);
diff --git a/WebCore/platform/graphics/ca/TransformationMatrixCA.cpp b/WebCore/platform/graphics/ca/TransformationMatrixCA.cpp
new file mode 100644
index 0000000..27805e6
--- /dev/null
+++ b/WebCore/platform/graphics/ca/TransformationMatrixCA.cpp
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE 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"
+
+#if PLATFORM(CA)
+
+#include "TransformationMatrix.h"
+
+#include "FloatConversion.h"
+
+namespace WebCore {
+
+TransformationMatrix::TransformationMatrix(const CATransform3D& t)
+{
+ setMatrix(
+ t.m11, t.m12, t.m13, t.m14,
+ t.m21, t.m22, t.m23, t.m24,
+ t.m31, t.m32, t.m33, t.m34,
+ t.m41, t.m42, t.m43, t.m44);
+}
+
+TransformationMatrix::operator CATransform3D() const
+{
+ CATransform3D toT3D;
+ toT3D.m11 = narrowPrecisionToFloat(m11());
+ toT3D.m12 = narrowPrecisionToFloat(m12());
+ toT3D.m13 = narrowPrecisionToFloat(m13());
+ toT3D.m14 = narrowPrecisionToFloat(m14());
+ toT3D.m21 = narrowPrecisionToFloat(m21());
+ toT3D.m22 = narrowPrecisionToFloat(m22());
+ toT3D.m23 = narrowPrecisionToFloat(m23());
+ toT3D.m24 = narrowPrecisionToFloat(m24());
+ toT3D.m31 = narrowPrecisionToFloat(m31());
+ toT3D.m32 = narrowPrecisionToFloat(m32());
+ toT3D.m33 = narrowPrecisionToFloat(m33());
+ toT3D.m34 = narrowPrecisionToFloat(m34());
+ toT3D.m41 = narrowPrecisionToFloat(m41());
+ toT3D.m42 = narrowPrecisionToFloat(m42());
+ toT3D.m43 = narrowPrecisionToFloat(m43());
+ toT3D.m44 = narrowPrecisionToFloat(m44());
+ return toT3D;
+}
+
+}
+
+#endif // PLATFORM(CA)
diff --git a/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm b/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm
index 818317c..447d932 100644
--- a/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm
+++ b/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm
@@ -42,26 +42,6 @@ using namespace WebCore;
// This value must be the same as in PlatformCALayerMac.mm
static NSString * const WKNonZeroBeginTimeFlag = @"WKPlatformCAAnimationNonZeroBeginTimeFlag";
-static inline void copyTransform(CATransform3D& toT3D, const TransformationMatrix& t)
-{
- toT3D.m11 = narrowPrecisionToFloat(t.m11());
- toT3D.m12 = narrowPrecisionToFloat(t.m12());
- toT3D.m13 = narrowPrecisionToFloat(t.m13());
- toT3D.m14 = narrowPrecisionToFloat(t.m14());
- toT3D.m21 = narrowPrecisionToFloat(t.m21());
- toT3D.m22 = narrowPrecisionToFloat(t.m22());
- toT3D.m23 = narrowPrecisionToFloat(t.m23());
- toT3D.m24 = narrowPrecisionToFloat(t.m24());
- toT3D.m31 = narrowPrecisionToFloat(t.m31());
- toT3D.m32 = narrowPrecisionToFloat(t.m32());
- toT3D.m33 = narrowPrecisionToFloat(t.m33());
- toT3D.m34 = narrowPrecisionToFloat(t.m34());
- toT3D.m41 = narrowPrecisionToFloat(t.m41());
- toT3D.m42 = narrowPrecisionToFloat(t.m42());
- toT3D.m43 = narrowPrecisionToFloat(t.m43());
- toT3D.m44 = narrowPrecisionToFloat(t.m44());
-}
-
static NSString* toCAFillModeType(PlatformCAAnimation::FillModeType type)
{
switch (type) {
@@ -389,10 +369,8 @@ void PlatformCAAnimation::setFromValue(const WebCore::TransformationMatrix& valu
{
if (animationType() != Basic)
return;
-
- CATransform3D caTransform;
- copyTransform(caTransform, value);
- [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:[NSValue valueWithCATransform3D:caTransform]];
+
+ [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:[NSValue valueWithCATransform3D:value]];
}
void PlatformCAAnimation::setFromValue(const FloatPoint3D& value)
@@ -443,9 +421,7 @@ void PlatformCAAnimation::setToValue(const WebCore::TransformationMatrix& value)
if (animationType() != Basic)
return;
- CATransform3D caTransform;
- copyTransform(caTransform, value);
- [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:[NSValue valueWithCATransform3D:caTransform]];
+ [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:[NSValue valueWithCATransform3D:value]];
}
void PlatformCAAnimation::setToValue(const FloatPoint3D& value)
@@ -503,12 +479,10 @@ void PlatformCAAnimation::setValues(const Vector<WebCore::TransformationMatrix>&
return;
NSMutableArray* array = [NSMutableArray array];
- CATransform3D caTransform;
- for (size_t i = 0; i < value.size(); ++i) {
- copyTransform(caTransform, value[i]);
- [array addObject:[NSValue valueWithCATransform3D:caTransform]];
- }
+ for (size_t i = 0; i < value.size(); ++i)
+ [array addObject:[NSValue valueWithCATransform3D:value[i]]];
+
[static_cast<CAKeyframeAnimation*>(m_animation.get()) setValues:array];
}
diff --git a/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm b/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
index bb30b5f..9478632 100644
--- a/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
+++ b/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm
@@ -95,26 +95,6 @@ static double mediaTimeToCurrentTime(CFTimeInterval t)
static NSString * const platformCALayerPointer = @"WKPlatformCALayer";
-static inline void copyTransform(CATransform3D& toT3D, const TransformationMatrix& t)
-{
- toT3D.m11 = narrowPrecisionToFloat(t.m11());
- toT3D.m12 = narrowPrecisionToFloat(t.m12());
- toT3D.m13 = narrowPrecisionToFloat(t.m13());
- toT3D.m14 = narrowPrecisionToFloat(t.m14());
- toT3D.m21 = narrowPrecisionToFloat(t.m21());
- toT3D.m22 = narrowPrecisionToFloat(t.m22());
- toT3D.m23 = narrowPrecisionToFloat(t.m23());
- toT3D.m24 = narrowPrecisionToFloat(t.m24());
- toT3D.m31 = narrowPrecisionToFloat(t.m31());
- toT3D.m32 = narrowPrecisionToFloat(t.m32());
- toT3D.m33 = narrowPrecisionToFloat(t.m33());
- toT3D.m34 = narrowPrecisionToFloat(t.m34());
- toT3D.m41 = narrowPrecisionToFloat(t.m41());
- toT3D.m42 = narrowPrecisionToFloat(t.m42());
- toT3D.m43 = narrowPrecisionToFloat(t.m43());
- toT3D.m44 = narrowPrecisionToFloat(t.m44());
-}
-
bool PlatformCALayer::isValueFunctionSupported()
{
static bool sHaveValueFunction = [CAPropertyAnimation instancesRespondToSelector:@selector(setValueFunction:)];
@@ -458,31 +438,25 @@ void PlatformCALayer::setAnchorPoint(const FloatPoint3D& value)
TransformationMatrix PlatformCALayer::transform() const
{
- CATransform3D t = [m_layer.get() transform];
- return TransformationMatrix(t.m11, t.m12, t.m13, t.m14, t.m21, t.m22, t.m23, t.m24, t.m31, t.m32, t.m33, t.m34, t.m41, t.m42, t.m43, t.m44);
+ return [m_layer.get() transform];
}
void PlatformCALayer::setTransform(const TransformationMatrix& value)
{
- CATransform3D transform;
- copyTransform(transform, value);
BEGIN_BLOCK_OBJC_EXCEPTIONS
- [m_layer.get() setTransform:transform];
+ [m_layer.get() setTransform:value];
END_BLOCK_OBJC_EXCEPTIONS
}
TransformationMatrix PlatformCALayer::sublayerTransform() const
{
- CATransform3D t = [m_layer.get() sublayerTransform];
- return TransformationMatrix(t.m11, t.m12, t.m13, t.m14, t.m21, t.m22, t.m23, t.m24, t.m31, t.m32, t.m33, t.m34, t.m41, t.m42, t.m43, t.m44);
+ return [m_layer.get() sublayerTransform];
}
void PlatformCALayer::setSublayerTransform(const TransformationMatrix& value)
{
- CATransform3D transform;
- copyTransform(transform, value);
BEGIN_BLOCK_OBJC_EXCEPTIONS
- [m_layer.get() setSublayerTransform:transform];
+ [m_layer.get() setSublayerTransform:value];
END_BLOCK_OBJC_EXCEPTIONS
}
@@ -492,8 +466,7 @@ TransformationMatrix PlatformCALayer::contentsTransform() const
if (m_layerType != LayerTypeWebLayer)
return TransformationMatrix();
- CGAffineTransform t = [static_cast<WebLayer*>(m_layer.get()) contentsTransform];
- return TransformationMatrix(t.a, t.b, t.c, t.d, t.tx, t.ty);
+ return [static_cast<WebLayer*>(m_layer.get()) contentsTransform];
#else
return TransformationMatrix();
#endif
@@ -505,9 +478,8 @@ void PlatformCALayer::setContentsTransform(const TransformationMatrix& value)
if (m_layerType != LayerTypeWebLayer)
return;
- CGAffineTransform transform = value;
BEGIN_BLOCK_OBJC_EXCEPTIONS
- [m_layer.get() setContentsTransform:transform];
+ [m_layer.get() setContentsTransform:value];
END_BLOCK_OBJC_EXCEPTIONS
#else
UNUSED_PARAM(value);
diff --git a/WebCore/platform/graphics/cg/TransformationMatrixCG.cpp b/WebCore/platform/graphics/cg/TransformationMatrixCG.cpp
index 5fe2122..ec40836 100644
--- a/WebCore/platform/graphics/cg/TransformationMatrixCG.cpp
+++ b/WebCore/platform/graphics/cg/TransformationMatrixCG.cpp
@@ -34,6 +34,16 @@
namespace WebCore {
+TransformationMatrix::TransformationMatrix(const CGAffineTransform& t)
+{
+ setA(t.a);
+ setB(t.b);
+ setC(t.c);
+ setD(t.d);
+ setE(t.tx);
+ setF(t.ty);
+}
+
TransformationMatrix::operator CGAffineTransform() const
{
return CGAffineTransformMake(narrowPrecisionToCGFloat(a()),
diff --git a/WebCore/platform/graphics/transforms/TransformationMatrix.h b/WebCore/platform/graphics/transforms/TransformationMatrix.h
index 96b4baa..f13bcc1 100644
--- a/WebCore/platform/graphics/transforms/TransformationMatrix.h
+++ b/WebCore/platform/graphics/transforms/TransformationMatrix.h
@@ -32,6 +32,9 @@
#include <string.h> //for memcpy
#include <wtf/FastAllocBase.h>
+#if PLATFORM(CA)
+#include <QuartzCore/CATransform3D.h>
+#endif
#if PLATFORM(CG)
#include <CoreGraphics/CGAffineTransform.h>
#elif PLATFORM(CAIRO)
@@ -309,7 +312,12 @@ public:
return result;
}
+#if PLATFORM(CA)
+ TransformationMatrix(const CATransform3D&);
+ operator CATransform3D() const;
+#endif
#if PLATFORM(CG)
+ TransformationMatrix(const CGAffineTransform&);
operator CGAffineTransform() const;
#elif PLATFORM(CAIRO)
operator cairo_matrix_t() const;
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index b356e79..1639823 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-08 Chris Marrin <cmarrin at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
+ https://bugs.webkit.org/show_bug.cgi?id=49388
+
+ Fixes a build failure because WebChromeClient.cpp uses WebCore::Cursor.
+ This patch adds an include of QuartzCore/CATransform3D, which includes
+ a file that has a 'Cursor' object defined. So I had to qualify the
+ use of Cursor in WebChromeClient.cpp.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::setCursor):
+
2010-12-07 Brian Weinstein <bweinstein at apple.com>
Reviewed by John Sullivan.
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index 1bb0530..2d5e4e0 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -519,7 +519,7 @@ void WebChromeClient::chooseIconForFiles(const Vector<String>&, FileChooser*)
notImplemented();
}
-void WebChromeClient::setCursor(const Cursor& cursor)
+void WebChromeClient::setCursor(const WebCore::Cursor& cursor)
{
#if USE(LAZY_NATIVE_CURSOR)
m_page->send(Messages::WebPageProxy::SetCursor(cursor));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list