Changeset 56321 in webkit


Ignore:
Timestamp:
Mar 21, 2010 3:52:56 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-21 Kim Grönholm <kim.gronholm@nomovok.com>

Reviewed by Simon Hausmann.

[Qt] GraphicsLayer: matrix interpolations in transform-animations don't behave correctly
https://bugs.webkit.org/show_bug.cgi?id=35520

The case where the list of source and target transform operations are
not the same but have the same size needs to be special-cased in
GraphicsLayerQt, as well as the case where the source or target
operation list is empty. The URLs listed here render correctly after
applying the patch.

Tests: https://bug-35520-attachments.webkit.org/attachment.cgi?id=49890

https://bug-35520-attachments.webkit.org/attachment.cgi?id=49889

  • platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::TransformAnimationQt::applyFrame):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r56319 r56321  
     12010-03-21  Kim Grönholm  <kim.gronholm@nomovok.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] GraphicsLayer: matrix interpolations in transform-animations don't behave correctly
     6        https://bugs.webkit.org/show_bug.cgi?id=35520
     7       
     8        The case where the list of source and target transform operations are
     9        not the same but have the same size needs to be special-cased in
     10        GraphicsLayerQt, as well as the case where the source or target
     11        operation list is empty. The URLs listed here render correctly after
     12        applying the patch.
     13
     14        Tests: https://bug-35520-attachments.webkit.org/attachment.cgi?id=49890
     15               https://bug-35520-attachments.webkit.org/attachment.cgi?id=49889
     16           
     17
     18        * platform/graphics/qt/GraphicsLayerQt.cpp:
     19        (WebCore::TransformAnimationQt::applyFrame):
     20
    1212010-03-21  Dmitry Gorbik  <socket.h@gmail.com>
    222
  • trunk/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp

    r56163 r56321  
    11341134            transformMatrix = m_sourceMatrix;
    11351135            transformMatrix.blend(sourceMatrix, 1 - progress);
    1136         } else if (targetOperations.size() != sourceOperations.size()) {
    1137             transformMatrix = m_sourceMatrix;
    1138             targetOperations.apply(m_boxSize, transformMatrix);
    1139             transformMatrix.blend(m_sourceMatrix, progress);
    11401136        } else {
    1141             for (size_t i = 0; i < targetOperations.size(); ++i)
    1142                 targetOperations.operations()[i]->blend(sourceOperations.at(i), progress)->apply(transformMatrix, m_boxSize);
     1137            bool validTransformLists = true;
     1138            const int sourceOperationCount = sourceOperations.size();
     1139            if (sourceOperationCount) {
     1140                if (targetOperations.size() != sourceOperationCount)
     1141                    validTransformLists = false;
     1142                else
     1143                    for (size_t j = 0; j < sourceOperationCount && validTransformLists; ++j)
     1144                        if (!sourceOperations.operations()[j]->isSameType(*targetOperations.operations()[j]))
     1145                            validTransformLists = false;
     1146            }
     1147
     1148            if (validTransformLists) {
     1149                for (size_t i = 0; i < targetOperations.size(); ++i)
     1150                    targetOperations.operations()[i]->blend(sourceOperations.at(i), progress)->apply(transformMatrix, m_boxSize);
     1151            } else {
     1152                targetOperations.apply(m_boxSize, transformMatrix);
     1153                transformMatrix.blend(m_sourceMatrix, progress);
     1154            }
    11431155        }
    11441156        m_layer.data()->setBaseTransform(transformMatrix);
Note: See TracChangeset for help on using the changeset viewer.