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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 | 1314 |
1315 size_t endGridAreaIndex = std::upper_bound(coordinates.begin() + startGridAr
eaIndex, coordinates.end() - 1, end) - coordinates.begin(); | 1315 size_t endGridAreaIndex = std::upper_bound(coordinates.begin() + startGridAr
eaIndex, coordinates.end() - 1, end) - coordinates.begin(); |
1316 if (endGridAreaIndex > 0) | 1316 if (endGridAreaIndex > 0) |
1317 --endGridAreaIndex; | 1317 --endGridAreaIndex; |
1318 | 1318 |
1319 return GridSpan(startGridAreaIndex, endGridAreaIndex); | 1319 return GridSpan(startGridAreaIndex, endGridAreaIndex); |
1320 } | 1320 } |
1321 | 1321 |
1322 class GridItemsSorter { | 1322 class GridItemsSorter { |
1323 public: | 1323 public: |
1324 bool operator()(const std::pair<RenderBox*, size_t> firstChild, const std::p
air<RenderBox*, size_t> secondChild) const | 1324 bool operator()(const std::pair<RenderBox*, size_t>& firstChild, const std::
pair<RenderBox*, size_t>& secondChild) const |
1325 { | 1325 { |
1326 if (firstChild.first->style()->order() != secondChild.first->style()->or
der()) | 1326 if (firstChild.first->style()->order() != secondChild.first->style()->or
der()) |
1327 return firstChild.first->style()->order() < secondChild.first->style
()->order(); | 1327 return firstChild.first->style()->order() < secondChild.first->style
()->order(); |
1328 | 1328 |
1329 return firstChild.second < secondChild.second; | 1329 return firstChild.second < secondChild.second; |
1330 } | 1330 } |
1331 }; | 1331 }; |
1332 | 1332 |
1333 void RenderGrid::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOff
set) | 1333 void RenderGrid::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOff
set) |
1334 { | 1334 { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 if (isOutOfFlowPositioned()) | 1379 if (isOutOfFlowPositioned()) |
1380 return "RenderGrid (positioned)"; | 1380 return "RenderGrid (positioned)"; |
1381 if (isAnonymous()) | 1381 if (isAnonymous()) |
1382 return "RenderGrid (generated)"; | 1382 return "RenderGrid (generated)"; |
1383 if (isRelPositioned()) | 1383 if (isRelPositioned()) |
1384 return "RenderGrid (relative positioned)"; | 1384 return "RenderGrid (relative positioned)"; |
1385 return "RenderGrid"; | 1385 return "RenderGrid"; |
1386 } | 1386 } |
1387 | 1387 |
1388 } // namespace WebCore | 1388 } // namespace WebCore |
OLD | NEW |