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 = revealExtentOption == RevealExtent ? VisiblePosition(extent()).ab soluteCaretBounds() : enclosingIntRect(unclippedBounds()); | 1763 rect = revealExtentOption == RevealExtent ? VisiblePosition(extent()).ab soluteCaretBounds() : 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()->renderer()) { | 1769 if (start.deprecatedNode() && start.deprecatedNode()->renderer()) { |
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); | |
yoichio
2015/03/11 04:16:52
Could you confirm this code path is called by only
pals
2015/03/11 06:09:28
I am not sure about this, I am not very familiar a
| |
1773 if (start.deprecatedNode()->renderer()->scrollRectToVisible(rect, alignm ent, alignment)) | 1774 if (start.deprecatedNode()->renderer()->scrollRectToVisible(rect, alignm ent, 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1921 sel.showTreeForThis(); | 1922 sel.showTreeForThis(); |
1922 } | 1923 } |
1923 | 1924 |
1924 void showTree(const blink::FrameSelection* sel) | 1925 void showTree(const blink::FrameSelection* sel) |
1925 { | 1926 { |
1926 if (sel) | 1927 if (sel) |
1927 sel->showTreeForThis(); | 1928 sel->showTreeForThis(); |
1928 } | 1929 } |
1929 | 1930 |
1930 #endif | 1931 #endif |
OLD | NEW |