Changeset 55334 in webkit
- Timestamp:
- Feb 26, 2010 6:59:56 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55332 r55334 1 2010-02-26 Noam Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] GraphicsLayerQt: artifacts and wrong transformOrigin 6 This was due to wrong way of applying cache-mode and transformation 7 on a graphics-item with HTML. Cache-mode should be updated 8 when the content type updates, even if it was the same cache-mode 9 10 https://bugs.webkit.org/show_bug.cgi?id=35382 11 12 Test URL attached to the bug now works correctly. 13 14 * platform/graphics/qt/GraphicsLayerQt.cpp: 15 (WebCore::GraphicsLayerQtImpl::computeTransform): 16 (WebCore::GraphicsLayerQtImpl::flushChanges): 17 1 18 2010-02-26 Luiz Agostini <luiz.agostini@openbossa.org> 2 19 -
trunk/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
r55132 r55334 309 309 // attribute that call setChildrenTransform 310 310 QPointF offset = -pos() - boundingRect().bottomRight() / 2; 311 const GraphicsLayerQtImpl* ancestor = this; 312 while ((ancestor = qobject_cast<GraphicsLayerQtImpl*>(ancestor->parentObject()))) {311 312 for (const GraphicsLayerQtImpl* ancestor = this; (ancestor = qobject_cast<GraphicsLayerQtImpl*>(ancestor->parentObject())); ) { 313 313 if (!ancestor->m_state.childrenTransform.isIdentity()) { 314 offset += ancestor->boundingRect().bottomRight() / 2;314 const QPointF offset = mapFromItem(ancestor, QPointF(ancestor->m_size.width() / 2, ancestor->m_size.height() / 2)); 315 315 computedTransform 316 316 .translate(offset.x(), offset.y()) … … 319 319 break; 320 320 } 321 offset -= ancestor->pos(); 322 } 323 324 computedTransform.multLeft(baseTransform); 321 } 325 322 326 323 // webkit has relative-to-size originPoint, graphics-view has a pixel originPoint, here we convert … … 328 325 const qreal originX = m_state.anchorPoint.x() * m_size.width(); 329 326 const qreal originY = m_state.anchorPoint.y() * m_size.height(); 330 computedTransform = TransformationMatrix()331 .translate(originX, originY)332 .multiply(computedTransform)333 .translate(-originX, -originY);327 computedTransform 328 .translate3d(originX, originY, m_state.anchorPoint.z()) 329 .multLeft(baseTransform) 330 .translate3d(-originX, -originY, -m_state.anchorPoint.z()); 334 331 335 332 // now we project to 2D … … 512 509 update(); 513 510 if (m_layer->drawsContent() && !m_maskEffect) { 514 const QGraphicsItem::CacheMode mewCacheMode = isTransformAnimationRunning() ? ItemCoordinateCache : DeviceCoordinateCache; 515 516 // optimization: QGraphicsItem doesn't always perform this test 517 if (mewCacheMode != cacheMode()) 518 setCacheMode(mewCacheMode); 511 setCacheMode(isTransformAnimationRunning() ? ItemCoordinateCache : DeviceCoordinateCache); 519 512 520 513 // HTML content: we want to use exposedRect so we don't use WebCore rendering if we don't have to
Note: See TracChangeset
for help on using the changeset viewer.