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

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

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 frame().chromeClient().didCancelCompositionOnSelectionChange(); 239 frame().chromeClient().didCancelCompositionOnSelectionChange();
240 } 240 }
241 241
242 void InputMethodController::setComposition(const String& text, const Vector<Comp ositionUnderline>& underlines, int selectionStart, int selectionEnd) 242 void InputMethodController::setComposition(const String& text, const Vector<Comp ositionUnderline>& underlines, int selectionStart, int selectionEnd)
243 { 243 {
244 Editor::RevealSelectionScope revealSelectionScope(&editor()); 244 Editor::RevealSelectionScope revealSelectionScope(&editor());
245 245
246 // Updates styles before setting selection for composition to prevent 246 // Updates styles before setting selection for composition to prevent
247 // inserting the previous composition text into text nodes oddly. 247 // inserting the previous composition text into text nodes oddly.
248 // See https://bugs.webkit.org/show_bug.cgi?id=46868 248 // See https://bugs.webkit.org/show_bug.cgi?id=46868
249 frame().document()->updateLayoutTree(); 249 frame().document()->updateStyleAndLayoutTree();
250 250
251 selectComposition(); 251 selectComposition();
252 252
253 if (frame().selection().isNone()) 253 if (frame().selection().isNone())
254 return; 254 return;
255 255
256 if (Element* target = frame().document()->focusedElement()) { 256 if (Element* target = frame().document()->focusedElement()) {
257 // Dispatch an appropriate composition event to the focused node. 257 // Dispatch an appropriate composition event to the focused node.
258 // We check the composition status and choose an appropriate composition event since this 258 // We check the composition status and choose an appropriate composition event since this
259 // function is used for three purposes: 259 // function is used for three purposes:
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 TypingCommand::deleteSelection(*frame().document()); 489 TypingCommand::deleteSelection(*frame().document());
490 } 490 }
491 491
492 DEFINE_TRACE(InputMethodController) 492 DEFINE_TRACE(InputMethodController)
493 { 493 {
494 visitor->trace(m_frame); 494 visitor->trace(m_frame);
495 visitor->trace(m_compositionRange); 495 visitor->trace(m_compositionRange);
496 } 496 }
497 497
498 } // namespace blink 498 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698