Commit d2b6e61e authored by xiaochengh's avatar xiaochengh Committed by Commit bot

Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in...

Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in InputMethodController::setCompositionFromExistingText

BUG=590369

Review-Url: https://codereview.chromium.org/2316963003
Cr-Commit-Position: refs/heads/master@{#417196}
parent f76be6c1
...@@ -428,9 +428,7 @@ void InputMethodController::setCompositionFromExistingText(const Vector<Composit ...@@ -428,9 +428,7 @@ void InputMethodController::setCompositionFromExistingText(const Vector<Composit
if (!editable) if (!editable)
return; return;
// TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited. DCHECK(!editable->document().needsLayoutTreeUpdate());
// see http://crbug.com/590369 for more details.
editable->document().updateStyleAndLayoutIgnorePendingStylesheets();
const EphemeralRange range = PlainTextRange(compositionStart, compositionEnd).createRange(*editable); const EphemeralRange range = PlainTextRange(compositionStart, compositionEnd).createRange(*editable);
if (range.isNull()) if (range.isNull())
......
...@@ -1239,6 +1239,10 @@ bool WebLocalFrameImpl::setCompositionFromExistingText(int compositionStart, int ...@@ -1239,6 +1239,10 @@ bool WebLocalFrameImpl::setCompositionFromExistingText(int compositionStart, int
if (compositionStart == compositionEnd) if (compositionStart == compositionEnd)
return true; return true;
// TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
// needs to be audited. See http://crbug.com/590369 for more details.
frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
inputMethodController.setCompositionFromExistingText(CompositionUnderlineVectorBuilder(underlines), compositionStart, compositionEnd); inputMethodController.setCompositionFromExistingText(CompositionUnderlineVectorBuilder(underlines), compositionStart, compositionEnd);
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment