Changeset 260855 in webkit
- Timestamp:
- Apr 28, 2020 4:37:20 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r260854 r260855 1 2020-04-28 Daniel Bates <dabates@apple.com> 2 3 Modernize EndPointsAdjustmentMode enumeration and fix misspelled enumerator 4 https://bugs.webkit.org/show_bug.cgi?id=211141 5 6 Reviewed by Eric Carlson. 7 8 Fix the misspelled enumerator DoNotAdjsutEndpoints. While I am here, make 9 EndPointsAdjustmentMode an enum class sized as a bool and simplify the naming 10 of its enumerators now that they have to be qualified. I also re-ordered them 11 so that DoNotAdjust is the first enumerator (it will have value 0). This doesn't 12 really matter, but I like it because it makes it so that this enumeration behaves 13 more like an equivalent boolean should casts be involved. 14 15 * editing/FrameSelection.cpp: 16 (WebCore::FrameSelection::setSelectionByMouseIfDifferent): 17 * editing/FrameSelection.h: 18 * page/EventHandler.cpp: 19 (WebCore::EventHandler::updateSelectionForMouseDrag): 20 1 21 2020-04-28 Daniel Bates <dabates@apple.com> 2 22 -
trunk/Source/WebCore/editing/FrameSelection.cpp
r260831 r260855 302 302 VisiblePosition extent = newSelection.visibleExtent(); 303 303 VisiblePosition newExtent = extent; 304 if (endpointsAdjustmentMode == AdjustEndpointsAtBidiBoundary)304 if (endpointsAdjustmentMode == EndPointsAdjustmentMode::AdjustAtBidiBoundary) 305 305 adjustEndpointsAtBidiBoundary(newBase, newExtent); 306 306 -
trunk/Source/WebCore/editing/FrameSelection.h
r260831 r260855 257 257 bool shouldChangeSelection(const VisibleSelection&) const; 258 258 bool shouldDeleteSelection(const VisibleSelection&) const; 259 enum EndPointsAdjustmentMode { AdjustEndpointsAtBidiBoundary, DoNotAdjsutEndpoints }; 260 void setSelectionByMouseIfDifferent(const VisibleSelection&, TextGranularity, EndPointsAdjustmentMode = DoNotAdjsutEndpoints); 259 260 enum class EndPointsAdjustmentMode : bool { DoNotAdjust, AdjustAtBidiBoundary }; 261 void setSelectionByMouseIfDifferent(const VisibleSelection&, TextGranularity, EndPointsAdjustmentMode = EndPointsAdjustmentMode::DoNotAdjust); 261 262 262 263 EditingStyle* typingStyle() const; -
trunk/Source/WebCore/page/EventHandler.cpp
r260753 r260855 1036 1036 1037 1037 m_frame.selection().setSelectionByMouseIfDifferent(newSelection, m_frame.selection().granularity(), 1038 FrameSelection:: AdjustEndpointsAtBidiBoundary);1038 FrameSelection::EndPointsAdjustmentMode::AdjustAtBidiBoundary); 1039 1039 } 1040 1040 #endif // ENABLE(DRAG_SUPPORT)
Note: See TracChangeset
for help on using the changeset viewer.