| 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 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 | 1933 |
| 1934 if (strategyType == SelectionStrategy::Direction) | 1934 if (strategyType == SelectionStrategy::Direction) |
| 1935 m_granularityStrategy = adoptPtr(new DirectionGranularityStrategy()); | 1935 m_granularityStrategy = adoptPtr(new DirectionGranularityStrategy()); |
| 1936 else | 1936 else |
| 1937 m_granularityStrategy = adoptPtr(new CharacterGranularityStrategy()); | 1937 m_granularityStrategy = adoptPtr(new CharacterGranularityStrategy()); |
| 1938 return m_granularityStrategy.get(); | 1938 return m_granularityStrategy.get(); |
| 1939 } | 1939 } |
| 1940 | 1940 |
| 1941 void FrameSelection::moveRangeSelectionExtent(const IntPoint& contentsPoint) | 1941 void FrameSelection::moveRangeSelectionExtent(const IntPoint& contentsPoint) |
| 1942 { | 1942 { |
| 1943 TRACE_EVENT0("blink", "FrameSelection::moveRangeSelectionExtent"); | |
| 1944 if (isNone()) | 1943 if (isNone()) |
| 1945 return; | 1944 return; |
| 1946 | 1945 |
| 1947 VisibleSelection newSelection = granularityStrategy()->updateExtent(contents
Point, m_frame); | 1946 VisibleSelection newSelection = granularityStrategy()->updateExtent(contents
Point, m_frame); |
| 1948 setSelection( | 1947 setSelection( |
| 1949 newSelection, | 1948 newSelection, |
| 1950 FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | FrameSe
lection::DoNotClearStrategy | UserTriggered, | 1949 FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | FrameSe
lection::DoNotClearStrategy | UserTriggered, |
| 1951 FrameSelection::AlignCursorOnScrollIfNeeded, | 1950 FrameSelection::AlignCursorOnScrollIfNeeded, |
| 1952 CharacterGranularity); | 1951 CharacterGranularity); |
| 1953 } | 1952 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1974 | 1973 |
| 1975 void showTree(const blink::FrameSelection* sel) | 1974 void showTree(const blink::FrameSelection* sel) |
| 1976 { | 1975 { |
| 1977 if (sel) | 1976 if (sel) |
| 1978 sel->showTreeForThis(); | 1977 sel->showTreeForThis(); |
| 1979 else | 1978 else |
| 1980 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); | 1979 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); |
| 1981 } | 1980 } |
| 1982 | 1981 |
| 1983 #endif | 1982 #endif |
| OLD | NEW |