| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/BackgroundImageGeometry.h" | 5 #include "core/paint/BackgroundImageGeometry.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/layout/LayoutBox.h" | 8 #include "core/layout/LayoutBox.h" |
| 9 #include "core/layout/LayoutBoxModelObject.h" | 9 #include "core/layout/LayoutBoxModelObject.h" |
| 10 #include "core/layout/LayoutTableCell.h" | 10 #include "core/layout/LayoutTableCell.h" |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 static void ExpandToTableColumnGroup(const LayoutTableCell& cell, | 326 static void ExpandToTableColumnGroup(const LayoutTableCell& cell, |
| 327 const LayoutTableCol& column_group, | 327 const LayoutTableCol& column_group, |
| 328 LayoutUnit& value, | 328 LayoutUnit& value, |
| 329 ColumnGroupDirection column_direction) { | 329 ColumnGroupDirection column_direction) { |
| 330 auto sibling_cell = column_direction == kColumnGroupStart | 330 auto sibling_cell = column_direction == kColumnGroupStart |
| 331 ? &LayoutTableCell::PreviousCell | 331 ? &LayoutTableCell::PreviousCell |
| 332 : &LayoutTableCell::NextCell; | 332 : &LayoutTableCell::NextCell; |
| 333 for (const auto* sibling = (cell.*sibling_cell)(); sibling; | 333 for (const auto* sibling = (cell.*sibling_cell)(); sibling; |
| 334 sibling = (sibling->*sibling_cell)()) { | 334 sibling = (sibling->*sibling_cell)()) { |
| 335 LayoutTableCol* innermost_col = | 335 LayoutTableCol* innermost_col = |
| 336 cell.Table() | 336 sibling->GetColAndColGroup().InnermostColOrColGroup(); |
| 337 ->ColElementAtAbsoluteColumn(sibling->AbsoluteColumnIndex()) | |
| 338 .InnermostColOrColGroup(); | |
| 339 if (!innermost_col || innermost_col->EnclosingColumnGroup() != column_group) | 337 if (!innermost_col || innermost_col->EnclosingColumnGroup() != column_group) |
| 340 break; | 338 break; |
| 341 value += sibling->Size().Width(); | 339 value += sibling->Size().Width(); |
| 342 } | 340 } |
| 343 } | 341 } |
| 344 | 342 |
| 345 LayoutPoint BackgroundImageGeometry::GetOffsetForCell( | 343 LayoutPoint BackgroundImageGeometry::GetOffsetForCell( |
| 346 const LayoutTableCell& cell, | 344 const LayoutTableCell& cell, |
| 347 const LayoutBox& positioning_box) { | 345 const LayoutBox& positioning_box) { |
| 348 LayoutSize border_spacing = LayoutSize(cell.Table()->HBorderSpacing(), | 346 LayoutSize border_spacing = LayoutSize(cell.Table()->HBorderSpacing(), |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 UseFixedAttachment(paint_rect.Location()); | 646 UseFixedAttachment(paint_rect.Location()); |
| 649 | 647 |
| 650 // Clip the final output rect to the paint rect | 648 // Clip the final output rect to the paint rect |
| 651 dest_rect_.Intersect(paint_rect); | 649 dest_rect_.Intersect(paint_rect); |
| 652 | 650 |
| 653 // Snap as-yet unsnapped values. | 651 // Snap as-yet unsnapped values. |
| 654 SetDestRect(LayoutRect(PixelSnappedIntRect(dest_rect_))); | 652 SetDestRect(LayoutRect(PixelSnappedIntRect(dest_rect_))); |
| 655 } | 653 } |
| 656 | 654 |
| 657 } // namespace blink | 655 } // namespace blink |
| OLD | NEW |