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

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

Issue 207783002: Omit "int" when using "unsigned" modifier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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/page/EventSource.cpp ('k') | Source/core/rendering/RenderObject.h » ('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 * This file is part of the render object implementation for KHTML. 2 * This file is part of the render object implementation for KHTML.
3 * 3 *
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) 5 * (C) 1999 Antti Koivisto (koivisto@kde.org)
6 * Copyright (C) 2003 Apple Computer, Inc. 6 * Copyright (C) 2003 Apple Computer, Inc.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // We have some flexible objects. See if we need to grow/shrink the m at all. 491 // We have some flexible objects. See if we need to grow/shrink the m at all.
492 if (!remainingSpace) 492 if (!remainingSpace)
493 break; 493 break;
494 494
495 // Allocate the remaining space among the flexible objects. If we a re trying to 495 // Allocate the remaining space among the flexible objects. If we a re trying to
496 // grow, then we go from the lowest flex group to the highest flex g roup. For shrinking, 496 // grow, then we go from the lowest flex group to the highest flex g roup. For shrinking,
497 // we go from the highest flex group to the lowest group. 497 // we go from the highest flex group to the lowest group.
498 bool expanding = remainingSpace > 0; 498 bool expanding = remainingSpace > 0;
499 unsigned int start = expanding ? lowestFlexGroup : highestFlexGroup; 499 unsigned int start = expanding ? lowestFlexGroup : highestFlexGroup;
500 unsigned int end = expanding? highestFlexGroup : lowestFlexGroup; 500 unsigned int end = expanding? highestFlexGroup : lowestFlexGroup;
501 for (unsigned int i = start; i <= end && remainingSpace; i++) { 501 for (unsigned i = start; i <= end && remainingSpace; i++) {
502 // Always start off by assuming the group can get all the remain ing space. 502 // Always start off by assuming the group can get all the remain ing space.
503 LayoutUnit groupRemainingSpace = remainingSpace; 503 LayoutUnit groupRemainingSpace = remainingSpace;
504 do { 504 do {
505 // Flexing consists of multiple passes, since we have to cha nge ratios every time an object hits its max/min-width 505 // Flexing consists of multiple passes, since we have to cha nge ratios every time an object hits its max/min-width
506 // For a given pass, we always start off by computing the to talFlex of all objects that can grow/shrink at all, and 506 // For a given pass, we always start off by computing the to talFlex of all objects that can grow/shrink at all, and
507 // computing the allowed growth before an object hits its mi n/max width (and thus 507 // computing the allowed growth before an object hits its mi n/max width (and thus
508 // forces a totalFlex recomputation). 508 // forces a totalFlex recomputation).
509 LayoutUnit groupRemainingSpaceAtBeginning = groupRemainingSp ace; 509 LayoutUnit groupRemainingSpaceAtBeginning = groupRemainingSp ace;
510 float totalFlex = 0.0f; 510 float totalFlex = 0.0f;
511 for (RenderBox* child = iterator.first(); child; child = ite rator.next()) { 511 for (RenderBox* child = iterator.first(); child; child = ite rator.next()) {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 // We have some flexible objects. See if we need to grow/shrink the m at all. 745 // We have some flexible objects. See if we need to grow/shrink the m at all.
746 if (!remainingSpace) 746 if (!remainingSpace)
747 break; 747 break;
748 748
749 // Allocate the remaining space among the flexible objects. If we a re trying to 749 // Allocate the remaining space among the flexible objects. If we a re trying to
750 // grow, then we go from the lowest flex group to the highest flex g roup. For shrinking, 750 // grow, then we go from the lowest flex group to the highest flex g roup. For shrinking,
751 // we go from the highest flex group to the lowest group. 751 // we go from the highest flex group to the lowest group.
752 bool expanding = remainingSpace > 0; 752 bool expanding = remainingSpace > 0;
753 unsigned int start = expanding ? lowestFlexGroup : highestFlexGroup; 753 unsigned int start = expanding ? lowestFlexGroup : highestFlexGroup;
754 unsigned int end = expanding? highestFlexGroup : lowestFlexGroup; 754 unsigned int end = expanding? highestFlexGroup : lowestFlexGroup;
755 for (unsigned int i = start; i <= end && remainingSpace; i++) { 755 for (unsigned i = start; i <= end && remainingSpace; i++) {
756 // Always start off by assuming the group can get all the remain ing space. 756 // Always start off by assuming the group can get all the remain ing space.
757 LayoutUnit groupRemainingSpace = remainingSpace; 757 LayoutUnit groupRemainingSpace = remainingSpace;
758 do { 758 do {
759 // Flexing consists of multiple passes, since we have to cha nge ratios every time an object hits its max/min-width 759 // Flexing consists of multiple passes, since we have to cha nge ratios every time an object hits its max/min-width
760 // For a given pass, we always start off by computing the to talFlex of all objects that can grow/shrink at all, and 760 // For a given pass, we always start off by computing the to talFlex of all objects that can grow/shrink at all, and
761 // computing the allowed growth before an object hits its mi n/max width (and thus 761 // computing the allowed growth before an object hits its mi n/max width (and thus
762 // forces a totalFlex recomputation). 762 // forces a totalFlex recomputation).
763 LayoutUnit groupRemainingSpaceAtBeginning = groupRemainingSp ace; 763 LayoutUnit groupRemainingSpaceAtBeginning = groupRemainingSp ace;
764 float totalFlex = 0.0f; 764 float totalFlex = 0.0f;
765 for (RenderBox* child = iterator.first(); child; child = ite rator.next()) { 765 for (RenderBox* child = iterator.first(); child; child = ite rator.next()) {
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 if (isPseudoElement()) 1078 if (isPseudoElement())
1079 return "RenderDeprecatedFlexibleBox (generated)"; 1079 return "RenderDeprecatedFlexibleBox (generated)";
1080 if (isAnonymous()) 1080 if (isAnonymous())
1081 return "RenderDeprecatedFlexibleBox (generated)"; 1081 return "RenderDeprecatedFlexibleBox (generated)";
1082 if (isRelPositioned()) 1082 if (isRelPositioned())
1083 return "RenderDeprecatedFlexibleBox (relative positioned)"; 1083 return "RenderDeprecatedFlexibleBox (relative positioned)";
1084 return "RenderDeprecatedFlexibleBox"; 1084 return "RenderDeprecatedFlexibleBox";
1085 } 1085 }
1086 1086
1087 } // namespace WebCore 1087 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698