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

Side by Side Diff: Source/WebCore/editing/EditorCommand.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2009 Igalia S.L. 4 * Copyright (C) 2009 Igalia S.L.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 ASSERT_NOT_REACHED(); 524 ASSERT_NOT_REACHED();
525 return false; 525 return false;
526 } 526 }
527 527
528 static bool executeInsertNewline(Frame* frame, Event* event, EditorCommandSource , const String&) 528 static bool executeInsertNewline(Frame* frame, Event* event, EditorCommandSource , const String&)
529 { 529 {
530 Frame* targetFrame = WebCore::targetFrame(frame, event); 530 Frame* targetFrame = WebCore::targetFrame(frame, event);
531 return targetFrame->eventHandler()->handleTextInputEvent("\n", event, target Frame->editor()->canEditRichly() ? TextEventInputKeyboard : TextEventInputLineBr eak); 531 return targetFrame->eventHandler()->handleTextInputEvent("\n", event, target Frame->editor()->canEditRichly() ? TextEventInputKeyboard : TextEventInputLineBr eak);
532 } 532 }
533 533
534 static bool executeInsertNewlineInQuotedContent(Frame* frame, Event*, EditorComm andSource, const String&)
535 {
536 TypingCommand::insertParagraphSeparatorInQuotedContent(frame->document());
537 return true;
538 }
539
540 static bool executeInsertOrderedList(Frame* frame, Event*, EditorCommandSource, const String&) 534 static bool executeInsertOrderedList(Frame* frame, Event*, EditorCommandSource, const String&)
541 { 535 {
542 applyCommand(InsertListCommand::create(frame->document(), InsertListCommand: :OrderedList)); 536 applyCommand(InsertListCommand::create(frame->document(), InsertListCommand: :OrderedList));
543 return true; 537 return true;
544 } 538 }
545 539
546 static bool executeInsertParagraph(Frame* frame, Event*, EditorCommandSource, co nst String&) 540 static bool executeInsertParagraph(Frame* frame, Event*, EditorCommandSource, co nst String&)
547 { 541 {
548 TypingCommand::insertParagraphSeparator(frame->document(), 0); 542 TypingCommand::insertParagraphSeparator(frame->document(), 0);
549 return true; 543 return true;
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 { "ForwardDelete", { executeForwardDelete, supported, enabledInEditableT ext, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } } , 1482 { "ForwardDelete", { executeForwardDelete, supported, enabledInEditableT ext, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } } ,
1489 { "HiliteColor", { executeBackColor, supported, enabledInRichlyEditableT ext, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } } , 1483 { "HiliteColor", { executeBackColor, supported, enabledInRichlyEditableT ext, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } } ,
1490 { "IgnoreSpelling", { executeIgnoreSpelling, supportedFromMenuOrKeyBindi ng, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExe cutionWhenDisabled } }, 1484 { "IgnoreSpelling", { executeIgnoreSpelling, supportedFromMenuOrKeyBindi ng, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExe cutionWhenDisabled } },
1491 { "Indent", { executeIndent, supported, enabledInRichlyEditableText, sta teNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1485 { "Indent", { executeIndent, supported, enabledInRichlyEditableText, sta teNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1492 { "InsertBacktab", { executeInsertBacktab, supportedFromMenuOrKeyBinding , enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecut ionWhenDisabled } }, 1486 { "InsertBacktab", { executeInsertBacktab, supportedFromMenuOrKeyBinding , enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecut ionWhenDisabled } },
1493 { "InsertHTML", { executeInsertHTML, supported, enabledInEditableText, s tateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1487 { "InsertHTML", { executeInsertHTML, supported, enabledInEditableText, s tateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1494 { "InsertHorizontalRule", { executeInsertHorizontalRule, supported, enab ledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecu tionWhenDisabled } }, 1488 { "InsertHorizontalRule", { executeInsertHorizontalRule, supported, enab ledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecu tionWhenDisabled } },
1495 { "InsertImage", { executeInsertImage, supported, enabledInRichlyEditabl eText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1489 { "InsertImage", { executeInsertImage, supported, enabledInRichlyEditabl eText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1496 { "InsertLineBreak", { executeInsertLineBreak, supported, enabledInEdita bleText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } }, 1490 { "InsertLineBreak", { executeInsertLineBreak, supported, enabledInEdita bleText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
1497 { "InsertNewline", { executeInsertNewline, supportedFromMenuOrKeyBinding , enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecut ionWhenDisabled } }, 1491 { "InsertNewline", { executeInsertNewline, supportedFromMenuOrKeyBinding , enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecut ionWhenDisabled } },
1498 { "InsertNewlineInQuotedContent", { executeInsertNewlineInQuotedContent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1499 { "InsertOrderedList", { executeInsertOrderedList, supported, enabledInR ichlyEditableText, stateOrderedList, valueNull, notTextInsertion, doNotAllowExec utionWhenDisabled } }, 1492 { "InsertOrderedList", { executeInsertOrderedList, supported, enabledInR ichlyEditableText, stateOrderedList, valueNull, notTextInsertion, doNotAllowExec utionWhenDisabled } },
1500 { "InsertParagraph", { executeInsertParagraph, supported, enabledInEdita bleText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1493 { "InsertParagraph", { executeInsertParagraph, supported, enabledInEdita bleText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
1501 { "InsertTab", { executeInsertTab, supportedFromMenuOrKeyBinding, enable dInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenD isabled } }, 1494 { "InsertTab", { executeInsertTab, supportedFromMenuOrKeyBinding, enable dInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenD isabled } },
1502 { "InsertText", { executeInsertText, supported, enabledInEditableText, s tateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } }, 1495 { "InsertText", { executeInsertText, supported, enabledInEditableText, s tateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
1503 { "InsertUnorderedList", { executeInsertUnorderedList, supported, enable dInRichlyEditableText, stateUnorderedList, valueNull, notTextInsertion, doNotAll owExecutionWhenDisabled } }, 1496 { "InsertUnorderedList", { executeInsertUnorderedList, supported, enable dInRichlyEditableText, stateUnorderedList, valueNull, notTextInsertion, doNotAll owExecutionWhenDisabled } },
1504 { "Italic", { executeToggleItalic, supported, enabledInRichlyEditableTex t, stateItalic, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } } , 1497 { "Italic", { executeToggleItalic, supported, enabledInRichlyEditableTex t, stateItalic, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } } ,
1505 { "JustifyCenter", { executeJustifyCenter, supported, enabledInRichlyEdi tableText, stateJustifyCenter, valueNull, notTextInsertion, doNotAllowExecutionW henDisabled } }, 1498 { "JustifyCenter", { executeJustifyCenter, supported, enabledInRichlyEdi tableText, stateJustifyCenter, valueNull, notTextInsertion, doNotAllowExecutionW henDisabled } },
1506 { "JustifyFull", { executeJustifyFull, supported, enabledInRichlyEditabl eText, stateJustifyFull, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } }, 1499 { "JustifyFull", { executeJustifyFull, supported, enabledInRichlyEditabl eText, stateJustifyFull, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } },
1507 { "JustifyLeft", { executeJustifyLeft, supported, enabledInRichlyEditabl eText, stateJustifyLeft, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } }, 1500 { "JustifyLeft", { executeJustifyLeft, supported, enabledInRichlyEditabl eText, stateJustifyLeft, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } },
1508 { "JustifyNone", { executeJustifyLeft, supported, enabledInRichlyEditabl eText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 1501 { "JustifyNone", { executeJustifyLeft, supported, enabledInRichlyEditabl eText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState ? "true" : "false"; 1741 return m_command->state(m_frame.get(), triggeringEvent) == TrueTriState ? "true" : "false";
1749 return m_command->value(m_frame.get(), triggeringEvent); 1742 return m_command->value(m_frame.get(), triggeringEvent);
1750 } 1743 }
1751 1744
1752 bool Editor::Command::isTextInsertion() const 1745 bool Editor::Command::isTextInsertion() const
1753 { 1746 {
1754 return m_command && m_command->isTextInsertion; 1747 return m_command && m_command->isTextInsertion;
1755 } 1748 }
1756 1749
1757 } // namespace WebCore 1750 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698