OLD | NEW |
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 Loading... |
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; |
| 62 class CompositeEditCommand; |
61 class Document; | 63 class Document; |
62 class Element; | 64 class Element; |
63 class HTMLElement; | 65 class HTMLElement; |
64 class HTMLSpanElement; | 66 class HTMLSpanElement; |
65 class Node; | 67 class Node; |
66 class Range; | 68 class Range; |
67 | 69 |
68 // 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 |
69 | 71 |
70 CORE_EXPORT bool needsLayoutTreeUpdate(const Node&); | 72 CORE_EXPORT bool needsLayoutTreeUpdate(const Node&); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 return character == '\'' || character == rightSingleQuotationMarkCharacter || | 406 return character == '\'' || character == rightSingleQuotationMarkCharacter || |
405 character == hebrewPunctuationGershayimCharacter; | 407 character == hebrewPunctuationGershayimCharacter; |
406 } | 408 } |
407 | 409 |
408 String stringWithRebalancedWhitespace(const String&, | 410 String stringWithRebalancedWhitespace(const String&, |
409 bool startIsStartOfParagraph, | 411 bool startIsStartOfParagraph, |
410 bool shouldEmitNBSPbeforeEnd); | 412 bool shouldEmitNBSPbeforeEnd); |
411 const String& nonBreakingSpaceString(); | 413 const String& nonBreakingSpaceString(); |
412 | 414 |
413 // ------------------------------------------------------------------------- | 415 // ------------------------------------------------------------------------- |
414 // Events | 416 // InputEvent |
415 // ------------------------------------------------------------------------- | 417 // ------------------------------------------------------------------------- |
416 | 418 |
417 // Functions dispatch InputEvent | |
418 DispatchEventResult dispatchBeforeInputInsertText(EventTarget*, | |
419 const String& data); | |
420 DispatchEventResult dispatchBeforeInputFromComposition( | |
421 EventTarget*, | |
422 InputEvent::InputType, | |
423 const String& data, | |
424 InputEvent::EventCancelable); | |
425 DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget*, | |
426 InputEvent::InputType, | |
427 const RangeVector*); | |
428 DispatchEventResult dispatchBeforeInputDataTransfer(EventTarget*, | |
429 InputEvent::InputType, | |
430 DataTransfer*, | |
431 const RangeVector*); | |
432 | |
433 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, | 419 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, |
434 TextGranularity); | 420 TextGranularity); |
435 | 421 InputEvent::EventIsComposing isComposingFromCommand( |
| 422 const CompositeEditCommand*); |
| 423 InputEvent::EventCancelable isCancelableFromCommand( |
| 424 const CompositeEditCommand*); |
| 425 bool dispatchBeforeInputEvent(EditCommandSource, |
| 426 LocalFrame*, |
| 427 Node* target, |
| 428 InputEvent::InputType, |
| 429 const String& data, |
| 430 DataTransfer*, |
| 431 InputEvent::EventCancelable, |
| 432 InputEvent::EventIsComposing, |
| 433 const RangeVector*); |
436 } // namespace blink | 434 } // namespace blink |
437 | 435 |
438 #endif | 436 #endif |
OLD | NEW |