| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 } | 671 } |
| 672 } | 672 } |
| 673 } | 673 } |
| 674 | 674 |
| 675 // Any new blocks that remain were not found in the old blocks dict, and so
they need to be updated. | 675 // Any new blocks that remain were not found in the old blocks dict, and so
they need to be updated. |
| 676 SelectedBlockMap::iterator newBlocksEnd = newSelectedBlocks.end(); | 676 SelectedBlockMap::iterator newBlocksEnd = newSelectedBlocks.end(); |
| 677 for (SelectedBlockMap::iterator i = newSelectedBlocks.begin(); i != newBlock
sEnd; ++i) | 677 for (SelectedBlockMap::iterator i = newSelectedBlocks.begin(); i != newBlock
sEnd; ++i) |
| 678 i->value->invalidatePaint(); | 678 i->value->invalidatePaint(); |
| 679 } | 679 } |
| 680 | 680 |
| 681 void RenderView::getSelection(RenderObject*& startRenderer, int& startOffset, Re
nderObject*& endRenderer, int& endOffset) const | |
| 682 { | |
| 683 startRenderer = m_selectionStart; | |
| 684 startOffset = m_selectionStartPos; | |
| 685 endRenderer = m_selectionEnd; | |
| 686 endOffset = m_selectionEndPos; | |
| 687 } | |
| 688 | |
| 689 void RenderView::clearSelection() | 681 void RenderView::clearSelection() |
| 690 { | 682 { |
| 691 // For querying RenderLayer::compositingState() | 683 // For querying RenderLayer::compositingState() |
| 692 // This is correct, since destroying render objects needs to cause eager pai
nt invalidations. | 684 // This is correct, since destroying render objects needs to cause eager pai
nt invalidations. |
| 693 DisableCompositingQueryAsserts disabler; | 685 DisableCompositingQueryAsserts disabler; |
| 694 | 686 |
| 695 layer()->invalidatePaintForBlockSelectionGaps(); | 687 layer()->invalidatePaintForBlockSelectionGaps(); |
| 696 setSelection(0, -1, 0, -1, PaintInvalidationNewMinusOld); | 688 setSelection(0, -1, 0, -1, PaintInvalidationNewMinusOld); |
| 697 } | 689 } |
| 698 | 690 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 return viewWidth(IncludeScrollbars) / scale; | 881 return viewWidth(IncludeScrollbars) / scale; |
| 890 } | 882 } |
| 891 | 883 |
| 892 double RenderView::layoutViewportHeight() const | 884 double RenderView::layoutViewportHeight() const |
| 893 { | 885 { |
| 894 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 886 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 895 return viewHeight(IncludeScrollbars) / scale; | 887 return viewHeight(IncludeScrollbars) / scale; |
| 896 } | 888 } |
| 897 | 889 |
| 898 } // namespace blink | 890 } // namespace blink |
| OLD | NEW |