Changeset 210320 in webkit
- Timestamp:
- Jan 4, 2017 11:03:09 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r210315 r210320 1 2017-01-04 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Fix crash clamping grid lines 4 https://bugs.webkit.org/show_bug.cgi?id=166637 5 6 Reviewed by Darin Adler. 7 8 * fast/css-grid-layout/grid-position-crash-expected.txt: Added. 9 * fast/css-grid-layout/grid-position-crash.html: Added. 10 1 11 2017-01-04 Myles C. Maxfield <mmaxfield@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r210319 r210320 1 2017-01-04 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Fix crash clamping grid lines 4 https://bugs.webkit.org/show_bug.cgi?id=166637 5 6 Reviewed by Darin Adler. 7 8 Avoid issues with very big values for the grid lines clamping them on GridPosition. 9 10 Test: fast/css-grid-layout/grid-position-crash.html 11 12 * rendering/style/GridArea.h: Move kGridMaxTracks definition to GridPosition. 13 * rendering/style/GridPosition.h: 14 (WebCore::GridPosition::setExplicitPosition): Use new setIntegerPosition(). 15 (WebCore::GridPosition::setSpanPosition): Ditto. 16 (WebCore::GridPosition::setIntegerPosition): Clamp the position using kGridMaxTracks. 17 1 18 2017-01-04 Darin Adler <darin@apple.com> 2 19 -
trunk/Source/WebCore/rendering/style/GridArea.h
r208668 r210320 40 40 namespace WebCore { 41 41 42 // Recommended maximum size for both explicit and implicit grids.43 const int kGridMaxTracks = 1000000;44 45 42 // A span in a single direction (either rows or columns). Note that |startLine| 46 43 // and |endLine| are grid lines' indexes. -
trunk/Source/WebCore/rendering/style/GridPosition.h
r208668 r210320 38 38 namespace WebCore { 39 39 40 // Recommended maximum size for both explicit and implicit grids. 41 const int kGridMaxTracks = 1000000; 42 40 43 enum GridPositionType { 41 44 AutoPosition, … … 70 73 { 71 74 m_type = ExplicitPosition; 72 m_integerPosition = position;75 setIntegerPosition(position); 73 76 m_namedGridLine = namedGridLine; 74 77 } … … 86 89 { 87 90 m_type = SpanPosition; 88 m_integerPosition = position;91 setIntegerPosition(position); 89 92 m_namedGridLine = namedGridLine; 90 93 } … … 123 126 return isAuto() || isSpan(); 124 127 } 128 125 129 private: 130 void setIntegerPosition(int integerPosition) 131 { 132 m_integerPosition = clampTo(integerPosition, -kGridMaxTracks, kGridMaxTracks); 133 } 134 126 135 GridPositionType m_type; 127 136 int m_integerPosition; -
trunk/Tools/ChangeLog
r210318 r210320 1 2017-01-04 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Fix crash clamping grid lines 4 https://bugs.webkit.org/show_bug.cgi?id=166637 5 6 Reviewed by Darin Adler. 7 8 Creates new unit test to verify that the maximum tracks limit 9 is used in GridPosition too. 10 11 * TestWebKitAPI/PlatformEfl.cmake: 12 * TestWebKitAPI/PlatformGTK.cmake: 13 * TestWebKitAPI/PlatformWin.cmake: 14 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 15 * TestWebKitAPI/Tests/WebCore/GridPosition.cpp: Added. 16 (TestWebKitAPI::TEST): 17 1 18 2017-01-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 19 -
trunk/Tools/TestWebKitAPI/PlatformEfl.cmake
r209665 r210320 58 58 set(test_webcore_BINARIES 59 59 CSSParser 60 GridPosition 60 61 HTMLParserIdioms 61 62 LayoutUnit -
trunk/Tools/TestWebKitAPI/PlatformGTK.cmake
r210310 r210320 133 133 ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp 134 134 ${TESTWEBKITAPI_DIR}/Tests/WebCore/FileSystem.cpp 135 ${TESTWEBKITAPI_DIR}/Tests/WebCore/GridPosition.cpp 135 136 ${TESTWEBKITAPI_DIR}/Tests/WebCore/HTMLParserIdioms.cpp 136 137 ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp -
trunk/Tools/TestWebKitAPI/PlatformWin.cmake
r210310 r210320 51 51 ${TESTWEBKITAPI_DIR}/Tests/WebCore/FloatPoint.cpp 52 52 ${TESTWEBKITAPI_DIR}/Tests/WebCore/FloatSize.cpp 53 ${TESTWEBKITAPI_DIR}/Tests/WebCore/GridPosition.cpp 53 54 ${TESTWEBKITAPI_DIR}/Tests/WebCore/HTMLParserIdioms.cpp 54 55 ${TESTWEBKITAPI_DIR}/Tests/WebCore/IntRect.cpp -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r210310 r210320 431 431 837A35F11D9A1E7D00663C57 /* DownloadRequestBlobURL.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 837A35F01D9A1E6400663C57 /* DownloadRequestBlobURL.html */; }; 432 432 83CF1C301C4F1B8B00688447 /* StringUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83CF1C2C1C4F19AE00688447 /* StringUtilities.mm */; }; 433 8E4A85371E1D1AB200F53B0F /* GridPosition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8E4A85361E1D1AA100F53B0F /* GridPosition.cpp */; }; 433 434 930AD402150698D00067970F /* lots-of-text.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 930AD401150698B30067970F /* lots-of-text.html */; }; 434 435 9329AA291DE3F81E003ABD07 /* TextBreakIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9329AA281DE3F81E003ABD07 /* TextBreakIterator.cpp */; }; … … 1087 1088 8AA28C1916D2FA7B002FF4DB /* LoadPageOnCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadPageOnCrash.cpp; sourceTree = "<group>"; }; 1088 1089 8DD76FA10486AA7600D96B5E /* TestWebKitAPI */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestWebKitAPI; sourceTree = BUILT_PRODUCTS_DIR; }; 1090 8E4A85361E1D1AA100F53B0F /* GridPosition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GridPosition.cpp; sourceTree = "<group>"; }; 1089 1091 930AD401150698B30067970F /* lots-of-text.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "lots-of-text.html"; sourceTree = "<group>"; }; 1090 1092 9329AA281DE3F81E003ABD07 /* TextBreakIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextBreakIterator.cpp; sourceTree = "<group>"; }; … … 1543 1545 isa = PBXGroup; 1544 1546 children = ( 1547 8E4A85361E1D1AA100F53B0F /* GridPosition.cpp */, 1545 1548 CD89D0371C4EDB1300040A04 /* cocoa */, 1546 1549 7A909A6F1D877475007E10F8 /* AffineTransform.cpp */, … … 2619 2622 7CCE7F0F1A411AE600447C4C /* ResizeWindowAfterCrash.cpp in Sources */, 2620 2623 7CCE7F101A411AE600447C4C /* ResponsivenessTimerDoesntFireEarly.cpp in Sources */, 2624 8E4A85371E1D1AB200F53B0F /* GridPosition.cpp in Sources */, 2621 2625 7CCE7F111A411AE600447C4C /* RestoreSessionStateContainingFormData.cpp in Sources */, 2622 2626 7A909A811D877480007E10F8 /* IntPoint.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.