| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 15 matching lines...) Expand all Loading... |
| 26 #ifndef SimplifyMarkupCommand_h | 26 #ifndef SimplifyMarkupCommand_h |
| 27 #define SimplifyMarkupCommand_h | 27 #define SimplifyMarkupCommand_h |
| 28 | 28 |
| 29 #include "core/editing/commands/CompositeEditCommand.h" | 29 #include "core/editing/commands/CompositeEditCommand.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 class SimplifyMarkupCommand final : public CompositeEditCommand { | 33 class SimplifyMarkupCommand final : public CompositeEditCommand { |
| 34 public: | 34 public: |
| 35 static SimplifyMarkupCommand* create(Document& document, | 35 static SimplifyMarkupCommand* create(Document& document, |
| 36 CommandSource source, |
| 36 Node* firstNode, | 37 Node* firstNode, |
| 37 Node* nodeAfterLast) { | 38 Node* nodeAfterLast) { |
| 38 return new SimplifyMarkupCommand(document, firstNode, nodeAfterLast); | 39 return new SimplifyMarkupCommand(document, source, firstNode, |
| 40 nodeAfterLast); |
| 39 } | 41 } |
| 40 | 42 |
| 41 DECLARE_VIRTUAL_TRACE(); | 43 DECLARE_VIRTUAL_TRACE(); |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 SimplifyMarkupCommand(Document&, Node* firstNode, Node* nodeAfterLast); | 46 SimplifyMarkupCommand(Document&, |
| 47 CommandSource, |
| 48 Node* firstNode, |
| 49 Node* nodeAfterLast); |
| 45 | 50 |
| 46 void doApply(EditingState*) override; | 51 void doApply(EditingState*) override; |
| 47 int pruneSubsequentAncestorsToRemove( | 52 int pruneSubsequentAncestorsToRemove( |
| 48 HeapVector<Member<ContainerNode>>& nodesToRemove, | 53 HeapVector<Member<ContainerNode>>& nodesToRemove, |
| 49 size_t startNodeIndex, | 54 size_t startNodeIndex, |
| 50 EditingState*); | 55 EditingState*); |
| 51 | 56 |
| 52 Member<Node> m_firstNode; | 57 Member<Node> m_firstNode; |
| 53 Member<Node> m_nodeAfterLast; | 58 Member<Node> m_nodeAfterLast; |
| 54 }; | 59 }; |
| 55 | 60 |
| 56 } // namespace blink | 61 } // namespace blink |
| 57 | 62 |
| 58 #endif // SimplifyMarkupCommand_h | 63 #endif // SimplifyMarkupCommand_h |
| OLD | NEW |