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

Unified Diff: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp

Issue 2594313002: Update layout after TypingCommand::willAddTypingToOpenCommand (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
index c7c0ecd59787bc4b6e651bf237664260cad014a9..85fbcce80f3d152ca099a2db1a65105d949a1e3a 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -201,6 +201,11 @@ void TypingCommand::deleteSelection(Document& document,
if (!lastTypingCommand->willAddTypingToOpenCommand(
source, InputEvent::InputType::DeleteContentBackward))
return;
+
+ // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+
// InputMethodController uses this function to delete composition
// selection. It won't be aborted.
lastTypingCommand->deleteSelection(options & SmartDelete,
@@ -230,6 +235,12 @@ void TypingCommand::deleteKeyPressed(Document& document,
if (!lastTypingCommand->willAddTypingToOpenCommand(
source, InputEvent::InputType::DeleteContentBackward))
return;
+
+ // TODO(editing-dev): The use of
+ // updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
+ // See http://crbug.com/590369 for more details.
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+
EditingState editingState;
lastTypingCommand->deleteKeyPressed(granularity, options & KillRing,
&editingState);
@@ -259,6 +270,11 @@ void TypingCommand::forwardDeleteKeyPressed(Document& document,
if (!lastTypingCommand->willAddTypingToOpenCommand(
source, InputEvent::InputType::DeleteContentForward))
return;
+
+ // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+
lastTypingCommand->forwardDeleteKeyPressed(
granularity, options & KillRing, editingState);
return;
@@ -379,6 +395,11 @@ void TypingCommand::insertText(Document& document,
if (!lastTypingCommand->willAddTypingToOpenCommand(
source, InputEvent::InputType::InsertText, newText))
return;
+
+ // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+
EditingState editingState;
lastTypingCommand->insertText(newText, options & SelectInsertedText,
&editingState);
@@ -433,6 +454,11 @@ bool TypingCommand::insertLineBreak(Document& document,
if (!lastTypingCommand->willAddTypingToOpenCommand(
source, InputEvent::InputType::InsertLineBreak))
return false;
+
+ // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+
EditingState editingState;
lastTypingCommand->insertLineBreak(&editingState);
return !editingState.isAborted();
@@ -449,6 +475,11 @@ bool TypingCommand::insertParagraphSeparatorInQuotedContent(
if (!lastTypingCommand->willAddTypingToOpenCommand(
source, InputEvent::InputType::InsertParagraph))
return false;
+
+ // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+
EditingState editingState;
lastTypingCommand->insertParagraphSeparatorInQuotedContent(&editingState);
return !editingState.isAborted();
@@ -467,6 +498,11 @@ bool TypingCommand::insertParagraphSeparator(Document& document,
if (!lastTypingCommand->willAddTypingToOpenCommand(
source, InputEvent::InputType::InsertParagraph))
return false;
+
+ // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document.updateStyleAndLayoutIgnorePendingStylesheets();
+
EditingState editingState;
lastTypingCommand->insertParagraphSeparator(&editingState);
return !editingState.isAborted();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698