| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All right reserved. | 4 * All right reserved. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2492 LayoutUnit available_logical_width = block_right_edge - block_left_edge; | 2492 LayoutUnit available_logical_width = block_right_edge - block_left_edge; |
| 2493 UpdateLogicalWidthForAlignment(text_align, curr, 0, logical_left, | 2493 UpdateLogicalWidthForAlignment(text_align, curr, 0, logical_left, |
| 2494 total_logical_width, | 2494 total_logical_width, |
| 2495 available_logical_width, 0); | 2495 available_logical_width, 0); |
| 2496 if (ltr) | 2496 if (ltr) |
| 2497 curr->MoveInInlineDirection(logical_left); | 2497 curr->MoveInInlineDirection(logical_left); |
| 2498 else | 2498 else |
| 2499 curr->MoveInInlineDirection( | 2499 curr->MoveInInlineDirection( |
| 2500 logical_left - (available_logical_width - total_logical_width)); | 2500 logical_left - (available_logical_width - total_logical_width)); |
| 2501 } else { | 2501 } else { |
| 2502 TryPlacingEllipsisOnAtomicInlines(curr, block_right_edge, | 2502 TryPlacingEllipsisOnAtomicInlines(curr, LogicalRightOffsetForContent(), |
| 2503 block_left_edge, width, | 2503 LogicalLeftOffsetForContent(), width, |
| 2504 selected_ellipsis_str); | 2504 selected_ellipsis_str); |
| 2505 } | 2505 } |
| 2506 } | 2506 } |
| 2507 indent_text = kDoNotIndentText; | 2507 indent_text = kDoNotIndentText; |
| 2508 } | 2508 } |
| 2509 } | 2509 } |
| 2510 | 2510 |
| 2511 void LayoutBlockFlow::TryPlacingEllipsisOnAtomicInlines( | 2511 void LayoutBlockFlow::TryPlacingEllipsisOnAtomicInlines( |
| 2512 RootInlineBox* root, | 2512 RootInlineBox* root, |
| 2513 LayoutUnit block_right_edge, | 2513 LayoutUnit block_right_edge, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2562 continue; | 2562 continue; |
| 2563 // Root boxes can vary in width so move our offset out to allow | 2563 // Root boxes can vary in width so move our offset out to allow |
| 2564 // comparison with the right hand edge of the block. | 2564 // comparison with the right hand edge of the block. |
| 2565 LayoutUnit logical_left_offset = box->LogicalLeft(); | 2565 LayoutUnit logical_left_offset = box->LogicalLeft(); |
| 2566 max_root_box_width = | 2566 max_root_box_width = |
| 2567 std::max<LayoutUnit>(curr->LogicalWidth(), max_root_box_width); | 2567 std::max<LayoutUnit>(curr->LogicalWidth(), max_root_box_width); |
| 2568 if (logical_left_offset < 0) | 2568 if (logical_left_offset < 0) |
| 2569 logical_left_offset += max_root_box_width - curr->LogicalWidth(); | 2569 logical_left_offset += max_root_box_width - curr->LogicalWidth(); |
| 2570 curr->PlaceEllipsis(selected_ellipsis_str, ltr, block_left_edge, | 2570 curr->PlaceEllipsis(selected_ellipsis_str, ltr, block_left_edge, |
| 2571 block_right_edge, ellipsis_width, | 2571 block_right_edge, ellipsis_width, |
| 2572 LayoutUnit(logical_left_offset.Ceil()), found_box); | 2572 logical_left_offset, found_box); |
| 2573 placed_ellipsis = true; | 2573 placed_ellipsis = true; |
| 2574 } | 2574 } |
| 2575 } | 2575 } |
| 2576 found_box |= placed_ellipsis; | 2576 found_box |= placed_ellipsis; |
| 2577 logical_left_offset += box->LogicalWidth(); | 2577 logical_left_offset += box->LogicalWidth(); |
| 2578 } | 2578 } |
| 2579 } | 2579 } |
| 2580 | 2580 |
| 2581 void LayoutBlockFlow::MarkLinesDirtyInBlockRange(LayoutUnit logical_top, | 2581 void LayoutBlockFlow::MarkLinesDirtyInBlockRange(LayoutUnit logical_top, |
| 2582 LayoutUnit logical_bottom, | 2582 LayoutUnit logical_bottom, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2651 | 2651 |
| 2652 bool LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 2652 bool LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
| 2653 // LayoutBlockFlow is in charge of paint invalidation of the first line. | 2653 // LayoutBlockFlow is in charge of paint invalidation of the first line. |
| 2654 if (FirstLineBox()) | 2654 if (FirstLineBox()) |
| 2655 return false; | 2655 return false; |
| 2656 | 2656 |
| 2657 return LayoutBlock::PaintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 2657 return LayoutBlock::PaintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
| 2658 } | 2658 } |
| 2659 | 2659 |
| 2660 } // namespace blink | 2660 } // namespace blink |
| OLD | NEW |