| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 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 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 DispatchEventResult dispatchBeforeInputInsertText(EventTarget* target, const Str
ing& data) | 1739 DispatchEventResult dispatchBeforeInputInsertText(EventTarget* target, const Str
ing& data) |
| 1740 { | 1740 { |
| 1741 if (!RuntimeEnabledFeatures::inputEventEnabled()) | 1741 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
| 1742 return DispatchEventResult::NotCanceled; | 1742 return DispatchEventResult::NotCanceled; |
| 1743 if (!target) | 1743 if (!target) |
| 1744 return DispatchEventResult::NotCanceled; | 1744 return DispatchEventResult::NotCanceled; |
| 1745 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::Inp
utType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent:
:EventIsComposing::NotComposing); | 1745 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::Inp
utType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent:
:EventIsComposing::NotComposing); |
| 1746 return target->dispatchEvent(beforeInputEvent); | 1746 return target->dispatchEvent(beforeInputEvent); |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 DispatchEventResult dispatchBeforeInputFromComposition(EventTarget* target, Inpu
tEvent::InputType inputType, const String& data) | 1749 DispatchEventResult dispatchBeforeInputFromComposition(EventTarget* target, Inpu
tEvent::InputType inputType, const String& data, InputEvent::EventCancelable can
celable) |
| 1750 { | 1750 { |
| 1751 if (!RuntimeEnabledFeatures::inputEventEnabled()) | 1751 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
| 1752 return DispatchEventResult::NotCanceled; | 1752 return DispatchEventResult::NotCanceled; |
| 1753 if (!target) | 1753 if (!target) |
| 1754 return DispatchEventResult::NotCanceled; | 1754 return DispatchEventResult::NotCanceled; |
| 1755 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, InputEvent::EventCancelable::NotCancelable, InputEvent::EventIsComposing::IsCo
mposing); | 1755 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, cancelable, InputEvent::EventIsComposing::IsComposing); |
| 1756 return target->dispatchEvent(beforeInputEvent); | 1756 return target->dispatchEvent(beforeInputEvent); |
| 1757 } | 1757 } |
| 1758 | 1758 |
| 1759 DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget* target, InputE
vent::InputType inputType, const String& data) | 1759 DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget* target, InputE
vent::InputType inputType, const String& data) |
| 1760 { | 1760 { |
| 1761 if (!RuntimeEnabledFeatures::inputEventEnabled()) | 1761 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
| 1762 return DispatchEventResult::NotCanceled; | 1762 return DispatchEventResult::NotCanceled; |
| 1763 if (!target) | 1763 if (!target) |
| 1764 return DispatchEventResult::NotCanceled; | 1764 return DispatchEventResult::NotCanceled; |
| 1765 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo
mposing); | 1765 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo
mposing); |
| 1766 return target->dispatchEvent(beforeInputEvent); | 1766 return target->dispatchEvent(beforeInputEvent); |
| 1767 } | 1767 } |
| 1768 | 1768 |
| 1769 } // namespace blink | 1769 } // namespace blink |
| OLD | NEW |