Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2166393002: [css-grid] grid-auto-flow|row should take a <track-size>+ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 { 1918 {
1919 if (!shadowList) 1919 if (!shadowList)
1920 return false; 1920 return false;
1921 for (size_t i = shadowList->shadows().size(); i--; ) { 1921 for (size_t i = shadowList->shadows().size(); i--; ) {
1922 if (shadowList->shadows()[i].color().isCurrentColor()) 1922 if (shadowList->shadows()[i].color().isCurrentColor())
1923 return true; 1923 return true;
1924 } 1924 }
1925 return false; 1925 return false;
1926 } 1926 }
1927 1927
1928 inline Vector<GridTrackSize> initialGridAutoTracks()
Manuel Rego 2016/07/22 08:24:55 Why not mark it as static?
svillar 2016/07/22 13:08:28 No particular reason, some methods in that file ar
1929 {
1930 Vector<GridTrackSize> trackSizeList;
1931 trackSizeList.append(GridTrackSize(Length(Auto)));
1932 return trackSizeList;
1933 }
1934
1935 Vector<GridTrackSize> ComputedStyle::initialGridAutoColumns()
1936 {
1937 return initialGridAutoTracks();
1938 }
1939
1940 Vector<GridTrackSize> ComputedStyle::initialGridAutoRows()
1941 {
1942 return initialGridAutoTracks();
1943 }
1944
1928 int adjustForAbsoluteZoom(int value, float zoomFactor) 1945 int adjustForAbsoluteZoom(int value, float zoomFactor)
1929 { 1946 {
1930 if (zoomFactor == 1) 1947 if (zoomFactor == 1)
1931 return value; 1948 return value;
1932 // Needed because computeLengthInt truncates (rather than rounds) when scali ng up. 1949 // Needed because computeLengthInt truncates (rather than rounds) when scali ng up.
1933 float fvalue = value; 1950 float fvalue = value;
1934 if (zoomFactor > 1) { 1951 if (zoomFactor > 1) {
1935 if (value < 0) 1952 if (value < 0)
1936 fvalue -= 0.5f; 1953 fvalue -= 0.5f;
1937 else 1954 else
1938 fvalue += 0.5f; 1955 fvalue += 0.5f;
1939 } 1956 }
1940 1957
1941 return roundForImpreciseConversion<int>(fvalue / zoomFactor); 1958 return roundForImpreciseConversion<int>(fvalue / zoomFactor);
1942 } 1959 }
1943 1960
1944 } // namespace blink 1961 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698