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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.h

Issue 2627103003: [EditCommandSource] Pass source through |CompositeEditCommand| ctor instead of |apply(source)| (Closed)
Patch Set: Created 3 years, 11 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define ApplyBlockElementCommand_h 32 #define ApplyBlockElementCommand_h
33 33
34 #include "core/dom/QualifiedName.h" 34 #include "core/dom/QualifiedName.h"
35 #include "core/editing/commands/CompositeEditCommand.h" 35 #include "core/editing/commands/CompositeEditCommand.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class CORE_EXPORT ApplyBlockElementCommand : public CompositeEditCommand { 39 class CORE_EXPORT ApplyBlockElementCommand : public CompositeEditCommand {
40 protected: 40 protected:
41 ApplyBlockElementCommand(Document&, 41 ApplyBlockElementCommand(Document&,
42 EditCommandSource,
42 const QualifiedName& tagName, 43 const QualifiedName& tagName,
43 const AtomicString& inlineStyle); 44 const AtomicString& inlineStyle);
44 ApplyBlockElementCommand(Document&, const QualifiedName& tagName); 45 ApplyBlockElementCommand(Document&,
46 EditCommandSource,
47 const QualifiedName& tagName);
45 48
46 virtual void formatSelection(const VisiblePosition& startOfSelection, 49 virtual void formatSelection(const VisiblePosition& startOfSelection,
47 const VisiblePosition& endOfSelection, 50 const VisiblePosition& endOfSelection,
48 EditingState*); 51 EditingState*);
49 HTMLElement* createBlockElement() const; 52 HTMLElement* createBlockElement() const;
50 const QualifiedName& tagName() const { return m_tagName; } 53 const QualifiedName& tagName() const { return m_tagName; }
51 54
52 private: 55 private:
53 void doApply(EditingState*) final; 56 void doApply(EditingState*) final;
54 virtual void formatRange(const Position& start, 57 virtual void formatRange(const Position& start,
(...skipping 12 matching lines...) Expand all
67 Position& start, 70 Position& start,
68 Position& end); 71 Position& end);
69 72
70 QualifiedName m_tagName; 73 QualifiedName m_tagName;
71 AtomicString m_inlineStyle; 74 AtomicString m_inlineStyle;
72 }; 75 };
73 76
74 } // namespace blink 77 } // namespace blink
75 78
76 #endif 79 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698