| 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 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 { | 1191 { |
| 1192 moveRangeSelection(base, extent); | 1192 moveRangeSelection(base, extent); |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 void WebLocalFrameImpl::selectRange(const WebRange& webRange) | 1195 void WebLocalFrameImpl::selectRange(const WebRange& webRange) |
| 1196 { | 1196 { |
| 1197 if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Ran
ge>>(webRange)) | 1197 if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Ran
ge>>(webRange)) |
| 1198 frame()->selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY,
FrameSelection::NonDirectional, NotUserTriggered); | 1198 frame()->selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY,
FrameSelection::NonDirectional, NotUserTriggered); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 void WebLocalFrameImpl::moveRangeSelectionExtent(const WebPoint& point, WebFrame
::TextGranularity granularity) | 1201 void WebLocalFrameImpl::moveRangeSelectionExtent(const WebPoint& point) |
| 1202 { | 1202 { |
| 1203 blink::TextGranularity blinkGranularity = blink::CharacterGranularity; | 1203 frame()->selection().moveRangeSelectionExtent(visiblePositionForWindowPoint(
point)); |
| 1204 if (granularity == WebFrame::WordGranularity) | |
| 1205 blinkGranularity = blink::WordGranularity; | |
| 1206 frame()->selection().moveRangeSelectionExtent(visiblePositionForWindowPoint(
point), blinkGranularity); | |
| 1207 } | 1204 } |
| 1208 | 1205 |
| 1209 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint&
extent, WebFrame::TextGranularity granularity) | 1206 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint&
extent, WebFrame::TextGranularity granularity) |
| 1210 { | 1207 { |
| 1211 blink::TextGranularity blinkGranularity = blink::CharacterGranularity; | 1208 blink::TextGranularity blinkGranularity = blink::CharacterGranularity; |
| 1212 if (granularity == WebFrame::WordGranularity) | 1209 if (granularity == WebFrame::WordGranularity) |
| 1213 blinkGranularity = blink::WordGranularity; | 1210 blinkGranularity = blink::WordGranularity; |
| 1214 frame()->selection().moveRangeSelection(visiblePositionForWindowPoint(base),
visiblePositionForWindowPoint(extent), blinkGranularity); | 1211 frame()->selection().moveRangeSelection(visiblePositionForWindowPoint(base),
visiblePositionForWindowPoint(extent), blinkGranularity); |
| 1215 } | 1212 } |
| 1216 | 1213 |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 { | 2003 { |
| 2007 m_frameWidget = frameWidget; | 2004 m_frameWidget = frameWidget; |
| 2008 } | 2005 } |
| 2009 | 2006 |
| 2010 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2007 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
| 2011 { | 2008 { |
| 2012 return m_frameWidget; | 2009 return m_frameWidget; |
| 2013 } | 2010 } |
| 2014 | 2011 |
| 2015 } // namespace blink | 2012 } // namespace blink |
| OLD | NEW |