| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 | 1205 |
| 1206 VisiblePosition basePosition = currentSelection.isBaseFirst() ? | 1206 VisiblePosition basePosition = currentSelection.isBaseFirst() ? |
| 1207 currentSelection.visibleStart() : currentSelection.visibleEnd(); | 1207 currentSelection.visibleStart() : currentSelection.visibleEnd(); |
| 1208 VisiblePosition extentPosition = visiblePositionForWindowPoint(point); | 1208 VisiblePosition extentPosition = visiblePositionForWindowPoint(point); |
| 1209 | 1209 |
| 1210 // Prevent the selection from collapsing. | 1210 // Prevent the selection from collapsing. |
| 1211 if (comparePositions(basePosition, extentPosition) == 0) | 1211 if (comparePositions(basePosition, extentPosition) == 0) |
| 1212 return; | 1212 return; |
| 1213 | 1213 |
| 1214 VisibleSelection newSelection = VisibleSelection(basePosition, extentPositio
n); | 1214 VisibleSelection newSelection = VisibleSelection(basePosition, extentPositio
n); |
| 1215 frame()->selection().setSelection(newSelection, CharacterGranularity); | 1215 frame()->selection().setSelection(newSelection, FrameSelection::CloseTyping
| FrameSelection::ClearTypingStyle | UserTriggered, FrameSelection::AlignCursorO
nScrollIfNeeded, CharacterGranularity); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint&
extent) | 1218 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint&
extent) |
| 1219 { | 1219 { |
| 1220 VisiblePosition basePosition = visiblePositionForWindowPoint(base); | 1220 VisiblePosition basePosition = visiblePositionForWindowPoint(base); |
| 1221 VisiblePosition extentPosition = visiblePositionForWindowPoint(extent); | 1221 VisiblePosition extentPosition = visiblePositionForWindowPoint(extent); |
| 1222 VisibleSelection newSelection = VisibleSelection(basePosition, extentPositio
n); | 1222 VisibleSelection newSelection = VisibleSelection(basePosition, extentPositio
n); |
| 1223 frame()->selection().setSelection(newSelection, CharacterGranularity); | 1223 frame()->selection().setSelection(newSelection, CharacterGranularity); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2013 { | 2013 { |
| 2014 m_frameWidget = frameWidget; | 2014 m_frameWidget = frameWidget; |
| 2015 } | 2015 } |
| 2016 | 2016 |
| 2017 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2017 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
| 2018 { | 2018 { |
| 2019 return m_frameWidget; | 2019 return m_frameWidget; |
| 2020 } | 2020 } |
| 2021 | 2021 |
| 2022 } // namespace blink | 2022 } // namespace blink |
| OLD | NEW |