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/InsertListCommand.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/InsertListCommand.h')
-rw-r--r-- | WebCore/editing/InsertListCommand.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/WebCore/editing/InsertListCommand.h b/WebCore/editing/InsertListCommand.h index 8846248..e9a8da9 100644 --- a/WebCore/editing/InsertListCommand.h +++ b/WebCore/editing/InsertListCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 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 @@ -33,11 +33,22 @@ namespace WebCore { class InsertListCommand : public CompositeEditCommand { public: enum Type { OrderedList, UnorderedList }; + + static PassRefPtr<InsertListCommand> create(Document* document, Type listType, const String& listID) + { + return adoptRef(new InsertListCommand(document, listType, listID)); + } + static PassRefPtr<Node> insertList(Document*, Type); + + virtual bool preservesTypingStyle() const { return true; } + +private: InsertListCommand(Document*, Type, const String&); + virtual void doApply(); virtual EditAction editingAction() const { return EditActionInsertList; } -private: + Node* fixOrphanedListChild(Node*); bool modifyRange(); RefPtr<Node> m_listElement; |