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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 if (childLayoutType == NeverLayout) 911 if (childLayoutType == NeverLayout)
912 return LayoutUnit(); 912 return LayoutUnit();
913 913
914 updateBlockChildDirtyBitsBeforeLayout(childLayoutType == ForceLayout, 914 updateBlockChildDirtyBitsBeforeLayout(childLayoutType == ForceLayout,
915 child); 915 child);
916 if (child.needsLayout() || childLayoutType == ForceLayout || 916 if (child.needsLayout() || childLayoutType == ForceLayout ||
917 !m_intrinsicSizeAlongMainAxis.contains(&child)) { 917 !m_intrinsicSizeAlongMainAxis.contains(&child)) {
918 child.forceChildLayout(); 918 child.forceChildLayout();
919 cacheChildMainSize(child); 919 cacheChildMainSize(child);
920 } 920 }
921 mainAxisExtent = m_intrinsicSizeAlongMainAxis.get(&child); 921 mainAxisExtent = m_intrinsicSizeAlongMainAxis.at(&child);
922 } else { 922 } else {
923 // We don't need to add scrollbarLogicalWidth here because the preferred 923 // We don't need to add scrollbarLogicalWidth here because the preferred
924 // width includes the scrollbar, even for overflow: auto. 924 // width includes the scrollbar, even for overflow: auto.
925 mainAxisExtent = child.maxPreferredLogicalWidth(); 925 mainAxisExtent = child.maxPreferredLogicalWidth();
926 } 926 }
927 DCHECK_GE(mainAxisExtent - mainAxisBorderAndPadding, LayoutUnit()) 927 DCHECK_GE(mainAxisExtent - mainAxisBorderAndPadding, LayoutUnit())
928 << mainAxisExtent << " - " << mainAxisBorderAndPadding; 928 << mainAxisExtent << " - " << mainAxisBorderAndPadding;
929 return mainAxisExtent - mainAxisBorderAndPadding; 929 return mainAxisExtent - mainAxisBorderAndPadding;
930 } 930 }
931 931
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 LayoutUnit originalOffset = 2166 LayoutUnit originalOffset =
2167 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 2167 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
2168 LayoutUnit newOffset = 2168 LayoutUnit newOffset =
2169 contentExtent - originalOffset - lineCrossAxisExtent; 2169 contentExtent - originalOffset - lineCrossAxisExtent;
2170 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); 2170 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset);
2171 } 2171 }
2172 } 2172 }
2173 } 2173 }
2174 2174
2175 } // namespace blink 2175 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutCounter.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698