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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp

Issue 2574793002: [Editing] Store |CommandSource| in |CompositeEditCommand| (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
index c881ff3af6613d00c293eb0867d4aaecdca30910..5db8402841073047b0990ea0ac99ef424b81ef36 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
@@ -125,10 +125,11 @@ static bool offsetIsBeforeLastNodeOffset(int offset, Node* anchorNode) {
}
ApplyStyleCommand::ApplyStyleCommand(Document& document,
+ CommandSource source,
const EditingStyle* style,
InputEvent::InputType inputType,
EPropertyLevel propertyLevel)
- : CompositeEditCommand(document),
+ : CompositeEditCommand(document, source),
m_style(style->copy()),
m_inputType(inputType),
m_propertyLevel(propertyLevel),
@@ -140,10 +141,11 @@ ApplyStyleCommand::ApplyStyleCommand(Document& document,
m_isInlineElementToRemoveFunction(0) {}
ApplyStyleCommand::ApplyStyleCommand(Document& document,
+ CommandSource source,
const EditingStyle* style,
const Position& start,
const Position& end)
- : CompositeEditCommand(document),
+ : CompositeEditCommand(document, source),
m_style(style->copy()),
m_inputType(InputEvent::InputType::None),
m_propertyLevel(PropertyDefault),
@@ -154,8 +156,10 @@ ApplyStyleCommand::ApplyStyleCommand(Document& document,
m_removeOnly(false),
m_isInlineElementToRemoveFunction(0) {}
-ApplyStyleCommand::ApplyStyleCommand(Element* element, bool removeOnly)
- : CompositeEditCommand(element->document()),
+ApplyStyleCommand::ApplyStyleCommand(CommandSource source,
+ Element* element,
+ bool removeOnly)
+ : CompositeEditCommand(element->document(), source),
m_style(EditingStyle::create()),
m_inputType(InputEvent::InputType::None),
m_propertyLevel(PropertyDefault),
@@ -168,10 +172,11 @@ ApplyStyleCommand::ApplyStyleCommand(Element* element, bool removeOnly)
ApplyStyleCommand::ApplyStyleCommand(
Document& document,
+ CommandSource source,
const EditingStyle* style,
IsInlineElementToRemoveFunction isInlineElementToRemoveFunction,
InputEvent::InputType inputType)
- : CompositeEditCommand(document),
+ : CompositeEditCommand(document, source),
m_style(style->copy()),
m_inputType(inputType),
m_propertyLevel(PropertyDefault),

Powered by Google App Engine
This is Rietveld 408576698