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

Side by Side Diff: Source/core/editing/Editor.h

Issue 1097693003: queryCommandSupported() should return 'true' for cut/copy/paste editing commands (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
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 * 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 class CORE_EXPORT Command { 123 class CORE_EXPORT Command {
124 STACK_ALLOCATED(); 124 STACK_ALLOCATED();
125 public: 125 public:
126 Command(); 126 Command();
127 Command(const EditorInternalCommand*, EditorCommandSource, PassRefPtrWil lBeRawPtr<LocalFrame>); 127 Command(const EditorInternalCommand*, EditorCommandSource, PassRefPtrWil lBeRawPtr<LocalFrame>);
128 128
129 bool execute(const String& parameter = String(), Event* triggeringEvent = nullptr) const; 129 bool execute(const String& parameter = String(), Event* triggeringEvent = nullptr) const;
130 bool execute(Event* triggeringEvent) const; 130 bool execute(Event* triggeringEvent) const;
131 131
132 bool isSupported() const; 132 bool isSupported(bool enabled = false) const;
dcheng 2015/04/20 17:09:03 I don't really understand why we added this defaul
Abhijeet Kandalkar Slow 2015/04/21 14:14:33 current implementation of isSupported() check whet
133 bool isEnabled(Event* triggeringEvent = nullptr) const; 133 bool isEnabled(Event* triggeringEvent = nullptr) const;
134 134
135 TriState state(Event* triggeringEvent = nullptr) const; 135 TriState state(Event* triggeringEvent = nullptr) const;
136 String value(Event* triggeringEvent = nullptr) const; 136 String value(Event* triggeringEvent = nullptr) const;
137 137
138 bool isTextInsertion() const; 138 bool isTextInsertion() const;
139 139
140 // Returns 0 if this Command is not supported. 140 // Returns 0 if this Command is not supported.
141 int idForHistogram() const; 141 int idForHistogram() const;
142 private: 142 private:
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 inline bool Editor::markedTextMatchesAreHighlighted() const 301 inline bool Editor::markedTextMatchesAreHighlighted() const
302 { 302 {
303 return m_areMarkedTextMatchesHighlighted; 303 return m_areMarkedTextMatchesHighlighted;
304 } 304 }
305 305
306 306
307 } // namespace blink 307 } // namespace blink
308 308
309 #endif // Editor_h 309 #endif // Editor_h
OLDNEW
« no previous file with comments | « LayoutTests/editing/execCommand/overtype-support-expected.txt ('k') | Source/core/editing/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698