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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutGrid.cpp

Issue 2150003005: Add grid/flex layout support for <fieldset> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated TestExpectations and fixed legend-after-margin-vertical-writing-mode.html Created 4 years, 5 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
OLDNEW
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
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
316 void LayoutGrid::addChild(LayoutObject* newChild, LayoutObject* beforeChild) 323 void LayoutGrid::addChild(LayoutObject* newChild, LayoutObject* beforeChild)
317 { 324 {
318 LayoutBlock::addChild(newChild, beforeChild); 325 LayoutBlock::addChild(newChild, beforeChild);
319 326
320 // The grid needs to be recomputed as it might contain auto-placed items tha t will change their position. 327 // The grid needs to be recomputed as it might contain auto-placed items tha t will change their position.
321 dirtyGrid(); 328 dirtyGrid();
322 } 329 }
323 330
324 void LayoutGrid::removeChild(LayoutObject* child) 331 void LayoutGrid::removeChild(LayoutObject* child)
325 { 332 {
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc ation; 2546 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc ation;
2540 } 2547 }
2541 2548
2542 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const 2549 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const
2543 { 2550 {
2544 if (!m_gridItemArea.isEmpty()) 2551 if (!m_gridItemArea.isEmpty())
2545 GridPainter(*this).paintChildren(paintInfo, paintOffset); 2552 GridPainter(*this).paintChildren(paintInfo, paintOffset);
2546 } 2553 }
2547 2554
2548 } // namespace blink 2555 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698