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

Unified Diff: Source/core/editing/DeleteSelectionCommand.cpp

Issue 23950006: Patch for proper re-setting of frame selection's typing style. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: modifying as per review comments Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/DeleteSelectionCommand.cpp
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
index 45c884ac4056d4b8b46223049b9b1ace96ecde6b..32425b88f64d867720f2105c8ea252cdf1d96462 100644
--- a/Source/core/editing/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/DeleteSelectionCommand.cpp
@@ -704,8 +704,11 @@ void DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows()
void DeleteSelectionCommand::calculateTypingStyleAfterDelete()
{
- if (!m_typingStyle)
+ // Clearing any previously set typing style and doing an early return.
+ if (!m_typingStyle) {
+ document().frame()->selection().clearTypingStyle();
return;
+ }
// Compute the difference between the style before the delete and the style now
// after the delete has been done. Set this style on the frame, so other editing
« no previous file with comments | « LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698