| 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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 startPos = candidate; | 791 startPos = candidate; |
| 792 Position endPos = selection.end(); | 792 Position endPos = selection.end(); |
| 793 candidate = endPos.upstream(); | 793 candidate = endPos.upstream(); |
| 794 if (candidate.isCandidate()) | 794 if (candidate.isCandidate()) |
| 795 endPos = candidate; | 795 endPos = candidate; |
| 796 | 796 |
| 797 // We can get into a state where the selection endpoints map to the same Vis
iblePosition when a selection is deleted | 797 // We can get into a state where the selection endpoints map to the same Vis
iblePosition when a selection is deleted |
| 798 // because we don't yet notify the FrameSelection of text removal. | 798 // because we don't yet notify the FrameSelection of text removal. |
| 799 if (startPos.isNull() || endPos.isNull() || selection.visibleStart() == sele
ction.visibleEnd()) | 799 if (startPos.isNull() || endPos.isNull() || selection.visibleStart() == sele
ction.visibleEnd()) |
| 800 return; | 800 return; |
| 801 LayoutObject* startRenderer = startPos.anchorNode()->renderer(); | 801 LayoutObject* startRenderer = startPos.anchorNode()->layoutObject(); |
| 802 LayoutObject* endRenderer = endPos.anchorNode()->renderer(); | 802 LayoutObject* endRenderer = endPos.anchorNode()->layoutObject(); |
| 803 if (!startRenderer || !endRenderer) | 803 if (!startRenderer || !endRenderer) |
| 804 return; | 804 return; |
| 805 ASSERT(startRenderer->view() == this && endRenderer->view() == this); | 805 ASSERT(startRenderer->view() == this && endRenderer->view() == this); |
| 806 setSelection(startRenderer, startPos.deprecatedEditingOffset(), endRenderer,
endPos.deprecatedEditingOffset()); | 806 setSelection(startRenderer, startPos.deprecatedEditingOffset(), endRenderer,
endPos.deprecatedEditingOffset()); |
| 807 } | 807 } |
| 808 | 808 |
| 809 LayoutObject* LayoutView::selectionStart() | 809 LayoutObject* LayoutView::selectionStart() |
| 810 { | 810 { |
| 811 commitPendingSelection(); | 811 commitPendingSelection(); |
| 812 return m_selectionStart; | 812 return m_selectionStart; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 bool LayoutView::rootBackgroundIsEntirelyFixed() const | 851 bool LayoutView::rootBackgroundIsEntirelyFixed() const |
| 852 { | 852 { |
| 853 if (LayoutObject* backgroundRenderer = this->backgroundRenderer()) | 853 if (LayoutObject* backgroundRenderer = this->backgroundRenderer()) |
| 854 return backgroundRenderer->hasEntirelyFixedBackground(); | 854 return backgroundRenderer->hasEntirelyFixedBackground(); |
| 855 return false; | 855 return false; |
| 856 } | 856 } |
| 857 | 857 |
| 858 LayoutObject* LayoutView::backgroundRenderer() const | 858 LayoutObject* LayoutView::backgroundRenderer() const |
| 859 { | 859 { |
| 860 if (Element* documentElement = document().documentElement()) { | 860 if (Element* documentElement = document().documentElement()) { |
| 861 if (LayoutObject* rootObject = documentElement->renderer()) | 861 if (LayoutObject* rootObject = documentElement->layoutObject()) |
| 862 return rootObject->rendererForRootBackground(); | 862 return rootObject->rendererForRootBackground(); |
| 863 } | 863 } |
| 864 return 0; | 864 return 0; |
| 865 } | 865 } |
| 866 | 866 |
| 867 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundRenderer) const | 867 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundRenderer) const |
| 868 { | 868 { |
| 869 if (!hasColumns()) | 869 if (!hasColumns()) |
| 870 return LayoutRect(unscaledDocumentRect()); | 870 return LayoutRect(unscaledDocumentRect()); |
| 871 | 871 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 } | 993 } |
| 994 | 994 |
| 995 void LayoutView::invalidateDisplayItemClients(DisplayItemList* displayItemList)
const | 995 void LayoutView::invalidateDisplayItemClients(DisplayItemList* displayItemList)
const |
| 996 { | 996 { |
| 997 LayoutBlockFlow::invalidateDisplayItemClients(displayItemList); | 997 LayoutBlockFlow::invalidateDisplayItemClients(displayItemList); |
| 998 if (m_frameView) | 998 if (m_frameView) |
| 999 displayItemList->invalidate(m_frameView->displayItemClient()); | 999 displayItemList->invalidate(m_frameView->displayItemClient()); |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 } // namespace blink | 1002 } // namespace blink |
| OLD | NEW |