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

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

Issue 1885913002: [css-grid] Use grid-template-areas to determine the explicit grid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 if (explicitGridDidResize(*oldStyle) 302 if (explicitGridDidResize(*oldStyle)
303 || namedGridLinesDefinitionDidChange(*oldStyle) 303 || namedGridLinesDefinitionDidChange(*oldStyle)
304 || oldStyle->getGridAutoFlow() != styleRef().getGridAutoFlow()) 304 || oldStyle->getGridAutoFlow() != styleRef().getGridAutoFlow())
305 dirtyGrid(); 305 dirtyGrid();
306 } 306 }
307 307
308 bool LayoutGrid::explicitGridDidResize(const ComputedStyle& oldStyle) const 308 bool LayoutGrid::explicitGridDidResize(const ComputedStyle& oldStyle) const
309 { 309 {
310 return oldStyle.gridTemplateColumns().size() != styleRef().gridTemplateColum ns().size() 310 return oldStyle.gridTemplateColumns().size() != styleRef().gridTemplateColum ns().size()
311 || oldStyle.gridTemplateRows().size() != styleRef().gridTemplateRows().s ize(); 311 || oldStyle.gridTemplateRows().size() != styleRef().gridTemplateRows().s ize()
312 || oldStyle.namedGridAreaColumnCount() != styleRef().namedGridAreaColumn Count()
313 || oldStyle.namedGridAreaRowCount() != styleRef().namedGridAreaRowCount( );
312 } 314 }
313 315
314 bool LayoutGrid::namedGridLinesDefinitionDidChange(const ComputedStyle& oldStyle ) const 316 bool LayoutGrid::namedGridLinesDefinitionDidChange(const ComputedStyle& oldStyle ) const
315 { 317 {
316 return oldStyle.namedGridRowLines() != styleRef().namedGridRowLines() 318 return oldStyle.namedGridRowLines() != styleRef().namedGridRowLines()
317 || oldStyle.namedGridColumnLines() != styleRef().namedGridColumnLines(); 319 || oldStyle.namedGridColumnLines() != styleRef().namedGridColumnLines();
318 } 320 }
319 321
320 LayoutUnit LayoutGrid::computeTrackBasedLogicalHeight(const GridSizingData& sizi ngData) const 322 LayoutUnit LayoutGrid::computeTrackBasedLogicalHeight(const GridSizingData& sizi ngData) const
321 { 323 {
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2138 2140
2139 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData )); 2141 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData ));
2140 } 2142 }
2141 2143
2142 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const 2144 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const
2143 { 2145 {
2144 GridPainter(*this).paintChildren(paintInfo, paintOffset); 2146 GridPainter(*this).paintChildren(paintInfo, paintOffset);
2145 } 2147 }
2146 2148
2147 } // namespace blink 2149 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698