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

Side by Side Diff: Source/core/rendering/RenderBlock.h

Issue 22493015: Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlock.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 1184
1185 // When computing the offset caused by the floats on a given line, if 1185 // When computing the offset caused by the floats on a given line, if
1186 // the outermost float on that line has a shape-outside, the inline 1186 // the outermost float on that line has a shape-outside, the inline
1187 // content that butts up against that float must be positioned using 1187 // content that butts up against that float must be positioned using
1188 // the contours of the shape, not the margin box of the float. 1188 // the contours of the shape, not the margin box of the float.
1189 // We save the last float encountered so that the offset can be 1189 // We save the last float encountered so that the offset can be
1190 // computed correctly by the code using this adapter. 1190 // computed correctly by the code using this adapter.
1191 const FloatingObject* lastFloat() const { return m_last; } 1191 const FloatingObject* lastFloat() const { return m_last; }
1192 1192
1193 private: 1193 private:
1194 bool updateOffsetIfNeeded(const FloatingObject*) const;
1195
1194 const RenderBlock* m_renderer; 1196 const RenderBlock* m_renderer;
1195 int m_lowValue; 1197 int m_lowValue;
1196 int m_highValue; 1198 int m_highValue;
1197 LayoutUnit& m_offset; 1199 LayoutUnit& m_offset;
1198 LayoutUnit* m_heightRemaining; 1200 LayoutUnit* m_heightRemaining;
1199 // This member variable is mutable because the collectIfNeeded method 1201 // This member variable is mutable because the collectIfNeeded method
1200 // is declared as const, even though it doesn't actually respect that 1202 // is declared as const, even though it doesn't actually respect that
1201 // contract. It modifies other member variables via loopholes in the 1203 // contract. It modifies other member variables via loopholes in the
1202 // const behavior. Instead of using loopholes, I decided it was better 1204 // const behavior. Instead of using loopholes, I decided it was better
1203 // to make the fact that this is modified in a const method explicit. 1205 // to make the fact that this is modified in a const method explicit.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 static String string(const int value); 1342 static String string(const int value);
1341 }; 1343 };
1342 template<> struct ValueToString<RenderBlock::FloatingObject*> { 1344 template<> struct ValueToString<RenderBlock::FloatingObject*> {
1343 static String string(const RenderBlock::FloatingObject*); 1345 static String string(const RenderBlock::FloatingObject*);
1344 }; 1346 };
1345 #endif 1347 #endif
1346 1348
1347 } // namespace WebCore 1349 } // namespace WebCore
1348 1350
1349 #endif // RenderBlock_h 1351 #endif // RenderBlock_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698