Chromium Code Reviews| Index: Source/core/editing/commands/EditAction.h |
| diff --git a/Source/core/editing/TextAffinity.h b/Source/core/editing/commands/EditAction.h |
| similarity index 56% |
| copy from Source/core/editing/TextAffinity.h |
| copy to Source/core/editing/commands/EditAction.h |
| index d3effaa58d77f9fdcd71c3456b35b10488a1312c..4d2dcc988e5d2ddbb5a7f85f38d00039f4f11d35 100644 |
| --- a/Source/core/editing/TextAffinity.h |
| +++ b/Source/core/editing/commands/EditAction.h |
| @@ -23,35 +23,51 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef TextAffinity_h |
| -#define TextAffinity_h |
| - |
| -#ifdef __OBJC__ |
| -#include <AppKit/NSTextView.h> |
| -#endif |
| +#ifndef EditAction_h |
|
tkent
2015/08/17 09:58:11
This looses history.
|
| +#define EditAction_h |
| namespace blink { |
| - |
| -// These match the AppKit values for these concepts. |
| -// From NSTextView.h: |
| -// NSSelectionAffinityUpstream = 0 |
| -// NSSelectionAffinityDownstream = 1 |
| -enum EAffinity { UPSTREAM = 0, DOWNSTREAM = 1 }; |
| - |
| +enum EditAction { |
| + EditActionUnspecified, |
| + EditActionSetColor, |
| + EditActionSetBackgroundColor, |
| + EditActionTurnOffKerning, |
| + EditActionTightenKerning, |
| + EditActionLoosenKerning, |
| + EditActionUseStandardKerning, |
| + EditActionTurnOffLigatures, |
| + EditActionUseStandardLigatures, |
| + EditActionUseAllLigatures, |
| + EditActionRaiseBaseline, |
| + EditActionLowerBaseline, |
| + EditActionSetTraditionalCharacterShape, |
| + EditActionSetFont, |
| + EditActionChangeAttributes, |
| + EditActionAlignLeft, |
| + EditActionAlignRight, |
| + EditActionCenter, |
| + EditActionJustify, |
| + EditActionSetWritingDirection, |
| + EditActionSubscript, |
| + EditActionSuperscript, |
| + EditActionUnderline, |
| + EditActionOutline, |
| + EditActionUnscript, |
| + EditActionDrag, |
| + EditActionCut, |
| + EditActionBold, |
| + EditActionItalics, |
| + EditActionPaste, |
| + EditActionPasteFont, |
| + EditActionPasteRuler, |
| + EditActionTyping, |
| + EditActionCreateLink, |
| + EditActionUnlink, |
| + EditActionFormatBlock, |
| + EditActionInsertList, |
| + EditActionIndent, |
| + EditActionOutdent |
| +}; |
| } // namespace blink |
| -#ifdef __OBJC__ |
| - |
| -inline NSSelectionAffinity kit(blink::EAffinity affinity) |
| -{ |
| - return static_cast<NSSelectionAffinity>(affinity); |
| -} |
| - |
| -inline blink::EAffinity core(NSSelectionAffinity affinity) |
| -{ |
| - return static_cast<blink::EAffinity>(affinity); |
| -} |
| - |
| #endif |
| - |
| -#endif // TextAffinity_h |