OLD | NEW |
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 199 } |
200 | 200 |
201 void RenderGrid::addChild(RenderObject* newChild, RenderObject* beforeChild) | 201 void RenderGrid::addChild(RenderObject* newChild, RenderObject* beforeChild) |
202 { | 202 { |
203 // If the new requested beforeChild is not one of our children is because it
's wrapped by an anonymous container. If | 203 // If the new requested beforeChild is not one of our children is because it
's wrapped by an anonymous container. If |
204 // we do not special case this situation we could end up calling addChild()
twice for the newChild, one with the | 204 // we do not special case this situation we could end up calling addChild()
twice for the newChild, one with the |
205 // initial beforeChild and another one with its parent. | 205 // initial beforeChild and another one with its parent. |
206 if (beforeChild && beforeChild->parent() != this) { | 206 if (beforeChild && beforeChild->parent() != this) { |
207 ASSERT(beforeChild->parent()->isAnonymous()); | 207 ASSERT(beforeChild->parent()->isAnonymous()); |
208 beforeChild = splitAnonymousBoxesAroundChild(beforeChild); | 208 beforeChild = splitAnonymousBoxesAroundChild(beforeChild); |
| 209 dirtyGrid(); |
209 } | 210 } |
210 | 211 |
211 RenderBlock::addChild(newChild, beforeChild); | 212 RenderBlock::addChild(newChild, beforeChild); |
212 | 213 |
213 if (gridIsDirty()) | 214 if (gridIsDirty()) |
214 return; | 215 return; |
215 | 216 |
216 if (!newChild->isBox()) { | 217 if (!newChild->isBox()) { |
217 dirtyGrid(); | 218 dirtyGrid(); |
218 return; | 219 return; |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 if (isOutOfFlowPositioned()) | 1424 if (isOutOfFlowPositioned()) |
1424 return "RenderGrid (positioned)"; | 1425 return "RenderGrid (positioned)"; |
1425 if (isAnonymous()) | 1426 if (isAnonymous()) |
1426 return "RenderGrid (generated)"; | 1427 return "RenderGrid (generated)"; |
1427 if (isRelPositioned()) | 1428 if (isRelPositioned()) |
1428 return "RenderGrid (relative positioned)"; | 1429 return "RenderGrid (relative positioned)"; |
1429 return "RenderGrid"; | 1430 return "RenderGrid"; |
1430 } | 1431 } |
1431 | 1432 |
1432 } // namespace blink | 1433 } // namespace blink |
OLD | NEW |