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

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

Issue 2393903003: [LayoutTest] Fix flakey test "inputevent-drag-drop.html" (Closed)
Patch Set: Clear composition after merging with command wrapper Created 4 years, 2 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) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 command->setEndingSelection(selection); 293 command->setEndingSelection(selection);
294 } 294 }
295 command->doApply(editingState); 295 command->doApply(editingState);
296 if (!editingState->isAborted()) 296 if (!editingState->isAborted())
297 m_commands.append(command); 297 m_commands.append(command);
298 } 298 }
299 299
300 void CompositeEditCommand::appendCommandToComposite( 300 void CompositeEditCommand::appendCommandToComposite(
301 CompositeEditCommand* command) { 301 CompositeEditCommand* command) {
302 ensureComposition()->append(command->ensureComposition()); 302 ensureComposition()->append(command->ensureComposition());
303 command->m_composition = nullptr;
yosin_UTC9 2016/10/06 01:22:09 This is right place to fix. I hit DCHECK(isTopLeve
303 command->setParent(this); 304 command->setParent(this);
304 m_commands.append(command); 305 m_commands.append(command);
305 } 306 }
306 307
307 void CompositeEditCommand::applyStyle(const EditingStyle* style, 308 void CompositeEditCommand::applyStyle(const EditingStyle* style,
308 EditingState* editingState) { 309 EditingState* editingState) {
309 applyCommandToComposite( 310 applyCommandToComposite(
310 ApplyStyleCommand::create(document(), style, 311 ApplyStyleCommand::create(document(), style,
311 InputEvent::InputType::ChangeAttributes), 312 InputEvent::InputType::ChangeAttributes),
312 editingState); 313 editingState);
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 return node; 1942 return node;
1942 } 1943 }
1943 1944
1944 DEFINE_TRACE(CompositeEditCommand) { 1945 DEFINE_TRACE(CompositeEditCommand) {
1945 visitor->trace(m_commands); 1946 visitor->trace(m_commands);
1946 visitor->trace(m_composition); 1947 visitor->trace(m_composition);
1947 EditCommand::trace(visitor); 1948 EditCommand::trace(visitor);
1948 } 1949 }
1949 1950
1950 } // namespace blink 1951 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698