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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 , m_gridIsDirty(true) | 302 , m_gridIsDirty(true) |
303 , m_orderIterator(this) | 303 , m_orderIterator(this) |
304 { | 304 { |
305 ASSERT(!childrenInline()); | 305 ASSERT(!childrenInline()); |
306 } | 306 } |
307 | 307 |
308 LayoutGrid::~LayoutGrid() | 308 LayoutGrid::~LayoutGrid() |
309 { | 309 { |
310 } | 310 } |
311 | 311 |
312 LayoutGrid* LayoutGrid::createAnonymous(Document* document) | |
313 { | |
314 LayoutGrid* layoutGrid = new LayoutGrid(nullptr); | |
315 layoutGrid->setDocumentForAnonymous(document); | |
316 return layoutGrid; | |
317 } | |
318 | |
319 void LayoutGrid::addChild(LayoutObject* newChild, LayoutObject* beforeChild) | 312 void LayoutGrid::addChild(LayoutObject* newChild, LayoutObject* beforeChild) |
320 { | 313 { |
321 LayoutBlock::addChild(newChild, beforeChild); | 314 LayoutBlock::addChild(newChild, beforeChild); |
322 | 315 |
323 // The grid needs to be recomputed as it might contain auto-placed items tha
t will change their position. | 316 // The grid needs to be recomputed as it might contain auto-placed items tha
t will change their position. |
324 dirtyGrid(); | 317 dirtyGrid(); |
325 } | 318 } |
326 | 319 |
327 void LayoutGrid::removeChild(LayoutObject* child) | 320 void LayoutGrid::removeChild(LayoutObject* child) |
328 { | 321 { |
(...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2595 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc
ation; | 2588 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc
ation; |
2596 } | 2589 } |
2597 | 2590 |
2598 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2591 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
2599 { | 2592 { |
2600 if (!m_gridItemArea.isEmpty()) | 2593 if (!m_gridItemArea.isEmpty()) |
2601 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2594 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
2602 } | 2595 } |
2603 | 2596 |
2604 } // namespace blink | 2597 } // namespace blink |
OLD | NEW |