OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 if (pluginContainer && pluginContainer->executeEditCommand(name)) | 1051 if (pluginContainer && pluginContainer->executeEditCommand(name)) |
1052 return true; | 1052 return true; |
1053 | 1053 |
1054 bool result = true; | 1054 bool result = true; |
1055 | 1055 |
1056 // Specially handling commands that Editor::execCommand does not directly | 1056 // Specially handling commands that Editor::execCommand does not directly |
1057 // support. | 1057 // support. |
1058 if (command == "DeleteToEndOfParagraph") { | 1058 if (command == "DeleteToEndOfParagraph") { |
1059 if (!frame()->editor().deleteWithDirection(DirectionForward, ParagraphBo
undary, true, false)) | 1059 if (!frame()->editor().deleteWithDirection(DirectionForward, ParagraphBo
undary, true, false)) |
1060 frame()->editor().deleteWithDirection(DirectionForward, CharacterGra
nularity, true, false); | 1060 frame()->editor().deleteWithDirection(DirectionForward, CharacterGra
nularity, true, false); |
1061 } else if (command == "Indent") { | |
1062 frame()->editor().indent(); | |
1063 } else if (command == "Outdent") { | |
1064 frame()->editor().outdent(); | |
1065 } else if (command == "DeleteBackward") { | 1061 } else if (command == "DeleteBackward") { |
1066 result = frame()->editor().command(AtomicString("BackwardDelete")).execu
te(); | 1062 result = frame()->editor().command(AtomicString("BackwardDelete")).execu
te(); |
1067 } else if (command == "DeleteForward") { | 1063 } else if (command == "DeleteForward") { |
1068 result = frame()->editor().command(AtomicString("ForwardDelete")).execut
e(); | 1064 result = frame()->editor().command(AtomicString("ForwardDelete")).execut
e(); |
1069 } else if (command == "AdvanceToNextMisspelling") { | 1065 } else if (command == "AdvanceToNextMisspelling") { |
1070 // Wee need to pass false here or else the currently selected word will
never be skipped. | 1066 // Wee need to pass false here or else the currently selected word will
never be skipped. |
1071 frame()->spellChecker().advanceToNextMisspelling(false); | 1067 frame()->spellChecker().advanceToNextMisspelling(false); |
1072 } else if (command == "ToggleSpellPanel") { | 1068 } else if (command == "ToggleSpellPanel") { |
1073 frame()->spellChecker().showSpellingGuessPanel(); | 1069 frame()->spellChecker().showSpellingGuessPanel(); |
1074 } else { | 1070 } else { |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1894 { | 1890 { |
1895 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host
, owner); | 1891 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host
, owner); |
1896 setWebCoreFrame(frame); | 1892 setWebCoreFrame(frame); |
1897 frame->tree().setName(name, fallbackName); | 1893 frame->tree().setName(name, fallbackName); |
1898 // May dispatch JS events; frame may be detached after this. | 1894 // May dispatch JS events; frame may be detached after this. |
1899 frame->init(); | 1895 frame->init(); |
1900 return frame; | 1896 return frame; |
1901 } | 1897 } |
1902 | 1898 |
1903 } // namespace blink | 1899 } // namespace blink |
OLD | NEW |