OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 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 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 rect = LayoutRect(revealExtentOption == RevealExtent ? VisiblePosition(e
xtent()).absoluteCaretBounds() : enclosingIntRect(unclippedBounds())); | 1763 rect = LayoutRect(revealExtentOption == RevealExtent ? VisiblePosition(e
xtent()).absoluteCaretBounds() : enclosingIntRect(unclippedBounds())); |
1764 break; | 1764 break; |
1765 } | 1765 } |
1766 | 1766 |
1767 Position start = this->start(); | 1767 Position start = this->start(); |
1768 ASSERT(start.deprecatedNode()); | 1768 ASSERT(start.deprecatedNode()); |
1769 if (start.deprecatedNode() && start.deprecatedNode()->layoutObject()) { | 1769 if (start.deprecatedNode() && start.deprecatedNode()->layoutObject()) { |
1770 // FIXME: This code only handles scrolling the startContainer's layer, b
ut | 1770 // FIXME: This code only handles scrolling the startContainer's layer, b
ut |
1771 // the selection rect could intersect more than just that. | 1771 // the selection rect could intersect more than just that. |
1772 // See <rdar://problem/4799899>. | 1772 // See <rdar://problem/4799899>. |
| 1773 m_frame->view()->setWasScrolledByUser(true); |
1773 if (start.deprecatedNode()->layoutObject()->scrollRectToVisible(rect, al
ignment, alignment)) | 1774 if (start.deprecatedNode()->layoutObject()->scrollRectToVisible(rect, al
ignment, alignment)) |
1774 updateAppearance(); | 1775 updateAppearance(); |
1775 } | 1776 } |
1776 } | 1777 } |
1777 | 1778 |
1778 void FrameSelection::setSelectionFromNone() | 1779 void FrameSelection::setSelectionFromNone() |
1779 { | 1780 { |
1780 // Put a caret inside the body if the entire frame is editable (either the | 1781 // Put a caret inside the body if the entire frame is editable (either the |
1781 // entire WebView is editable or designMode is on for this document). | 1782 // entire WebView is editable or designMode is on for this document). |
1782 | 1783 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1949 sel.showTreeForThis(); | 1950 sel.showTreeForThis(); |
1950 } | 1951 } |
1951 | 1952 |
1952 void showTree(const blink::FrameSelection* sel) | 1953 void showTree(const blink::FrameSelection* sel) |
1953 { | 1954 { |
1954 if (sel) | 1955 if (sel) |
1955 sel->showTreeForThis(); | 1956 sel->showTreeForThis(); |
1956 } | 1957 } |
1957 | 1958 |
1958 #endif | 1959 #endif |
OLD | NEW |