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

Unified Diff: Source/core/editing/ApplyStyleCommand.h

Issue 23822003: Have EditCommand classes deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/ApplyBlockElementCommand.cpp ('k') | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ApplyStyleCommand.h
diff --git a/Source/core/editing/ApplyStyleCommand.h b/Source/core/editing/ApplyStyleCommand.h
index 99d3490c57149c3496c8204062ed3dcc4dc07c03..46ed5b977afb30f47e2da5de0108de85da2e0250 100644
--- a/Source/core/editing/ApplyStyleCommand.h
+++ b/Source/core/editing/ApplyStyleCommand.h
@@ -48,11 +48,11 @@ public:
enum EAddStyledElement { AddStyledElement, DoNotAddStyledElement };
typedef bool (*IsInlineElementToRemoveFunction)(const Element*);
- static PassRefPtr<ApplyStyleCommand> create(Document* document, const EditingStyle* style, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
+ static PassRefPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
{
return adoptRef(new ApplyStyleCommand(document, style, action, level));
}
- static PassRefPtr<ApplyStyleCommand> create(Document* document, const EditingStyle* style, const Position& start, const Position& end, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
+ static PassRefPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, const Position& start, const Position& end, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
{
return adoptRef(new ApplyStyleCommand(document, style, start, end, action, level));
}
@@ -60,16 +60,16 @@ public:
{
return adoptRef(new ApplyStyleCommand(element, removeOnly, action));
}
- static PassRefPtr<ApplyStyleCommand> create(Document* document, const EditingStyle* style, IsInlineElementToRemoveFunction isInlineElementToRemoveFunction, EditAction action = EditActionChangeAttributes)
+ static PassRefPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, IsInlineElementToRemoveFunction isInlineElementToRemoveFunction, EditAction action = EditActionChangeAttributes)
{
return adoptRef(new ApplyStyleCommand(document, style, isInlineElementToRemoveFunction, action));
}
private:
- ApplyStyleCommand(Document*, const EditingStyle*, EditAction, EPropertyLevel);
- ApplyStyleCommand(Document*, const EditingStyle*, const Position& start, const Position& end, EditAction, EPropertyLevel);
+ ApplyStyleCommand(Document&, const EditingStyle*, EditAction, EPropertyLevel);
+ ApplyStyleCommand(Document&, const EditingStyle*, const Position& start, const Position& end, EditAction, EPropertyLevel);
ApplyStyleCommand(PassRefPtr<Element>, bool removeOnly, EditAction);
- ApplyStyleCommand(Document*, const EditingStyle*, bool (*isInlineElementToRemove)(const Element*), EditAction);
+ ApplyStyleCommand(Document&, const EditingStyle*, bool (*isInlineElementToRemove)(const Element*), EditAction);
virtual void doApply();
virtual EditAction editingAction() const;
« no previous file with comments | « Source/core/editing/ApplyBlockElementCommand.cpp ('k') | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698