Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2777863003: [InputEvent] Distinguish between soft line and hard line (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index 8c1b3c10ec0da89f302771a119acb2a59edbc9c7..d80b097f2ef360fb6bab02dcc167679a08c6e8d8 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -92,8 +92,10 @@ InputEvent::EventCancelable inputTypeIsCancelable(
case InputType::InsertReplacementText:
case InputType::DeleteWordBackward:
case InputType::DeleteWordForward:
- case InputType::DeleteLineBackward:
- case InputType::DeleteLineForward:
+ case InputType::DeleteSoftLineBackward:
+ case InputType::DeleteSoftLineForward:
+ case InputType::DeleteHardLineBackward:
+ case InputType::DeleteHardLineForward:
case InputType::DeleteContentBackward:
case InputType::DeleteContentForward:
return InputEvent::EventCancelable::NotCancelable;
@@ -2136,13 +2138,17 @@ InputEvent::InputType deletionInputTypeFromTextGranularity(
if (granularity == WordGranularity)
return InputType::DeleteWordForward;
if (granularity == LineBoundary)
- return InputType::DeleteLineForward;
+ return InputType::DeleteSoftLineForward;
+ if (granularity == ParagraphBoundary)
+ return InputType::DeleteHardLineForward;
return InputType::DeleteContentForward;
case DeleteDirection::Backward:
if (granularity == WordGranularity)
return InputType::DeleteWordBackward;
if (granularity == LineBoundary)
- return InputType::DeleteLineBackward;
+ return InputType::DeleteSoftLineBackward;
+ if (granularity == ParagraphBoundary)
+ return InputType::DeleteHardLineBackward;
return InputType::DeleteContentBackward;
default:
return InputType::None;

Powered by Google App Engine
This is Rietveld 408576698