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

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: 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
Index: Source/core/editing/DeleteSelectionCommand.cpp
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
index cf7b3be70ed4e148722ad027425de707d9f3dd0d..506a96b3bad7f59a462c53acc0613c8eecb93835 100644
--- a/Source/core/editing/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/DeleteSelectionCommand.cpp
@@ -285,8 +285,10 @@ void DeleteSelectionCommand::saveTypingStyleState()
// typing style at the start of the selection, nor is there a reason to
// compute the style at the start of the selection after deletion (see the
// early return in calculateTypingStyleAfterDelete).
yosin_UTC9 2013/09/06 08:10:16 We should update this comment.
- if (m_upstreamStart.deprecatedNode() == m_downstreamEnd.deprecatedNode() && m_upstreamStart.deprecatedNode()->isTextNode())
+ if (m_upstreamStart.deprecatedNode() == m_downstreamEnd.deprecatedNode() && m_upstreamStart.deprecatedNode()->isTextNode()) {
+ document()->frame()->selection()->clearTypingStyle();
yosin_UTC9 2013/09/06 08:10:16 nit: It seems you are working on old source code.
yosin_UTC9 2013/09/06 08:10:16 Should we call clearTypingStyle() in calculateTypi
arpitab_ 2013/09/06 14:01:32 My bad! Have made the appropriate change in the ne
arpitab_ 2013/09/06 14:01:32 Yes! Although I don't see much difference between
return;
+ }
if (shouldNotInheritStyleFrom(*m_selectionToDelete.start().anchorNode()))
return;

Powered by Google App Engine
This is Rietveld 408576698