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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingUtilities.h

Issue 2618583003: [InputEvent] Add 'beforeinput' logic in |will*()| and guarded by a flag (3/11) (Closed)
Patch Set: Change target to |startingRootEditableElement()| Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Standard Annex #29, Unicode text segmentation[1]. 51 // Standard Annex #29, Unicode text segmentation[1].
52 // [1] http://www.unicode.org/reports/tr29/ 52 // [1] http://www.unicode.org/reports/tr29/
53 GraphemeCluster, 53 GraphemeCluster,
54 }; 54 };
55 55
56 enum class DeleteDirection { 56 enum class DeleteDirection {
57 Forward, 57 Forward,
58 Backward, 58 Backward,
59 }; 59 };
60 60
61 enum class EditCommandSource;
61 class CompositeEditCommand; 62 class CompositeEditCommand;
62 class Document; 63 class Document;
63 class Element; 64 class Element;
64 class HTMLElement; 65 class HTMLElement;
65 class HTMLSpanElement; 66 class HTMLSpanElement;
66 class Node; 67 class Node;
67 class Range; 68 class Range;
68 69
69 // This file contains a set of helper functions used by the editing commands 70 // This file contains a set of helper functions used by the editing commands
70 71
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 return character == '\'' || character == rightSingleQuotationMarkCharacter || 406 return character == '\'' || character == rightSingleQuotationMarkCharacter ||
406 character == hebrewPunctuationGershayimCharacter; 407 character == hebrewPunctuationGershayimCharacter;
407 } 408 }
408 409
409 String stringWithRebalancedWhitespace(const String&, 410 String stringWithRebalancedWhitespace(const String&,
410 bool startIsStartOfParagraph, 411 bool startIsStartOfParagraph,
411 bool shouldEmitNBSPbeforeEnd); 412 bool shouldEmitNBSPbeforeEnd);
412 const String& nonBreakingSpaceString(); 413 const String& nonBreakingSpaceString();
413 414
414 // ------------------------------------------------------------------------- 415 // -------------------------------------------------------------------------
415 // Events 416 // InputEvent
416 // ------------------------------------------------------------------------- 417 // -------------------------------------------------------------------------
417 418
418 // Functions dispatch InputEvent 419 // TODO(chongz): Remove the following 4 |dispatch*()|after we have moved all
420 // 'beforeinput' logic into |CompositeEditCommand.cpp|.
421 // https://crbug.com/670035
419 DispatchEventResult dispatchBeforeInputInsertText(EventTarget*, 422 DispatchEventResult dispatchBeforeInputInsertText(EventTarget*,
420 const String& data); 423 const String& data);
421 DispatchEventResult dispatchBeforeInputFromComposition( 424 DispatchEventResult dispatchBeforeInputFromComposition(
422 EventTarget*, 425 EventTarget*,
423 InputEvent::InputType, 426 InputEvent::InputType,
424 const String& data, 427 const String& data,
425 InputEvent::EventCancelable); 428 InputEvent::EventCancelable);
426 DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget*, 429 DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget*,
427 InputEvent::InputType, 430 InputEvent::InputType,
428 const RangeVector*); 431 const RangeVector*);
429 DispatchEventResult dispatchBeforeInputDataTransfer(EventTarget*, 432 DispatchEventResult dispatchBeforeInputDataTransfer(EventTarget*,
430 InputEvent::InputType, 433 InputEvent::InputType,
431 DataTransfer*, 434 DataTransfer*,
432 const RangeVector*); 435 const RangeVector*);
433 436
434 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, 437 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection,
435 TextGranularity); 438 TextGranularity);
436 439
437 // TODO(chongz): Move |isComposingFromCommand()| to 'CompositeEditCommand.cpp' 440 // TODO(chongz): Move |isComposingFromCommand()| to 'CompositeEditCommand.cpp'
438 // after we've moved |Editor::appliedEditing()| to 441 // after we've moved |Editor::appliedEditing()| to
439 // |CompositeEditCommand::appliedEditing()|. 442 // |CompositeEditCommand::appliedEditing()|.
440 // https://crbug.com/676001 443 // https://crbug.com/676001
441 InputEvent::EventIsComposing isComposingFromCommand( 444 InputEvent::EventIsComposing isComposingFromCommand(
442 const CompositeEditCommand*); 445 const CompositeEditCommand*);
443 446
447 // TODO(chongz): Move |dispatchBeforeInputEvent()| to 'CompositeEditCommand.cpp'
448 // after we've resolved the ordering issue WRT 'compositionupdate'.
449 // https://crbug.com/675820
450 bool dispatchBeforeInputEvent(EditCommandSource,
451 LocalFrame*,
452 Node* target,
453 InputEvent::InputType,
454 const String& data,
455 DataTransfer*,
456 InputEvent::EventCancelable,
457 InputEvent::EventIsComposing,
458 const RangeVector*);
459
444 } // namespace blink 460 } // namespace blink
445 461
446 #endif 462 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698