diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/editing/EditCommand.h | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/editing/EditCommand.h')
-rw-r--r-- | WebCore/editing/EditCommand.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/WebCore/editing/EditCommand.h b/WebCore/editing/EditCommand.h index 8f4401c..78490f8 100644 --- a/WebCore/editing/EditCommand.h +++ b/WebCore/editing/EditCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -37,7 +37,6 @@ class CSSMutableStyleDeclaration; class EditCommand : public RefCounted<EditCommand> { public: - EditCommand(Document*); virtual ~EditCommand(); void setParent(CompositeEditCommand*); @@ -53,14 +52,15 @@ public: Element* startingRootEditableElement() const { return m_startingRootEditableElement.get(); } Element* endingRootEditableElement() const { return m_endingRootEditableElement.get(); } - - CSSMutableStyleDeclaration* typingStyle() const { return m_typingStyle.get(); }; - void setTypingStyle(PassRefPtr<CSSMutableStyleDeclaration>); virtual bool isInsertTextCommand() const; virtual bool isTypingCommand() const; + + virtual bool preservesTypingStyle() const; protected: + EditCommand(Document*); + Document* document() const { return m_document.get(); } void setStartingSelection(const Selection&); @@ -74,19 +74,21 @@ private: virtual void doUnapply() = 0; virtual void doReapply(); // calls doApply() - virtual bool preservesTypingStyle() const; - RefPtr<Document> m_document; Selection m_startingSelection; Selection m_endingSelection; RefPtr<Element> m_startingRootEditableElement; RefPtr<Element> m_endingRootEditableElement; - RefPtr<CSSMutableStyleDeclaration> m_typingStyle; CompositeEditCommand* m_parent; friend void applyCommand(PassRefPtr<EditCommand>); }; +class SimpleEditCommand : public EditCommand { +protected: + SimpleEditCommand(Document* document) : EditCommand(document) { } +}; + void applyCommand(PassRefPtr<EditCommand>); } // namespace WebCore |