| 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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 LocalFrame* frame = pos.document()->frame(); | 1206 LocalFrame* frame = pos.document()->frame(); |
| 1207 if (!frame) | 1207 if (!frame) |
| 1208 return x; | 1208 return x; |
| 1209 | 1209 |
| 1210 if (m_xPosForVerticalArrowNavigation == NoXPosForVerticalArrowNavigation())
{ | 1210 if (m_xPosForVerticalArrowNavigation == NoXPosForVerticalArrowNavigation())
{ |
| 1211 VisiblePosition visiblePosition(pos, m_selection.affinity()); | 1211 VisiblePosition visiblePosition(pos, m_selection.affinity()); |
| 1212 // VisiblePosition creation can fail here if a node containing the selec
tion becomes visibility:hidden | 1212 // VisiblePosition creation can fail here if a node containing the selec
tion becomes visibility:hidden |
| 1213 // after the selection is created and before this function is called. | 1213 // after the selection is created and before this function is called. |
| 1214 x = visiblePosition.lineDirectionPointForBlockDirectionNavigation(); | 1214 x = lineDirectionPointForBlockDirectionNavigationOf(visiblePosition); |
| 1215 m_xPosForVerticalArrowNavigation = x; | 1215 m_xPosForVerticalArrowNavigation = x; |
| 1216 } else { | 1216 } else { |
| 1217 x = m_xPosForVerticalArrowNavigation; | 1217 x = m_xPosForVerticalArrowNavigation; |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 return x; | 1220 return x; |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 void FrameSelection::clear() | 1223 void FrameSelection::clear() |
| 1224 { | 1224 { |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2069 | 2069 |
| 2070 void showTree(const blink::FrameSelection* sel) | 2070 void showTree(const blink::FrameSelection* sel) |
| 2071 { | 2071 { |
| 2072 if (sel) | 2072 if (sel) |
| 2073 sel->showTreeForThis(); | 2073 sel->showTreeForThis(); |
| 2074 else | 2074 else |
| 2075 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); | 2075 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); |
| 2076 } | 2076 } |
| 2077 | 2077 |
| 2078 #endif | 2078 #endif |
| OLD | NEW |