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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 * This file is part of the layout object implementation for KHTML. 2 * This file is part of the layout 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 m_currentChild = 98 m_currentChild =
99 m_forward ? m_box->firstChildBox() : m_box->lastChildBox(); 99 m_forward ? m_box->firstChildBox() : m_box->lastChildBox();
100 } else { 100 } else {
101 m_currentChild = m_forward ? m_currentChild->nextSiblingBox() 101 m_currentChild = m_forward ? m_currentChild->nextSiblingBox()
102 : m_currentChild->previousSiblingBox(); 102 : m_currentChild->previousSiblingBox();
103 } 103 }
104 104
105 if (m_currentChild && notFirstOrdinalValue()) 105 if (m_currentChild && notFirstOrdinalValue())
106 m_ordinalValues.add(m_currentChild->style()->boxOrdinalGroup()); 106 m_ordinalValues.insert(m_currentChild->style()->boxOrdinalGroup());
107 } while (!m_currentChild || 107 } while (!m_currentChild ||
108 (!m_currentChild->isAnonymous() && 108 (!m_currentChild->isAnonymous() &&
109 m_currentChild->style()->boxOrdinalGroup() != m_currentOrdinal)); 109 m_currentChild->style()->boxOrdinalGroup() != m_currentOrdinal));
110 return m_currentChild; 110 return m_currentChild;
111 } 111 }
112 112
113 private: 113 private:
114 bool notFirstOrdinalValue() { 114 bool notFirstOrdinalValue() {
115 unsigned firstOrdinalValue = m_forward ? 1 : m_largestOrdinal; 115 unsigned firstOrdinalValue = m_forward ? 1 : m_largestOrdinal;
116 return m_currentOrdinal == firstOrdinalValue && 116 return m_currentOrdinal == firstOrdinalValue &&
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 if (minHeight.isFixed() || minHeight.isAuto()) { 1265 if (minHeight.isFixed() || minHeight.isAuto()) {
1266 LayoutUnit minHeight(child->style()->minHeight().value()); 1266 LayoutUnit minHeight(child->style()->minHeight().value());
1267 LayoutUnit height = contentHeightForChild(child); 1267 LayoutUnit height = contentHeightForChild(child);
1268 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero(); 1268 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero();
1269 return allowedShrinkage; 1269 return allowedShrinkage;
1270 } 1270 }
1271 return LayoutUnit(); 1271 return LayoutUnit();
1272 } 1272 }
1273 1273
1274 } // namespace blink 1274 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698