[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 13:27:04 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 88ad2fd75388d5b520c9801e7040c37840d0322d
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 15 23:27:15 2010 +0000
2010-09-15 Simon Fraser <simon.fraser at apple.com>
Reviewed by Adam Roben.
https://bugs.webkit.org/show_bug.cgi?id=44715
maps.google.com flips upside down when zooming map using trackpad in WebKit2 on Mac
Remove the concept of geometry flipping from GraphicsLayer; geometry flipping will
be taken care of in platform code without the need to complicate the GraphicsLayer API.
RenderLayerCompositor no longer sets the geometry orientation for the root
platform layer; platform-specific code does this instead.
This fixes flipped layers in WebKit2, since WebKit2 was already flipping
geometry, and then RenderLayerCompositor was doing an additional flip.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
* platform/graphics/GraphicsLayer.h:
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/mac/GraphicsLayerCA.h:
* platform/graphics/mac/GraphicsLayerCA.mm:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::defaultContentsOrientation):
* platform/graphics/qt/GraphicsLayerQt.cpp:
(WebCore::GraphicsLayerQtImpl::flushChanges):
* platform/graphics/qt/GraphicsLayerQt.h:
* platform/graphics/win/GraphicsLayerCACF.cpp:
(WebCore::GraphicsLayerCACF::swapFromOrToTiledLayer):
* platform/graphics/win/GraphicsLayerCACF.h:
* platform/graphics/win/WKCACFLayerRenderer.cpp:
(WebCore::WKCACFLayerRenderer::setRootChildLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7249a48..a65d294 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,40 @@
+2010-09-15 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44715
+ maps.google.com flips upside down when zooming map using trackpad in WebKit2 on Mac
+
+ Remove the concept of geometry flipping from GraphicsLayer; geometry flipping will
+ be taken care of in platform code without the need to complicate the GraphicsLayer API.
+
+ RenderLayerCompositor no longer sets the geometry orientation for the root
+ platform layer; platform-specific code does this instead.
+
+ This fixes flipped layers in WebKit2, since WebKit2 was already flipping
+ geometry, and then RenderLayerCompositor was doing an additional flip.
+
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::GraphicsLayer):
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+ * platform/graphics/chromium/GraphicsLayerChromium.h:
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+ (WebCore::GraphicsLayerCA::defaultContentsOrientation):
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::GraphicsLayerQtImpl::flushChanges):
+ * platform/graphics/qt/GraphicsLayerQt.h:
+ * platform/graphics/win/GraphicsLayerCACF.cpp:
+ (WebCore::GraphicsLayerCACF::swapFromOrToTiledLayer):
+ * platform/graphics/win/GraphicsLayerCACF.h:
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ (WebCore::WKCACFLayerRenderer::setRootChildLayer):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
+
2010-09-15 Julien Chaffraix <jchaffraix at codeaurora.org>
Unreviewed.
diff --git a/WebCore/platform/graphics/GraphicsLayer.cpp b/WebCore/platform/graphics/GraphicsLayer.cpp
index 5003907..39e55d4 100644
--- a/WebCore/platform/graphics/GraphicsLayer.cpp
+++ b/WebCore/platform/graphics/GraphicsLayer.cpp
@@ -73,7 +73,6 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_masksToBounds(false)
, m_drawsContent(false)
, m_paintingPhase(GraphicsLayerPaintAll)
- , m_geometryOrientation(CompositingCoordinatesTopDown)
, m_contentsOrientation(CompositingCoordinatesTopDown)
, m_parent(0)
, m_maskLayer(0)
diff --git a/WebCore/platform/graphics/GraphicsLayer.h b/WebCore/platform/graphics/GraphicsLayer.h
index 68a580e..04899f2 100644
--- a/WebCore/platform/graphics/GraphicsLayer.h
+++ b/WebCore/platform/graphics/GraphicsLayer.h
@@ -313,14 +313,7 @@ public:
int repaintCount() const { return m_repaintCount; }
int incrementRepaintCount() { return ++m_repaintCount; }
- // Report whether the underlying compositing system uses a top-down
- // or a bottom-up coordinate system.
enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, CompositingCoordinatesBottomUp };
- static CompositingCoordinatesOrientation compositingCoordinatesOrientation();
-
- // Set the geometry orientation (top-down, or bottom-up) for this layer, which also controls sublayer geometry.
- virtual void setGeometryOrientation(CompositingCoordinatesOrientation orientation) { m_geometryOrientation = orientation; }
- CompositingCoordinatesOrientation geometryOrientation() const { return m_geometryOrientation; }
// Flippedness of the contents of this layer. Does not affect sublayer geometry.
virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation) { m_contentsOrientation = orientation; }
@@ -395,8 +388,7 @@ protected:
bool m_drawsContent : 1;
GraphicsLayerPaintingPhase m_paintingPhase;
- CompositingCoordinatesOrientation m_geometryOrientation; // affects geometry of layer positions
- CompositingCoordinatesOrientation m_contentsOrientation; // affects orientation of layer contents
+ CompositingCoordinatesOrientation m_contentsOrientation; // affects orientation of layer contents
Vector<GraphicsLayer*> m_children;
GraphicsLayer* m_parent;
diff --git a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
index bbae72a..a9b88b0 100644
--- a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
@@ -400,15 +400,6 @@ void GraphicsLayerChromium::setContentsToMedia(PlatformLayer* layer)
updateSublayerList();
}
-void GraphicsLayerChromium::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
-{
- if (orientation == m_geometryOrientation)
- return;
-
- GraphicsLayer::setGeometryOrientation(orientation);
- updateGeometryOrientation();
-}
-
PlatformLayer* GraphicsLayerChromium::hostLayerForSublayers() const
{
return m_transformLayer ? m_transformLayer.get() : m_layer.get();
@@ -625,21 +616,6 @@ void GraphicsLayerChromium::updateContentsRect()
m_contentsLayer->setBounds(IntSize(m_contentsRect.width(), m_contentsRect.height()));
}
-void GraphicsLayerChromium::updateGeometryOrientation()
-{
- switch (geometryOrientation()) {
- case CompositingCoordinatesTopDown:
- m_layer->setGeometryFlipped(false);
- break;
-
- case CompositingCoordinatesBottomUp:
- m_layer->setGeometryFlipped(true);
- break;
- }
- // Geometry orientation is mapped onto children transform in older QuartzCores,
- // so is handled via setGeometryOrientation().
-}
-
void GraphicsLayerChromium::setupContentsLayer(LayerChromium* contentsLayer)
{
if (contentsLayer == m_contentsLayer)
diff --git a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
index dde443d..214058d 100644
--- a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
+++ b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
@@ -94,8 +94,6 @@ public:
virtual void setDebugBackgroundColor(const Color&);
virtual void setDebugBorder(const Color&, float borderWidth);
- virtual void setGeometryOrientation(CompositingCoordinatesOrientation);
-
void notifySyncRequired()
{
if (m_client)
@@ -125,7 +123,6 @@ private:
void updateContentsImage();
void updateContentsVideo();
void updateContentsRect();
- void updateGeometryOrientation();
void setupContentsLayer(LayerChromium*);
LayerChromium* contentsLayer() const { return m_contentsLayer.get(); }
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.h b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
index a9f747a..6ff3ff0 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.h
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
@@ -112,8 +112,6 @@ public:
virtual void setDebugBackgroundColor(const Color&);
virtual void setDebugBorder(const Color&, float borderWidth);
- virtual void setGeometryOrientation(CompositingCoordinatesOrientation);
-
virtual void didDisplay(PlatformLayer*);
void recursiveCommitChanges();
@@ -259,7 +257,6 @@ private:
void updateContentsMediaLayer();
void updateContentsCanvasLayer();
void updateContentsRect();
- void updateGeometryOrientation();
void updateMaskLayer();
void updateReplicatedLayers();
@@ -304,10 +301,9 @@ private:
ContentsMediaLayerChanged = 1 << 18,
ContentsCanvasLayerChanged = 1 << 19,
ContentsRectChanged = 1 << 20,
- GeometryOrientationChanged = 1 << 21,
- MaskLayerChanged = 1 << 22,
- ReplicatedLayerChanged = 1 << 23,
- ContentsNeedsDisplay = 1 << 24
+ MaskLayerChanged = 1 << 21,
+ ReplicatedLayerChanged = 1 << 22,
+ ContentsNeedsDisplay = 1 << 23
};
typedef unsigned LayerChangeFlags;
void noteLayerPropertyChanged(LayerChangeFlags flags);
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
index 5fedaff..395a691 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
@@ -263,15 +263,6 @@ static String animationIdentifier(AnimatedPropertyID property, const String& key
return builder.toString();
}
-#if !HAVE_MODERN_QUARTZCORE
-static TransformationMatrix flipTransform()
-{
- TransformationMatrix flipper;
- flipper.flipY();
- return flipper;
-}
-#endif
-
static CAMediaTimingFunction* getCAMediaTimingFunction(const TimingFunction* timingFunction)
{
// By this point, timing functions can only be linear or cubic, not steps.
@@ -332,11 +323,6 @@ static bool forceSoftwareAnimation()
return forceSoftwareAnimation;
}
-GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayer::compositingCoordinatesOrientation()
-{
- return CompositingCoordinatesBottomUp;
-}
-
static NSDictionary* nullActionsDictionary()
{
NSNull* nullValue = [NSNull null];
@@ -831,28 +817,6 @@ void GraphicsLayerCA::setContentsToMedia(PlatformLayer* mediaLayer)
noteLayerPropertyChanged(ContentsMediaLayerChanged);
}
-void GraphicsLayerCA::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
-{
- if (orientation == m_geometryOrientation)
- return;
-
- GraphicsLayer::setGeometryOrientation(orientation);
- noteLayerPropertyChanged(GeometryOrientationChanged);
-
-#if !HAVE_MODERN_QUARTZCORE
- // Geometry orientation is mapped onto children transform in older QuartzCores.
- switch (m_geometryOrientation) {
- case CompositingCoordinatesTopDown:
- setChildrenTransform(TransformationMatrix());
- break;
-
- case CompositingCoordinatesBottomUp:
- setChildrenTransform(flipTransform());
- break;
- }
-#endif
-}
-
void GraphicsLayerCA::didDisplay(PlatformLayer* layer)
{
CALayer* sourceLayer;
@@ -984,9 +948,6 @@ void GraphicsLayerCA::commitLayerChangesBeforeSublayers()
if (m_uncommittedChanges & ContentsRectChanged)
updateContentsRect();
- if (m_uncommittedChanges & GeometryOrientationChanged)
- updateGeometryOrientation();
-
if (m_uncommittedChanges & MaskLayerChanged)
updateMaskLayer();
@@ -1461,23 +1422,6 @@ void GraphicsLayerCA::updateContentsRect()
}
}
-void GraphicsLayerCA::updateGeometryOrientation()
-{
-#if HAVE_MODERN_QUARTZCORE
- switch (geometryOrientation()) {
- case CompositingCoordinatesTopDown:
- [m_layer.get() setGeometryFlipped:NO];
- break;
-
- case CompositingCoordinatesBottomUp:
- [m_layer.get() setGeometryFlipped:YES];
- break;
- }
- // Geometry orientation is mapped onto children transform in older QuartzCores,
- // so is handled via setGeometryOrientation().
-#endif
-}
-
void GraphicsLayerCA::updateMaskLayer()
{
CALayer *maskCALayer = m_maskLayer ? m_maskLayer->platformLayer() : 0;
@@ -2226,11 +2170,7 @@ void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer)
[tiledLayer setTileSize:tileSize];
[tiledLayer setLevelsOfDetail:1];
[tiledLayer setLevelsOfDetailBias:0];
-
- if (GraphicsLayer::compositingCoordinatesOrientation() == GraphicsLayer::CompositingCoordinatesBottomUp)
- [tiledLayer setContentsGravity:@"bottomLeft"];
- else
- [tiledLayer setContentsGravity:@"topLeft"];
+ [tiledLayer setContentsGravity:@"bottomLeft"];
#if !HAVE_MODERN_QUARTZCORE
// Tiled layer has issues with flipped coordinates.
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index e164f8c..079d8ba 100644
--- a/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -130,22 +130,21 @@ public:
TransformChange = (1L << 6),
ContentChange = (1L << 7),
- GeometryOrientationChange = (1L << 8),
- ContentsOrientationChange = (1L << 9),
- OpacityChange = (1L << 10),
- ContentsRectChange = (1L << 11),
-
- Preserves3DChange = (1L << 12),
- MasksToBoundsChange = (1L << 13),
- DrawsContentChange = (1L << 14),
- ContentsOpaqueChange = (1L << 15),
-
- BackfaceVisibilityChange = (1L << 16),
- ChildrenTransformChange = (1L << 17),
- DisplayChange = (1L << 18),
- BackgroundColorChange = (1L << 19),
-
- DistributesOpacityChange = (1L << 20)
+ ContentsOrientationChange = (1L << 8),
+ OpacityChange = (1L << 9),
+ ContentsRectChange = (1L << 10),
+
+ Preserves3DChange = (1L << 11),
+ MasksToBoundsChange = (1L << 12),
+ DrawsContentChange = (1L << 13),
+ ContentsOpaqueChange = (1L << 14),
+
+ BackfaceVisibilityChange = (1L << 15),
+ ChildrenTransformChange = (1L << 16),
+ DisplayChange = (1L << 17),
+ BackgroundColorChange = (1L << 18),
+
+ DistributesOpacityChange = (1L << 19)
};
// The compositor lets us special-case images and colors, so we try to do so.
@@ -250,7 +249,6 @@ public:
TransformationMatrix childrenTransform;
Color backgroundColor;
Color currentColor;
- GraphicsLayer::CompositingCoordinatesOrientation geoOrientation;
GraphicsLayer::CompositingCoordinatesOrientation contentsOrientation;
float opacity;
QRect contentsRect;
@@ -777,7 +775,6 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
m_state.anchorPoint = m_layer->anchorPoint();
m_state.size = m_layer->size();
m_state.transform = m_layer->transform();
- m_state.geoOrientation = m_layer->geometryOrientation();
m_state.contentsOrientation =m_layer->contentsOrientation();
m_state.opacity = m_layer->opacity();
m_state.contentsRect = m_layer->contentsRect();
@@ -837,13 +834,6 @@ PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client)
return new GraphicsLayerQt(client);
}
-/* \reimp (GraphicsLayer.h): Qt is top-down
-*/
-GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayer::compositingCoordinatesOrientation()
-{
- return CompositingCoordinatesTopDown;
-}
-
/* \reimp (GraphicsLayer.h): The current size might change, thus we need to update the whole display.
*/
void GraphicsLayerQt::setNeedsDisplay()
@@ -1149,14 +1139,6 @@ void GraphicsLayerQt::setContentsToMedia(PlatformLayer* media)
/* \reimp (GraphicsLayer.h)
*/
-void GraphicsLayerQt::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
-{
- m_impl->notifyChange(GraphicsLayerQtImpl::GeometryOrientationChange);
- GraphicsLayer::setGeometryOrientation(orientation);
-}
-
-/* \reimp (GraphicsLayer.h)
-*/
void GraphicsLayerQt::setContentsOrientation(CompositingCoordinatesOrientation orientation)
{
m_impl->notifyChange(GraphicsLayerQtImpl::ContentsOrientationChange);
diff --git a/WebCore/platform/graphics/qt/GraphicsLayerQt.h b/WebCore/platform/graphics/qt/GraphicsLayerQt.h
index 4282e64..75ca498 100644
--- a/WebCore/platform/graphics/qt/GraphicsLayerQt.h
+++ b/WebCore/platform/graphics/qt/GraphicsLayerQt.h
@@ -81,7 +81,6 @@ public:
virtual void setContentsToGraphicsContext3D(const GraphicsContext3D*);
virtual void setGraphicsContext3DNeedsDisplay();
#endif
- virtual void setGeometryOrientation(CompositingCoordinatesOrientation orientation);
virtual void setContentsOrientation(CompositingCoordinatesOrientation orientation);
virtual void distributeOpacity(float);
virtual float accumulatedOpacity() const;
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
index 96ac0c1..e2a3e1d 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
@@ -121,11 +121,6 @@ static void clearLayerBackgroundColor(WKCACFLayer* layer)
layer->setBackgroundColor(0);
}
-GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayer::compositingCoordinatesOrientation()
-{
- return CompositingCoordinatesBottomUp;
-}
-
PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client)
{
return new GraphicsLayerCACF(client);
@@ -395,15 +390,6 @@ void GraphicsLayerCACF::setContentsToMedia(PlatformLayer* mediaLayer)
updateSublayerList();
}
-void GraphicsLayerCACF::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
-{
- if (orientation == m_geometryOrientation)
- return;
-
- GraphicsLayer::setGeometryOrientation(orientation);
- updateGeometryOrientation();
-}
-
PlatformLayer* GraphicsLayerCACF::hostLayerForSublayers() const
{
return m_transformLayer ? m_transformLayer.get() : m_layer.get();
@@ -462,12 +448,13 @@ void GraphicsLayerCACF::swapFromOrToTiledLayer(bool useTiledLayer)
m_usingTiledLayer = useTiledLayer;
- if (useTiledLayer) {
- if (GraphicsLayer::compositingCoordinatesOrientation() == GraphicsLayer::CompositingCoordinatesBottomUp)
- m_layer->setContentsGravity(WKCACFLayer::BottomLeft);
- else
- m_layer->setContentsGravity(WKCACFLayer::TopLeft);
- }
+ // FIXME: need this?
+// if (useTiledLayer) {
+// if (GraphicsLayer::compositingCoordinatesOrientation() == GraphicsLayer::CompositingCoordinatesBottomUp)
+// m_layer->setContentsGravity(WKCACFLayer::BottomLeft);
+// else
+// m_layer->setContentsGravity(WKCACFLayer::TopLeft);
+// }
m_layer->adoptSublayers(oldLayer.get());
if (oldLayer->superlayer())
@@ -738,21 +725,6 @@ void GraphicsLayerCACF::updateContentsRect()
m_contentsLayer->setBounds(rect);
}
-void GraphicsLayerCACF::updateGeometryOrientation()
-{
- switch (geometryOrientation()) {
- case CompositingCoordinatesTopDown:
- m_layer->setGeometryFlipped(false);
- break;
-
- case CompositingCoordinatesBottomUp:
- m_layer->setGeometryFlipped(true);
- break;
- }
- // Geometry orientation is mapped onto children transform in older QuartzCores,
- // so is handled via setGeometryOrientation().
-}
-
void GraphicsLayerCACF::setupContentsLayer(WKCACFLayer* contentsLayer)
{
if (contentsLayer == m_contentsLayer)
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.h b/WebCore/platform/graphics/win/GraphicsLayerCACF.h
index 0b74266..c18a6e9 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.h
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.h
@@ -89,8 +89,6 @@ public:
virtual void setDebugBackgroundColor(const Color&);
virtual void setDebugBorder(const Color&, float borderWidth);
- virtual void setGeometryOrientation(CompositingCoordinatesOrientation);
-
private:
void updateOpacityOnLayer();
@@ -118,7 +116,6 @@ private:
void updateContentsImage();
void updateContentsMedia();
void updateContentsRect();
- void updateGeometryOrientation();
void setupContentsLayer(WKCACFLayer*);
WKCACFLayer* contentsLayer() const { return m_contentsLayer.get(); }
diff --git a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
index 630a8af..38d524e 100644
--- a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
+++ b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
@@ -327,6 +327,7 @@ void WKCACFLayerRenderer::setRootChildLayer(WKCACFLayer* layer)
m_scrollLayer->removeAllSublayers();
m_rootChildLayer = layer;
if (layer) {
+ layer->setGeometryFlipped(true);
m_scrollLayer->addSublayer(layer);
// Adjust the scroll frame accordingly
updateScrollFrame();
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index 859b394..4bebb08 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -1343,10 +1343,6 @@ void RenderLayerCompositor::ensureRootPlatformLayer()
}
}
- // The root layer does geometry flipping if we need it.
- m_rootPlatformLayer->setGeometryOrientation(expectedAttachment == RootLayerAttachedViaEnclosingIframe
- ? GraphicsLayer::CompositingCoordinatesTopDown : GraphicsLayer::compositingCoordinatesOrientation());
-
// Check to see if we have to change the attachment
if (m_rootLayerAttachment != RootLayerUnattached)
detachRootPlatformLayer();
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 0f26019..5403f24 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-15 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44715
+ maps.google.com flips upside down when zooming map using trackpad in WebKit2 on Mac
+
+ Move geometry flipping to platform-specific code.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView attachRootLayer:]):
+
2010-09-14 Jia Pu <jpu at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index b392318..75c16ba 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -5564,7 +5564,11 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
[[NSNotificationCenter defaultCenter] postNotificationName:_WebViewDidStartAcceleratedCompositingNotification object:[self _webView] userInfo:nil];
#if defined(BUILDING_ON_LEOPARD)
+ [viewLayer setSublayerTransform:CATransform3DMakeScale(1, -1, 1)]; // setGeometryFlipped: doesn't exist on Leopard.
[self _updateLayerHostingViewPosition];
+#else
+ // Do geometry flipping here, which flips all the compositing layers so they are top-down.
+ [viewLayer setGeometryFlipped:YES];
#endif
}
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 3ab63f4..cf2cc52 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-15 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44715
+ maps.google.com flips upside down when zooming map using trackpad in WebKit2 on Mac
+
+ Move geometry flipping to platform-specific code.
+
+ * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
+ (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
+ * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
+ (WebKit::LayerBackedDrawingArea::platformInit):
+
2010-09-14 Jia Pu <jpu at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
index 5c319e7..933b2ca 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
@@ -55,9 +55,6 @@ LayerBackedDrawingArea::LayerBackedDrawingArea(DrawingAreaID identifier, WebPage
#endif
m_backingLayer->syncCompositingStateForThisLayerOnly();
- // Do geometry flipping on this layer.
- m_backingLayer->setGeometryOrientation(GraphicsLayer::CompositingCoordinatesBottomUp);
-
platformInit();
}
diff --git a/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm b/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm
index 0c644f4..b271a13 100644
--- a/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm
+++ b/WebKit2/WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm
@@ -42,6 +42,7 @@ namespace WebKit {
void LayerBackedDrawingArea::platformInit()
{
+ [m_backingLayer->platformLayer() setGeometryFlipped:YES];
#if HAVE(HOSTED_CORE_ANIMATION)
attachCompositingContext();
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list