Changeset 205197 in webkit
- Timestamp:
- Aug 30, 2016 12:54:37 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r205194 r205197 1 2016-08-30 Brent Fulgham <bfulgham@apple.com> 2 3 Use of uninitialised memory in TransformationMatrx::blend4() 4 https://bugs.webkit.org/show_bug.cgi?id=134621 5 <rdar://problem/27337539> 6 7 Reviewed by Dean Jackson. 8 9 Change is based on the Blink change (patch by <alancutter@chromium.org>): 10 <https://src.chromium.org/viewvc/blink?revision=177453&view=revision> 11 12 TransformationMatrix::blend() was attempting to blend between non-invertable 13 matricies. This resulted in garbage stack variables being used. 14 This patch ensures that blend() will fall back to a 50% step interpolation 15 when one of the sides are not invertable. 16 17 Tested by new TransformationMatrix test in TestWebKitAPI. 18 19 * platform/graphics/transforms/TransformationMatrix.cpp: 20 (WebCore::TransformationMatrix::blend2): Properly handle failure in the 21 decompose method calls. 22 (WebCore::TransformationMatrix::blend4): Ditto. 23 1 24 2016-08-30 Alex Christensen <achristensen@webkit.org> 2 25 -
trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
r202195 r205197 1502 1502 Decomposed2Type fromDecomp; 1503 1503 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 } 1506 1509 1507 1510 // If x-axis of one is flipped, and y-axis of the other, convert to an unflipped rotation. … … 1542 1545 Decomposed4Type fromDecomp; 1543 1546 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 } 1546 1552 1547 1553 blendFloat(fromDecomp.scaleX, toDecomp.scaleX, progress); -
trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
r202195 r205197 295 295 void recompose4(const Decomposed4Type&); 296 296 297 void blend(const TransformationMatrix& from, double progress);297 WEBCORE_EXPORT void blend(const TransformationMatrix& from, double progress); 298 298 void blend2(const TransformationMatrix& from, double progress); 299 299 void blend4(const TransformationMatrix& from, double progress); -
trunk/Tools/ChangeLog
r205194 r205197 1 2016-08-30 Brent Fulgham <bfulgham@apple.com> 2 3 Use of uninitialised memory in TransformationMatrx::blend4() 4 https://bugs.webkit.org/show_bug.cgi?id=134621 5 <rdar://problem/27337539> 6 7 Reviewed by Dean Jackson. 8 9 Change is based on the Blink change (patch by <alancutter@chromium.org>): 10 <https://src.chromium.org/viewvc/blink?revision=177453&view=revision> 11 12 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 13 * TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp: Added. 14 (TestWebKitAPI::TEST): 15 1 16 2016-08-30 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r204916 r205197 139 139 76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 76E182DE15475A8300F1FADD /* auto-submitting-form.html */; }; 140 140 7A1458FC1AD5C07000E06772 /* mouse-button-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */; }; 141 7AD3FE8E1D76131200B169A4 /* TransformationMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AD3FE8D1D75FB8D00B169A4 /* TransformationMatrix.cpp */; }; 141 142 7AE9E5091AE5AE8B00CF874B /* test.pdf in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7AE9E5081AE5AE8B00CF874B /* test.pdf */; }; 142 143 7C3965061CDD74F90094DBB8 /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C3965051CDD74F90094DBB8 /* Color.cpp */; }; … … 869 870 7AA021BA1AB09EA70052953F /* DateMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateMath.cpp; sourceTree = "<group>"; }; 870 871 7AA6A1511AAC0B31002B2ED3 /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = "<group>"; }; 872 7AD3FE8D1D75FB8D00B169A4 /* TransformationMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformationMatrix.cpp; sourceTree = "<group>"; }; 871 873 7AE9E5081AE5AE8B00CF874B /* test.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = test.pdf; sourceTree = "<group>"; }; 872 874 7C3965051CDD74F90094DBB8 /* Color.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Color.cpp; sourceTree = "<group>"; }; … … 1343 1345 41973B5C1AF22875006C7B36 /* SharedBuffer.cpp */, 1344 1346 CDC2C7141797089D00E627FB /* TimeRanges.cpp */, 1347 7AD3FE8D1D75FB8D00B169A4 /* TransformationMatrix.cpp */, 1345 1348 440A1D3814A0103A008A66F2 /* URL.cpp */, 1346 1349 5C6E65411D5CEF8500F7862E /* URLParser.cpp */, … … 2389 2392 files = ( 2390 2393 2E7765CD16C4D80A00BA2BB1 /* mainIOS.mm in Sources */, 2394 7AD3FE8E1D76131200B169A4 /* TransformationMatrix.cpp in Sources */, 2391 2395 2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */, 2392 2396 );
Note: See TracChangeset
for help on using the changeset viewer.