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 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1735 { | 1735 { |
1736 return node && node->layoutObject() && node->layoutObject()->style()->textSe curity() != TSNONE; | 1736 return node && node->layoutObject() && node->layoutObject()->style()->textSe curity() != TSNONE; |
1737 } | 1737 } |
1738 | 1738 |
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, nullptr); |
ojan
2016/05/31 17:47:29
Should this have a TODO to pass in the range?
chongz
2016/05/31 18:32:26
Added TODOs, current spec has not defined |getRang
| |
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, InputEvent::EventCancelable can celable) | 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 , cancelable, InputEvent::EventIsComposing::IsComposing); | 1755 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data , cancelable, InputEvent::EventIsComposing::IsComposing, nullptr); |
ojan
2016/05/31 17:47:29
Should this have a TODO to pass in the range?
chongz
2016/05/31 18:32:26
Done.
| |
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, const RangeVector* ranges) |
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, ranges); |
1766 return target->dispatchEvent(beforeInputEvent); | 1766 return target->dispatchEvent(beforeInputEvent); |
1767 } | 1767 } |
1768 | 1768 |
1769 } // namespace blink | 1769 } // namespace blink |
OLD | NEW |