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

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: revert a11y test expectations & explicitely set a11y fieldset role to GroupRole Created 4 years, 4 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 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc ation; 2603 return isOrthogonalChild(child) ? childLocation.transposedPoint() : childLoc ation;
2597 } 2604 }
2598 2605
2599 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const 2606 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const
2600 { 2607 {
2601 if (!m_gridItemArea.isEmpty()) 2608 if (!m_gridItemArea.isEmpty())
2602 GridPainter(*this).paintChildren(paintInfo, paintOffset); 2609 GridPainter(*this).paintChildren(paintInfo, paintOffset);
2603 } 2610 }
2604 2611
2605 } // namespace blink 2612 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698