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

Side by Side Diff: Source/core/rendering/RenderGrid.cpp

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rename browser zoom to page zoom Created 6 years, 11 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
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 421 }
422 422
423 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent()); 423 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent());
424 return infinity; 424 return infinity;
425 } 425 }
426 426
427 LayoutUnit RenderGrid::computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirect ion direction, const Length& trackLength) const 427 LayoutUnit RenderGrid::computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirect ion direction, const Length& trackLength) const
428 { 428 {
429 ASSERT(trackLength.isSpecified()); 429 ASSERT(trackLength.isSpecified());
430 // FIXME: The -1 here should be replaced by whatever the intrinsic height of the grid is. 430 // FIXME: The -1 here should be replaced by whatever the intrinsic height of the grid is.
431 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight(), -1), view()); 431 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight(), -1));
432 } 432 }
433 433
434 static bool sortByGridNormalizedFlexValue(const GridTrackForNormalization& track 1, const GridTrackForNormalization& track2) 434 static bool sortByGridNormalizedFlexValue(const GridTrackForNormalization& track 1, const GridTrackForNormalization& track2)
435 { 435 {
436 return track1.m_normalizedFlexValue < track2.m_normalizedFlexValue; 436 return track1.m_normalizedFlexValue < track2.m_normalizedFlexValue;
437 } 437 }
438 438
439 double RenderGrid::computeNormalizedFractionBreadth(Vector<GridTrack>& tracks, G ridTrackSizingDirection direction, LayoutUnit availableLogicalSpace) const 439 double RenderGrid::computeNormalizedFractionBreadth(Vector<GridTrack>& tracks, G ridTrackSizingDirection direction, LayoutUnit availableLogicalSpace) const
440 { 440 {
441 // |availableLogicalSpace| already accounts for the used breadths so no need to remove it here. 441 // |availableLogicalSpace| already accounts for the used breadths so no need to remove it here.
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 if (isOutOfFlowPositioned()) 1152 if (isOutOfFlowPositioned())
1153 return "RenderGrid (positioned)"; 1153 return "RenderGrid (positioned)";
1154 if (isAnonymous()) 1154 if (isAnonymous())
1155 return "RenderGrid (generated)"; 1155 return "RenderGrid (generated)";
1156 if (isRelPositioned()) 1156 if (isRelPositioned())
1157 return "RenderGrid (relative positioned)"; 1157 return "RenderGrid (relative positioned)";
1158 return "RenderGrid"; 1158 return "RenderGrid";
1159 } 1159 }
1160 1160
1161 } // namespace WebCore 1161 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698