From: commit-queue@webkit.org Date: Fri, 8 Feb 2013 13:35:09 +0000 (+0000) Subject: [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changin... X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=37b46ae9866617000da044a5b83c20674e5cf393 [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position. https://bugs.webkit.org/show_bug.cgi?id=109226 Patch by ChangSeok Oh on 2013-02-08 Reviewed by Gustavo Noronha Silva. Clutter has a different coordinate system from mac port's, so we don't need to recalulate GraphicsLayer position after changing its anchor position. Covered by existing ac tests. * platform/graphics/clutter/GraphicsLayerClutter.cpp: (WebCore::GraphicsLayerClutter::updateGeometry): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142265 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index e1b2c7fef171..76d046891069 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2013-02-08 ChangSeok Oh + + [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position. + https://bugs.webkit.org/show_bug.cgi?id=109226 + + Reviewed by Gustavo Noronha Silva. + + Clutter has a different coordinate system from mac port's, so we don't need to + recalulate GraphicsLayer position after changing its anchor position. + + Covered by existing ac tests. + + * platform/graphics/clutter/GraphicsLayerClutter.cpp: + (WebCore::GraphicsLayerClutter::updateGeometry): + 2013-02-08 Mike West Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION. diff --git a/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp b/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp index 3c9a0c28362a..d79918723edb 100644 --- a/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp +++ b/Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp @@ -494,21 +494,10 @@ void GraphicsLayerClutter::commitLayerChangesBeforeSublayers(float pageScaleFact void GraphicsLayerClutter::updateGeometry(float pageScaleFactor, const FloatPoint& positionRelativeToBase) { - FloatPoint scaledPosition; - FloatPoint3D scaledAnchorPoint; - FloatSize scaledSize; - - // FIXME: Need to support scaling - scaledPosition = m_position; - scaledAnchorPoint = m_anchorPoint; - scaledSize = m_size; - - FloatRect adjustedBounds(m_boundsOrigin , scaledSize); - FloatPoint adjustedPosition(scaledPosition.x() + scaledAnchorPoint.x() * scaledSize.width(), scaledPosition.y() + scaledAnchorPoint.y() * scaledSize.height()); - - clutter_actor_set_size(CLUTTER_ACTOR(m_layer.get()), adjustedBounds.width(), adjustedBounds.height()); - clutter_actor_set_position(CLUTTER_ACTOR(m_layer.get()), adjustedPosition.x(), adjustedPosition.y()); - graphicsLayerActorSetAnchorPoint(m_layer.get(), scaledAnchorPoint.x(), scaledAnchorPoint.y(), scaledAnchorPoint.z()); + // FIXME: Need to support page scaling. + clutter_actor_set_position(CLUTTER_ACTOR(m_layer.get()), m_position.x(), m_position.y()); + clutter_actor_set_size(CLUTTER_ACTOR(m_layer.get()), m_size.width(), m_size.height()); + graphicsLayerActorSetAnchorPoint(m_layer.get(), m_anchorPoint.x(), m_anchorPoint.y(), m_anchorPoint.z()); } // Each GraphicsLayer has the corresponding layer in the platform port.