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

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

Issue 2117543003: [InputEvent] Fill |data| field for 'input' event InsertText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed |dataFromCommand()| helper function Created 4 years, 5 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) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 EventQueueScope scope; 745 EventQueueScope scope;
746 frame().document()->updateStyleAndLayout(); 746 frame().document()->updateStyleAndLayout();
747 747
748 // Request spell checking after pasting before any further DOM change. 748 // Request spell checking after pasting before any further DOM change.
749 requestSpellcheckingAfterApplyingCommand(cmd); 749 requestSpellcheckingAfterApplyingCommand(cmd);
750 750
751 EditCommandComposition* composition = cmd->composition(); 751 EditCommandComposition* composition = cmd->composition();
752 DCHECK(composition); 752 DCHECK(composition);
753 dispatchEditableContentChangedEvents(composition->startingRootEditableElemen t(), composition->endingRootEditableElement()); 753 dispatchEditableContentChangedEvents(composition->startingRootEditableElemen t(), composition->endingRootEditableElement());
754 // TODO(chongz): Filter empty InputType after spec is finalized. 754 // TODO(chongz): Filter empty InputType after spec is finalized.
755 // TODO(chongz): Fill in |data| field. 755 dispatchInputEventEditableContentChanged(composition->startingRootEditableEl ement(), composition->endingRootEditableElement(), inputTypeFromCommand(cmd), cm d->textDataForInputEvent(), isComposingFromCommand(cmd));
756 dispatchInputEventEditableContentChanged(composition->startingRootEditableEl ement(), composition->endingRootEditableElement(), inputTypeFromCommand(cmd), em ptyString(), isComposingFromCommand(cmd));
757 VisibleSelection newSelection(cmd->endingSelection()); 756 VisibleSelection newSelection(cmd->endingSelection());
758 757
759 // Don't clear the typing style with this selection change. We do those thin gs elsewhere if necessary. 758 // Don't clear the typing style with this selection change. We do those thin gs elsewhere if necessary.
760 changeSelectionAfterCommand(newSelection, 0); 759 changeSelectionAfterCommand(newSelection, 0);
761 760
762 if (!cmd->preservesTypingStyle()) 761 if (!cmd->preservesTypingStyle())
763 frame().selection().clearTypingStyle(); 762 frame().selection().clearTypingStyle();
764 763
765 // Command will be equal to last edit command only in the case of typing 764 // Command will be equal to last edit command only in the case of typing
766 if (m_lastEditCommand.get() == cmd) { 765 if (m_lastEditCommand.get() == cmd) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 1423
1425 DEFINE_TRACE(Editor) 1424 DEFINE_TRACE(Editor)
1426 { 1425 {
1427 visitor->trace(m_frame); 1426 visitor->trace(m_frame);
1428 visitor->trace(m_lastEditCommand); 1427 visitor->trace(m_lastEditCommand);
1429 visitor->trace(m_undoStack); 1428 visitor->trace(m_undoStack);
1430 visitor->trace(m_mark); 1429 visitor->trace(m_mark);
1431 } 1430 }
1432 1431
1433 } // namespace blink 1432 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698