OLD | NEW |
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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 } | 1057 } |
1058 | 1058 |
1059 static bool executeSetMark(LocalFrame& frame, Event*, EditorCommandSource, const
String&) | 1059 static bool executeSetMark(LocalFrame& frame, Event*, EditorCommandSource, const
String&) |
1060 { | 1060 { |
1061 frame.editor().setMark(frame.selection().selection()); | 1061 frame.editor().setMark(frame.selection().selection()); |
1062 return true; | 1062 return true; |
1063 } | 1063 } |
1064 | 1064 |
1065 static bool executeStrikethrough(LocalFrame& frame, Event*, EditorCommandSource
source, const String&) | 1065 static bool executeStrikethrough(LocalFrame& frame, Event*, EditorCommandSource
source, const String&) |
1066 { | 1066 { |
1067 RefPtrWillBeRawPtr<CSSPrimitiveValue> lineThrough = CSSPrimitiveValue::creat
eIdentifier(CSSValueLineThrough); | 1067 RefPtrWillBeRawPtr<CSSPrimitiveValue> lineThrough = CSSPrimitiveValue::creat
e(CSSValueLineThrough); |
1068 return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPrope
rtyWebkitTextDecorationsInEffect, lineThrough.get()); | 1068 return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPrope
rtyWebkitTextDecorationsInEffect, lineThrough.get()); |
1069 } | 1069 } |
1070 | 1070 |
1071 static bool executeStyleWithCSS(LocalFrame& frame, Event*, EditorCommandSource,
const String& value) | 1071 static bool executeStyleWithCSS(LocalFrame& frame, Event*, EditorCommandSource,
const String& value) |
1072 { | 1072 { |
1073 frame.editor().setShouldStyleWithCSS(!equalIgnoringCase(value, "false")); | 1073 frame.editor().setShouldStyleWithCSS(!equalIgnoringCase(value, "false")); |
1074 return true; | 1074 return true; |
1075 } | 1075 } |
1076 | 1076 |
1077 static bool executeUseCSS(LocalFrame& frame, Event*, EditorCommandSource, const
String& value) | 1077 static bool executeUseCSS(LocalFrame& frame, Event*, EditorCommandSource, const
String& value) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 } | 1112 } |
1113 | 1113 |
1114 static bool executeTranspose(LocalFrame& frame, Event*, EditorCommandSource, con
st String&) | 1114 static bool executeTranspose(LocalFrame& frame, Event*, EditorCommandSource, con
st String&) |
1115 { | 1115 { |
1116 frame.editor().transpose(); | 1116 frame.editor().transpose(); |
1117 return true; | 1117 return true; |
1118 } | 1118 } |
1119 | 1119 |
1120 static bool executeUnderline(LocalFrame& frame, Event*, EditorCommandSource sour
ce, const String&) | 1120 static bool executeUnderline(LocalFrame& frame, Event*, EditorCommandSource sour
ce, const String&) |
1121 { | 1121 { |
1122 RefPtrWillBeRawPtr<CSSPrimitiveValue> underline = CSSPrimitiveValue::createI
dentifier(CSSValueUnderline); | 1122 RefPtrWillBeRawPtr<CSSPrimitiveValue> underline = CSSPrimitiveValue::create(
CSSValueUnderline); |
1123 return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPrope
rtyWebkitTextDecorationsInEffect, underline.get()); | 1123 return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPrope
rtyWebkitTextDecorationsInEffect, underline.get()); |
1124 } | 1124 } |
1125 | 1125 |
1126 static bool executeUndo(LocalFrame& frame, Event*, EditorCommandSource, const St
ring&) | 1126 static bool executeUndo(LocalFrame& frame, Event*, EditorCommandSource, const St
ring&) |
1127 { | 1127 { |
1128 frame.editor().undo(); | 1128 frame.editor().undo(); |
1129 return true; | 1129 return true; |
1130 } | 1130 } |
1131 | 1131 |
1132 static bool executeUnlink(LocalFrame& frame, Event*, EditorCommandSource, const
String&) | 1132 static bool executeUnlink(LocalFrame& frame, Event*, EditorCommandSource, const
String&) |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1790 { | 1790 { |
1791 return m_command && m_command->isTextInsertion; | 1791 return m_command && m_command->isTextInsertion; |
1792 } | 1792 } |
1793 | 1793 |
1794 int Editor::Command::idForHistogram() const | 1794 int Editor::Command::idForHistogram() const |
1795 { | 1795 { |
1796 return isSupported() ? m_command->idForUserMetrics : 0; | 1796 return isSupported() ? m_command->idForUserMetrics : 0; |
1797 } | 1797 } |
1798 | 1798 |
1799 } // namespace blink | 1799 } // namespace blink |
OLD | NEW |