Changeset 148378 in webkit
- Timestamp:
- Apr 13, 2013 8:55:35 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148367 r148378 1 2013-04-13 Sukolsak Sakshuwong <sukolsak@gmail.com> 2 3 Selection direction is not preserved when applying styles 4 https://bugs.webkit.org/show_bug.cgi?id=110979 5 6 Reviewed by Ryosuke Niwa. 7 8 Add a test, based on the work by Shezan Baig 9 10 * editing/style/preserve-selection-direction-expected.txt: Added. 11 * editing/style/preserve-selection-direction.html: Added. 12 1 13 2013-03-04 Robert Hogan <robert@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r148377 r148378 1 2013-04-13 Sukolsak Sakshuwong <sukolsak@gmail.com> 2 3 Selection direction is not preserved when applying styles 4 https://bugs.webkit.org/show_bug.cgi?id=110979 5 6 Reviewed by Ryosuke Niwa. 7 8 The patch is based on the one submitted by Shezan Baig. 9 10 If the starting selection was directional and its base was not first, 11 switch newStart and newEnd when setting the ending direction. Otherwise, 12 leave the order unchanged. 13 14 Test: editing/style/preserve-selection-direction.html 15 16 * editing/ApplyStyleCommand.cpp: 17 (WebCore::ApplyStyleCommand::updateStartEnd): 18 1 19 2013-04-13 Alexey Proskuryakov <ap@apple.com> 2 20 -
trunk/Source/WebCore/editing/ApplyStyleCommand.cpp
r148365 r148378 185 185 m_useEndingSelection = true; 186 186 187 setEndingSelection(VisibleSelection(newStart, newEnd, VP_DEFAULT_AFFINITY, endingSelection().isDirectional())); 187 bool wasBaseFirst = startingSelection().isBaseFirst() || !startingSelection().isDirectional(); 188 setEndingSelection(VisibleSelection(wasBaseFirst ? newStart : newEnd, wasBaseFirst ? newEnd : newStart, VP_DEFAULT_AFFINITY, endingSelection().isDirectional())); 188 189 m_start = newStart; 189 190 m_end = newEnd;
Note: See TracChangeset
for help on using the changeset viewer.