| 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 |
| 312 void LayoutGrid::addChild(LayoutObject* newChild, LayoutObject* beforeChild) | 319 void LayoutGrid::addChild(LayoutObject* newChild, LayoutObject* beforeChild) |
| 313 { | 320 { |
| 314 LayoutBlock::addChild(newChild, beforeChild); | 321 LayoutBlock::addChild(newChild, beforeChild); |
| 315 | 322 |
| 316 // The grid needs to be recomputed as it might contain auto-placed items tha
t will change their position. | 323 // The grid needs to be recomputed as it might contain auto-placed items tha
t will change their position. |
| 317 dirtyGrid(); | 324 dirtyGrid(); |
| 318 } | 325 } |
| 319 | 326 |
| 320 void LayoutGrid::removeChild(LayoutObject* child) | 327 void LayoutGrid::removeChild(LayoutObject* child) |
| 321 { | 328 { |
| (...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2602 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc
ation; | 2609 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc
ation; |
| 2603 } | 2610 } |
| 2604 | 2611 |
| 2605 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2612 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
| 2606 { | 2613 { |
| 2607 if (!m_gridItemArea.isEmpty()) | 2614 if (!m_gridItemArea.isEmpty()) |
| 2608 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2615 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
| 2609 } | 2616 } |
| 2610 | 2617 |
| 2611 } // namespace blink | 2618 } // namespace blink |
| OLD | NEW |