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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 return character == '\'' || character == rightSingleQuotationMarkCharacter || | 411 return character == '\'' || character == rightSingleQuotationMarkCharacter || |
412 character == hebrewPunctuationGershayimCharacter; | 412 character == hebrewPunctuationGershayimCharacter; |
413 } | 413 } |
414 | 414 |
415 String stringWithRebalancedWhitespace(const String&, | 415 String stringWithRebalancedWhitespace(const String&, |
416 bool startIsStartOfParagraph, | 416 bool startIsStartOfParagraph, |
417 bool shouldEmitNBSPbeforeEnd); | 417 bool shouldEmitNBSPbeforeEnd); |
418 const String& nonBreakingSpaceString(); | 418 const String& nonBreakingSpaceString(); |
419 | 419 |
420 // ------------------------------------------------------------------------- | 420 // ------------------------------------------------------------------------- |
| 421 // Distance calculation functions |
| 422 // ------------------------------------------------------------------------- |
| 423 |
| 424 // If current position is at grapheme boundary, return 0; otherwise, return the |
| 425 // distance to its nearest left grapheme boundary. |
| 426 size_t computeDistanceToLeftGraphemeBoundary(const Position&); |
| 427 |
| 428 // If current position is at grapheme boundary, return 0; otherwise, return the |
| 429 // distance to its nearest right grapheme boundary. |
| 430 size_t computeDistanceToRightGraphemeBoundary(const Position&); |
| 431 |
| 432 // ------------------------------------------------------------------------- |
421 // Events | 433 // Events |
422 // ------------------------------------------------------------------------- | 434 // ------------------------------------------------------------------------- |
423 | 435 |
424 // Functions dispatch InputEvent | 436 // Functions dispatch InputEvent |
425 const StaticRangeVector* targetRangesForInputEvent(const Node&); | 437 const StaticRangeVector* targetRangesForInputEvent(const Node&); |
426 DispatchEventResult dispatchBeforeInputInsertText( | 438 DispatchEventResult dispatchBeforeInputInsertText( |
427 Node*, | 439 Node*, |
428 const String& data, | 440 const String& data, |
429 InputEvent::InputType = InputEvent::InputType::InsertText); | 441 InputEvent::InputType = InputEvent::InputType::InsertText); |
430 DispatchEventResult dispatchBeforeInputEditorCommand(Node*, | 442 DispatchEventResult dispatchBeforeInputEditorCommand(Node*, |
431 InputEvent::InputType, | 443 InputEvent::InputType, |
432 const StaticRangeVector*); | 444 const StaticRangeVector*); |
433 DispatchEventResult dispatchBeforeInputDataTransfer(Node*, | 445 DispatchEventResult dispatchBeforeInputDataTransfer(Node*, |
434 InputEvent::InputType, | 446 InputEvent::InputType, |
435 DataTransfer*); | 447 DataTransfer*); |
436 | 448 |
437 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, | 449 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, |
438 TextGranularity); | 450 TextGranularity); |
439 | 451 |
440 } // namespace blink | 452 } // namespace blink |
441 | 453 |
442 #endif | 454 #endif |
OLD | NEW |