summaryrefslogtreecommitdiffstats
path: root/components/components.gyp
diff options
context:
space:
mode:
authorrego <rego@igalia.com>2016-01-05 04:55:40 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-05 12:56:35 +0000
commit7433487e4082c928a06ddff51fe5c963a28da3ef (patch)
treebb4001bfb2e2fdbfa4c3555d37eccbe796de7100 /components/components.gyp
parent9b3ee6ba7af3e71fcfe0472e1698a9f76a10d6a4 (diff)
downloadchromium_src-7433487e4082c928a06ddff51fe5c963a28da3ef.zip
chromium_src-7433487e4082c928a06ddff51fe5c963a28da3ef.tar.gz
chromium_src-7433487e4082c928a06ddff51fe5c963a28da3ef.tar.bz2
[css-grid] Initial support for implicit grid before explicit grid
Change GridSpan to store int instead of size_t. This allows us to resolve positions before the explicit grid with negative values. This patch adds a new type of GridSpan called "Untranslated". This type is only used in populateExplicitGridAndOrderIterator(). Where we store the smallest negative position in both axis. Then the GridSpans are translated into positive values, using the offset calculated before. This is done in placeItemsOnGrid() and from that moment the rest of the code uses "Definite" GridSpans, which returns only positive positions (size_t instead of int). This allows us to don't have to modify the rest of the code, as it keeps using GridSpans as before. Let's use an example to explain how it works. Imagine that we've a 2 columns grid and 2 items placed like: * Item A: grid-column: -5; * Item B: grid-column: 1; Initially we'll use "Unstranslated" GridSpans with the following values: * Item A: GridSpan(-2, -1) * Item B: GridSpan(0, 1) Then we'll translate them using the smallest position as offset (-2) so we've "Definite" GridSpans: * Item A: GridSpan(0, 1) * Item B: GridSpan(2, 3) Updated results in current tests and added specific test for this. BUG=444011 TEST=fast/css-grid-layout/implicit-tracks-before-explicit.html Review URL: https://codereview.chromium.org/1529083006 Cr-Commit-Position: refs/heads/master@{#367511}
Diffstat (limited to 'components/components.gyp')
0 files changed, 0 insertions, 0 deletions