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

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

Issue 1998783002: [IME] Fire 'compositionend' after 'textInput' event and all other DOM updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK for empty text, fix ImeTest.java Created 4 years, 6 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698