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