Changeset 198904 in webkit
- Timestamp:
- Mar 31, 2016 11:50:55 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r198901 r198904 1 2016-03-31 Antonio Gomes <tonikitoo@webkit.org> 2 3 SelectionController::positionForPlatform should ask EditingBehavior for platform specific behavior 4 https://bugs.webkit.org/show_bug.cgi?id=41976 5 6 Reviewed by Darin Adler. 7 8 SSIA. 9 10 No new tests needed. 11 12 * editing/EditingBehavior.h: 13 (WebCore::EditingBehavior::shouldAlwaysExtendSelectionFromExtentEndpoint): 14 * editing/FrameSelection.cpp: 15 (WebCore::FrameSelection::positionForPlatform): 16 1 17 2016-03-31 Jeremy Jones <jeremyj@apple.com> 2 18 -
trunk/Source/WebCore/editing/EditingBehavior.h
r183138 r198904 92 92 bool shouldSelectBasedOnDictionaryLookup() const { return m_type == EditingMacBehavior; } 93 93 94 // Linux and Windows always extend selections from the extent endpoint. 95 bool shouldAlwaysExtendSelectionFromExtentEndpoint() const { return m_type != EditingMacBehavior && m_type != EditingIOSBehavior; } 96 94 97 private: 95 98 EditingBehaviorType m_type; -
trunk/Source/WebCore/editing/FrameSelection.cpp
r197024 r198904 621 621 VisiblePosition FrameSelection::positionForPlatform(bool isGetStart) const 622 622 { 623 if (m_frame && (m_frame->settings().editingBehaviorType() == EditingMacBehavior || m_frame->settings().editingBehaviorType() == EditingIOSBehavior))624 return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd();625 // Linux and Windows always extend selections from the extent endpoint.626 623 // FIXME: VisibleSelection should be fixed to ensure as an invariant that 627 624 // base/extent always point to the same nodes as start/end, but which points 628 625 // to which depends on the value of isBaseFirst. Then this can be changed 629 626 // to just return m_sel.extent(). 630 return m_selection.isBaseFirst() ? m_selection.visibleEnd() : m_selection.visibleStart(); 627 if (m_frame && m_frame->editor().behavior().shouldAlwaysExtendSelectionFromExtentEndpoint()) 628 return m_selection.isBaseFirst() ? m_selection.visibleEnd() : m_selection.visibleStart(); 629 630 return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd(); 631 631 } 632 632
Note: See TracChangeset
for help on using the changeset viewer.