Changeset 207259 in webkit


Ignore:
Timestamp:
Oct 12, 2016 4:02:19 PM (8 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r205197. rdar://problem/28481424

Location:
branches/safari-602.2.14.0-branch
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-602.2.14.0-branch/Source/WebCore/ChangeLog

    r207258 r207259  
     12016-10-12  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r205197. rdar://problem/28481424
     4
     5    2016-08-30  Brent Fulgham  <bfulgham@apple.com>
     6
     7            Use of uninitialised memory in TransformationMatrx::blend4()
     8            https://bugs.webkit.org/show_bug.cgi?id=134621
     9            <rdar://problem/27337539>
     10
     11            Reviewed by Dean Jackson.
     12
     13            Change is based on the Blink change (patch by <alancutter@chromium.org>):
     14            <https://src.chromium.org/viewvc/blink?revision=177453&view=revision>
     15
     16            TransformationMatrix::blend() was attempting to blend between non-invertable
     17            matricies. This resulted in garbage stack variables being used.
     18            This patch ensures that blend() will fall back to a 50% step interpolation
     19            when one of the sides are not invertable.
     20
     21            Tested by new TransformationMatrix test in TestWebKitAPI.
     22
     23            * platform/graphics/transforms/TransformationMatrix.cpp:
     24            (WebCore::TransformationMatrix::blend2): Properly handle failure in the
     25            decompose method calls.
     26            (WebCore::TransformationMatrix::blend4): Ditto.
     27
    1282016-10-12  Matthew Hanson  <matthew_hanson@apple.com>
    229
  • branches/safari-602.2.14.0-branch/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp

    r202195 r207259  
    15021502    Decomposed2Type fromDecomp;
    15031503    Decomposed2Type toDecomp;
    1504     from.decompose2(fromDecomp);
    1505     decompose2(toDecomp);
     1504    if (!from.decompose2(fromDecomp) || !decompose2(toDecomp)) {
     1505        if (progress < 0.5)
     1506            *this = from;
     1507        return;
     1508    }
    15061509
    15071510    // If x-axis of one is flipped, and y-axis of the other, convert to an unflipped rotation.
     
    15421545    Decomposed4Type fromDecomp;
    15431546    Decomposed4Type toDecomp;
    1544     from.decompose4(fromDecomp);
    1545     decompose4(toDecomp);
     1547    if (!from.decompose4(fromDecomp) || !decompose4(toDecomp)) {
     1548        if (progress < 0.5)
     1549            *this = from;
     1550        return;
     1551    }
    15461552
    15471553    blendFloat(fromDecomp.scaleX, toDecomp.scaleX, progress);
  • branches/safari-602.2.14.0-branch/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h

    r202195 r207259  
    295295    void recompose4(const Decomposed4Type&);
    296296
    297     void blend(const TransformationMatrix& from, double progress);
     297    WEBCORE_EXPORT void blend(const TransformationMatrix& from, double progress);
    298298    void blend2(const TransformationMatrix& from, double progress);
    299299    void blend4(const TransformationMatrix& from, double progress);
  • branches/safari-602.2.14.0-branch/Tools/ChangeLog

    r206569 r207259  
     12016-10-12  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r205197. rdar://problem/28481424
     4
     5    2016-08-30  Brent Fulgham  <bfulgham@apple.com>
     6
     7            Use of uninitialised memory in TransformationMatrx::blend4()
     8            https://bugs.webkit.org/show_bug.cgi?id=134621
     9            <rdar://problem/27337539>
     10
     11            Reviewed by Dean Jackson.
     12
     13            Change is based on the Blink change (patch by <alancutter@chromium.org>):
     14            <https://src.chromium.org/viewvc/blink?revision=177453&view=revision>
     15
     16            * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     17            * TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp: Added.
     18            (TestWebKitAPI::TEST):
     19
    1202016-09-28  Babak Shafiei  <bshafiei@apple.com>
    221
  • branches/safari-602.2.14.0-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r206569 r207259  
    148148                76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 76E182DE15475A8300F1FADD /* auto-submitting-form.html */; };
    149149                7A1458FC1AD5C07000E06772 /* mouse-button-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */; };
     150                7AD3FE8E1D76131200B169A4 /* TransformationMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AD3FE8D1D75FB8D00B169A4 /* TransformationMatrix.cpp */; };
    150151                7AE9E5091AE5AE8B00CF874B /* test.pdf in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7AE9E5081AE5AE8B00CF874B /* test.pdf */; };
    151152                7C3965061CDD74F90094DBB8 /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3965051CDD74F90094DBB8 /* Color.cpp */; };
     
    903904                7AA021BA1AB09EA70052953F /* DateMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateMath.cpp; sourceTree = "<group>"; };
    904905                7AA6A1511AAC0B31002B2ED3 /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = "<group>"; };
     906                7AD3FE8D1D75FB8D00B169A4 /* TransformationMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformationMatrix.cpp; sourceTree = "<group>"; };
    905907                7AE9E5081AE5AE8B00CF874B /* test.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = test.pdf; sourceTree = "<group>"; };
    906908                7C3965051CDD74F90094DBB8 /* Color.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Color.cpp; sourceTree = "<group>"; };
     
    13761378                                41973B5C1AF22875006C7B36 /* SharedBuffer.cpp */,
    13771379                                CDC2C7141797089D00E627FB /* TimeRanges.cpp */,
     1380                                7AD3FE8D1D75FB8D00B169A4 /* TransformationMatrix.cpp */,
    13781381                                440A1D3814A0103A008A66F2 /* URL.cpp */,
    13791382                                7C3965051CDD74F90094DBB8 /* Color.cpp */,
     
    24312434                        files = (
    24322435                                2E7765CD16C4D80A00BA2BB1 /* mainIOS.mm in Sources */,
     2436                                7AD3FE8E1D76131200B169A4 /* TransformationMatrix.cpp in Sources */,
    24332437                                2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */,
    24342438                        );
Note: See TracChangeset for help on using the changeset viewer.