Changeset 180142 in webkit for trunk/Source/WebCore/ChangeLog
- Timestamp:
- Feb 16, 2015, 4:00:17 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/Source/WebCore/ChangeLog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r180141 r180142 1 2015-02-13 Sergio Villar Senin <svillar@igalia.com> 2 3 [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items 4 https://bugs.webkit.org/show_bug.cgi?id=140763 5 6 Reviewed by Antti Koivisto. 7 8 Content sized tracks with non-spanning grid items were not 9 properly sized because the growth limit was sometimes infinity 10 (-1) after calling resolveContentBasedTrackSizingFunctions() when 11 it should not. This patch adds an special initialization phase for 12 non-spanning grid items as the new track sizing algorithm 13 describes. 14 15 Granted, that was handled in the old algorithm in 16 distributeSpaceToTracks() as a special case. The problem is that 17 it regressed after the optimization added in r173868 because that 18 method is no longer called when the space to distribute is 0. 19 20 That's why we could fix this by allowing calls to 21 distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing 22 it with an explicit initialization our implementation becomes 23 closer to the new algorithm and the initialization is now explicit 24 in the code instead of a side effect of calling 25 distributeSpaceToTracks() with no space to be distributed. It also 26 brings a slight performance improvement as we save sorts and hash 27 lookups. 28 29 I also took the change to add caching to several GridTrackSize 30 methods that were hot on the profiler (each one accounted for ~1% 31 of the total time, now they account for ~0.3% each). 32 33 Test: fast/css-grid-layout/grid-initialize-span-one-items.html 34 35 * rendering/RenderGrid.cpp: 36 (WebCore::GridItemWithSpan::span): New helper method for ASSERTs. 37 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions): 38 Exclude non spanning grid items from the calls to 39 resolveContentBasedTrackSizingFunctionsForItems(). 40 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems): 41 New method to resolve track sizes only using non-spanning grid 42 items. 43 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems): 44 Ensure that it isn't called for non-spanning grid items. 45 * rendering/RenderGrid.h: 46 * rendering/style/GridTrackSize.h: 47 (WebCore::GridTrackSize::GridTrackSize): Cache return values. 48 (WebCore::GridTrackSize::setLength): Ditto. 49 (WebCore::GridTrackSize::setMinMax): Ditto. 50 (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method 51 that caches the return values for hasXXXTrackBreadth() methods. 52 (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use 53 the cached return value. 54 (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto. 55 (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto. 56 (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto. 57 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto. 58 (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto. 59 (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth): 60 Ditto. 61 (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth): 62 Ditto. 63 1 64 2015-02-16 Milan Crha <mcrha@redhat.com> 2 65
Note:
See TracChangeset
for help on using the changeset viewer.