Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |