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

Unified Diff: Source/WebCore/editing/TypingCommand.cpp

Issue 13954003: Remove mail blockquote special case handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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/WebCore/editing/TypingCommand.cpp
diff --git a/Source/WebCore/editing/TypingCommand.cpp b/Source/WebCore/editing/TypingCommand.cpp
index 248b3c91121b42132a224d6993435b41804ee95d..b544f4907525c5c0c1892d846055c1d76c6a944e 100644
--- a/Source/WebCore/editing/TypingCommand.cpp
+++ b/Source/WebCore/editing/TypingCommand.cpp
@@ -210,17 +210,6 @@ void TypingCommand::insertLineBreak(Document *document, Options options)
applyCommand(TypingCommand::create(document, InsertLineBreak, "", options));
}
-void TypingCommand::insertParagraphSeparatorInQuotedContent(Document *document)
-{
- ASSERT(document);
- if (RefPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(document->frame())) {
- lastTypingCommand->insertParagraphSeparatorInQuotedContent();
- return;
- }
-
- applyCommand(TypingCommand::create(document, InsertParagraphSeparatorInQuotedContent));
-}
-
void TypingCommand::insertParagraphSeparator(Document *document, Options options)
{
ASSERT(document);
@@ -275,9 +264,6 @@ void TypingCommand::doApply()
case InsertParagraphSeparator:
insertParagraphSeparator();
return;
- case InsertParagraphSeparatorInQuotedContent:
- insertParagraphSeparatorInQuotedContent();
- return;
case InsertText:
insertText(m_textToInsert, m_selectInsertedText);
return;
@@ -320,7 +306,7 @@ void TypingCommand::markMisspellingsAfterTyping(ETypingCommand commandType)
if (p1 != p2) {
RefPtr<Range> range = makeRange(p1, p2);
String strippedPreviousWord;
- if (range && (commandType == TypingCommand::InsertText || commandType == TypingCommand::InsertLineBreak || commandType == TypingCommand::InsertParagraphSeparator || commandType == TypingCommand::InsertParagraphSeparatorInQuotedContent))
+ if (range && (commandType == TypingCommand::InsertText || commandType == TypingCommand::InsertLineBreak || commandType == TypingCommand::InsertParagraphSeparator))
strippedPreviousWord = plainText(range.get()).stripWhiteSpace();
frame->editor()->markMisspellingsAfterTypingToWord(p1, endingSelection(), !strippedPreviousWord.isEmpty());
} else if (commandType == TypingCommand::InsertText)
@@ -387,19 +373,6 @@ void TypingCommand::insertParagraphSeparator()
typingAddedToOpenCommand(InsertParagraphSeparator);
}
-void TypingCommand::insertParagraphSeparatorInQuotedContent()
-{
- // If the selection starts inside a table, just insert the paragraph separator normally
- // Breaking the blockquote would also break apart the table, which is unecessary when inserting a newline
- if (enclosingNodeOfType(endingSelection().start(), &isTableStructureNode)) {
- insertParagraphSeparator();
- return;
- }
-
- applyCommandToComposite(BreakBlockquoteCommand::create(document()));
- typingAddedToOpenCommand(InsertParagraphSeparatorInQuotedContent);
-}
-
bool TypingCommand::makeEditableRootEmpty()
{
Element* root = endingSelection().rootEditableElement();
@@ -438,11 +411,6 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing)
selectionAfterUndo = selectionToDelete;
break;
case VisibleSelection::CaretSelection: {
- // After breaking out of an empty mail blockquote, we still want continue with the deletion
- // so actual content will get deleted, and not just the quote style.
- if (breakOutOfEmptyMailBlockquotedParagraph())
- typingAddedToOpenCommand(DeleteKey);
-
m_smartDelete = false;
FrameSelection selection;
@@ -631,7 +599,6 @@ void TypingCommand::updatePreservesTypingStyle(ETypingCommand commandType)
case InsertLineBreak:
m_preservesTypingStyle = true;
return;
- case InsertParagraphSeparatorInQuotedContent:
case InsertText:
m_preservesTypingStyle = false;
return;

Powered by Google App Engine
This is Rietveld 408576698