| 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, WebFrame
::TextGranularity granularity) |
| 1202 { | 1202 { |
| 1203 blink::TextGranularity blinkGranularity = blink::CharacterGranularity; | 1203 fprintf(stderr, "WebLocalFrameImpl::moveRangeSelectionExtent\n"); |
| 1204 if (granularity == WebFrame::WordGranularity) | 1204 // blink::TextGranularity blinkGranularity = blink::CharacterGranularity; |
| 1205 blinkGranularity = blink::WordGranularity; | 1205 // if (granularity == WebFrame::WordGranularity) |
| 1206 frame()->selection().moveRangeSelectionExtent(visiblePositionForWindowPoint(
point), blinkGranularity); | 1206 // blinkGranularity = blink::WordGranularity; |
| 1207 frame()->selection().moveRangeSelectionExtent(visiblePositionForWindowPoint(
point)); |
| 1207 } | 1208 } |
| 1208 | 1209 |
| 1209 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint&
extent, WebFrame::TextGranularity granularity) | 1210 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint&
extent, WebFrame::TextGranularity granularity) |
| 1210 { | 1211 { |
| 1212 fprintf(stderr, "WebLocalFrameImpl::moveRangeSelection\n"); |
| 1211 blink::TextGranularity blinkGranularity = blink::CharacterGranularity; | 1213 blink::TextGranularity blinkGranularity = blink::CharacterGranularity; |
| 1212 if (granularity == WebFrame::WordGranularity) | 1214 if (granularity == WebFrame::WordGranularity) |
| 1213 blinkGranularity = blink::WordGranularity; | 1215 blinkGranularity = blink::WordGranularity; |
| 1214 frame()->selection().moveRangeSelection(visiblePositionForWindowPoint(base),
visiblePositionForWindowPoint(extent), blinkGranularity); | 1216 frame()->selection().moveRangeSelection(visiblePositionForWindowPoint(base),
visiblePositionForWindowPoint(extent), blinkGranularity); |
| 1215 } | 1217 } |
| 1216 | 1218 |
| 1217 void WebLocalFrameImpl::moveCaretSelection(const WebPoint& point) | 1219 void WebLocalFrameImpl::moveCaretSelection(const WebPoint& point) |
| 1218 { | 1220 { |
| 1219 Element* editable = frame()->selection().rootEditableElement(); | 1221 Element* editable = frame()->selection().rootEditableElement(); |
| 1220 if (!editable) | 1222 if (!editable) |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 { | 2008 { |
| 2007 m_frameWidget = frameWidget; | 2009 m_frameWidget = frameWidget; |
| 2008 } | 2010 } |
| 2009 | 2011 |
| 2010 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2012 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
| 2011 { | 2013 { |
| 2012 return m_frameWidget; | 2014 return m_frameWidget; |
| 2013 } | 2015 } |
| 2014 | 2016 |
| 2015 } // namespace blink | 2017 } // namespace blink |
| OLD | NEW |