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

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

Issue 1743803002: Rename enums/functions that collide in chromium style in core/style/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-8
Patch Set: get-names-9: rebase Created 4 years, 9 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 if (!oldStyle) 291 if (!oldStyle)
292 return; 292 return;
293 293
294 // FIXME: The following checks could be narrowed down if we kept track of wh ich type of grid items we have: 294 // FIXME: The following checks could be narrowed down if we kept track of wh ich type of grid items we have:
295 // - explicit grid size changes impact negative explicitely positioned and a uto-placed grid items. 295 // - explicit grid size changes impact negative explicitely positioned and a uto-placed grid items.
296 // - named grid lines only impact grid items with named grid lines. 296 // - named grid lines only impact grid items with named grid lines.
297 // - auto-flow changes only impacts auto-placed children. 297 // - auto-flow changes only impacts auto-placed children.
298 298
299 if (explicitGridDidResize(*oldStyle) 299 if (explicitGridDidResize(*oldStyle)
300 || namedGridLinesDefinitionDidChange(*oldStyle) 300 || namedGridLinesDefinitionDidChange(*oldStyle)
301 || oldStyle->gridAutoFlow() != styleRef().gridAutoFlow()) 301 || oldStyle->getGridAutoFlow() != styleRef().getGridAutoFlow())
302 dirtyGrid(); 302 dirtyGrid();
303 } 303 }
304 304
305 bool LayoutGrid::explicitGridDidResize(const ComputedStyle& oldStyle) const 305 bool LayoutGrid::explicitGridDidResize(const ComputedStyle& oldStyle) const
306 { 306 {
307 return oldStyle.gridTemplateColumns().size() != styleRef().gridTemplateColum ns().size() 307 return oldStyle.gridTemplateColumns().size() != styleRef().gridTemplateColum ns().size()
308 || oldStyle.gridTemplateRows().size() != styleRef().gridTemplateRows().s ize(); 308 || oldStyle.gridTemplateRows().size() != styleRef().gridTemplateRows().s ize();
309 } 309 }
310 310
311 bool LayoutGrid::namedGridLinesDefinitionDidChange(const ComputedStyle& oldStyle ) const 311 bool LayoutGrid::namedGridLinesDefinitionDidChange(const ComputedStyle& oldStyle ) const
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 } else if (marginBefore.isAuto()) { 1788 } else if (marginBefore.isAuto()) {
1789 child.setMarginBefore(availableAlignmentSpace, style()); 1789 child.setMarginBefore(availableAlignmentSpace, style());
1790 } else if (marginAfter.isAuto()) { 1790 } else if (marginAfter.isAuto()) {
1791 child.setMarginAfter(availableAlignmentSpace, style()); 1791 child.setMarginAfter(availableAlignmentSpace, style());
1792 } 1792 }
1793 } 1793 }
1794 1794
1795 GridAxisPosition LayoutGrid::columnAxisPositionForChild(const LayoutBox& child) const 1795 GridAxisPosition LayoutGrid::columnAxisPositionForChild(const LayoutBox& child) const
1796 { 1796 {
1797 bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizon talWritingMode(); 1797 bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizon talWritingMode();
1798 bool hasSameWritingMode = child.styleRef().writingMode() == styleRef().writi ngMode(); 1798 bool hasSameWritingMode = child.styleRef().getWritingMode() == styleRef().ge tWritingMode();
1799 1799
1800 switch (ComputedStyle::resolveAlignment(styleRef(), child.styleRef(), ItemPo sitionStretch)) { 1800 switch (ComputedStyle::resolveAlignment(styleRef(), child.styleRef(), ItemPo sitionStretch)) {
1801 case ItemPositionSelfStart: 1801 case ItemPositionSelfStart:
1802 // If orthogonal writing-modes, this computes to 'start'. 1802 // If orthogonal writing-modes, this computes to 'start'.
1803 // FIXME: grid track sizing and positioning do not support orthogonal mo des yet. 1803 // FIXME: grid track sizing and positioning do not support orthogonal mo des yet.
1804 // self-start is based on the child's block axis direction. That's why w e need to check against the grid container's block flow. 1804 // self-start is based on the child's block axis direction. That's why w e need to check against the grid container's block flow.
1805 return (hasOrthogonalWritingMode || hasSameWritingMode) ? GridAxisStart : GridAxisEnd; 1805 return (hasOrthogonalWritingMode || hasSameWritingMode) ? GridAxisStart : GridAxisEnd;
1806 case ItemPositionSelfEnd: 1806 case ItemPositionSelfEnd:
1807 // If orthogonal writing-modes, this computes to 'end'. 1807 // If orthogonal writing-modes, this computes to 'end'.
1808 // FIXME: grid track sizing and positioning do not support orthogonal mo des yet. 1808 // FIXME: grid track sizing and positioning do not support orthogonal mo des yet.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2069 2069
2070 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child)); 2070 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child));
2071 } 2071 }
2072 2072
2073 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const 2073 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) const
2074 { 2074 {
2075 GridPainter(*this).paintChildren(paintInfo, paintOffset); 2075 GridPainter(*this).paintChildren(paintInfo, paintOffset);
2076 } 2076 }
2077 2077
2078 } // namespace blink 2078 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698