| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 void applyCommandToComposite(PassRefPtrWillBeRawPtr<CompositeEditCommand>, c
onst VisibleSelection&, EditingState* = ASSERT_NO_EDITING_ABORT); | 102 void applyCommandToComposite(PassRefPtrWillBeRawPtr<CompositeEditCommand>, c
onst VisibleSelection&, EditingState* = ASSERT_NO_EDITING_ABORT); |
| 103 void applyStyle(const EditingStyle*, EditingState*, EditAction = EditActionC
hangeAttributes); | 103 void applyStyle(const EditingStyle*, EditingState*, EditAction = EditActionC
hangeAttributes); |
| 104 void applyStyle(const EditingStyle*, const Position& start, const Position&
end, EditingState*, EditAction = EditActionChangeAttributes); | 104 void applyStyle(const EditingStyle*, const Position& start, const Position&
end, EditingState*, EditAction = EditActionChangeAttributes); |
| 105 void applyStyledElement(PassRefPtrWillBeRawPtr<Element>, EditingState*); | 105 void applyStyledElement(PassRefPtrWillBeRawPtr<Element>, EditingState*); |
| 106 void removeStyledElement(PassRefPtrWillBeRawPtr<Element>, EditingState*); | 106 void removeStyledElement(PassRefPtrWillBeRawPtr<Element>, EditingState*); |
| 107 void deleteSelection(EditingState*, bool smartDelete = false, bool mergeBloc
ksAfterDelete = true, bool expandForSpecialElements = true, bool sanitizeMarkup
= true); | 107 void deleteSelection(EditingState*, bool smartDelete = false, bool mergeBloc
ksAfterDelete = true, bool expandForSpecialElements = true, bool sanitizeMarkup
= true); |
| 108 void deleteSelection(const VisibleSelection&, EditingState*, bool smartDelet
e = false, bool mergeBlocksAfterDelete = true, bool expandForSpecialElements = t
rue, bool sanitizeMarkup = true); | 108 void deleteSelection(const VisibleSelection&, EditingState*, bool smartDelet
e = false, bool mergeBlocksAfterDelete = true, bool expandForSpecialElements = t
rue, bool sanitizeMarkup = true); |
| 109 virtual void deleteTextFromNode(PassRefPtrWillBeRawPtr<Text>, unsigned offse
t, unsigned count); | 109 virtual void deleteTextFromNode(PassRefPtrWillBeRawPtr<Text>, unsigned offse
t, unsigned count); |
| 110 bool isRemovableBlock(const Node*); | 110 bool isRemovableBlock(const Node*); |
| 111 void insertNodeAfter(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<No
de> refChild, EditingState*); | 111 void insertNodeAfter(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<No
de> refChild, EditingState*); |
| 112 void insertNodeAt(PassRefPtrWillBeRawPtr<Node>, const Position&, EditingStat
e* = ASSERT_NO_EDITING_ABORT); | 112 void insertNodeAt(PassRefPtrWillBeRawPtr<Node>, const Position&, EditingStat
e*); |
| 113 void insertNodeAtTabSpanPosition(PassRefPtrWillBeRawPtr<Node>, const Positio
n&); | 113 void insertNodeAtTabSpanPosition(PassRefPtrWillBeRawPtr<Node>, const Positio
n&, EditingState*); |
| 114 void insertNodeBefore(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<N
ode> refChild, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeC
ontentIsAlwaysEditable); | 114 void insertNodeBefore(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<N
ode> refChild, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeC
ontentIsAlwaysEditable); |
| 115 void insertParagraphSeparator(EditingState*, bool useDefaultParagraphElement
= false, bool pasteBlockqutoeIntoUnquotedArea = false); | 115 void insertParagraphSeparator(EditingState*, bool useDefaultParagraphElement
= false, bool pasteBlockqutoeIntoUnquotedArea = false); |
| 116 void insertTextIntoNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset, const
String& text); | 116 void insertTextIntoNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset, const
String& text); |
| 117 void mergeIdenticalElements(PassRefPtrWillBeRawPtr<Element>, PassRefPtrWillB
eRawPtr<Element>, EditingState*); | 117 void mergeIdenticalElements(PassRefPtrWillBeRawPtr<Element>, PassRefPtrWillB
eRawPtr<Element>, EditingState*); |
| 118 void rebalanceWhitespace(); | 118 void rebalanceWhitespace(); |
| 119 void rebalanceWhitespaceAt(const Position&); | 119 void rebalanceWhitespaceAt(const Position&); |
| 120 void rebalanceWhitespaceOnTextSubstring(PassRefPtrWillBeRawPtr<Text>, int st
artOffset, int endOffset); | 120 void rebalanceWhitespaceOnTextSubstring(PassRefPtrWillBeRawPtr<Text>, int st
artOffset, int endOffset); |
| 121 void prepareWhitespaceAtPositionForSplit(Position&); | 121 void prepareWhitespaceAtPositionForSplit(Position&); |
| 122 void replaceCollapsibleWhitespaceWithNonBreakingSpaceIfNeeded(const VisibleP
osition&); | 122 void replaceCollapsibleWhitespaceWithNonBreakingSpaceIfNeeded(const VisibleP
osition&); |
| 123 bool canRebalance(const Position&) const; | 123 bool canRebalance(const Position&) const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 140 void splitElement(PassRefPtrWillBeRawPtr<Element>, PassRefPtrWillBeRawPtr<No
de> atChild); | 140 void splitElement(PassRefPtrWillBeRawPtr<Element>, PassRefPtrWillBeRawPtr<No
de> atChild); |
| 141 void splitTextNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset); | 141 void splitTextNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset); |
| 142 void splitTextNodeContainingElement(PassRefPtrWillBeRawPtr<Text>, unsigned o
ffset); | 142 void splitTextNodeContainingElement(PassRefPtrWillBeRawPtr<Text>, unsigned o
ffset); |
| 143 void wrapContentsInDummySpan(PassRefPtrWillBeRawPtr<Element>); | 143 void wrapContentsInDummySpan(PassRefPtrWillBeRawPtr<Element>); |
| 144 | 144 |
| 145 void deleteInsignificantText(PassRefPtrWillBeRawPtr<Text>, unsigned start, u
nsigned end); | 145 void deleteInsignificantText(PassRefPtrWillBeRawPtr<Text>, unsigned start, u
nsigned end); |
| 146 void deleteInsignificantText(const Position& start, const Position& end); | 146 void deleteInsignificantText(const Position& start, const Position& end); |
| 147 void deleteInsignificantTextDownstream(const Position&); | 147 void deleteInsignificantTextDownstream(const Position&); |
| 148 | 148 |
| 149 PassRefPtrWillBeRawPtr<HTMLBRElement> appendBlockPlaceholder(PassRefPtrWillB
eRawPtr<Element>, EditingState*); | 149 PassRefPtrWillBeRawPtr<HTMLBRElement> appendBlockPlaceholder(PassRefPtrWillB
eRawPtr<Element>, EditingState*); |
| 150 PassRefPtrWillBeRawPtr<HTMLBRElement> insertBlockPlaceholder(const Position&
); | 150 PassRefPtrWillBeRawPtr<HTMLBRElement> insertBlockPlaceholder(const Position&
, EditingState*); |
| 151 PassRefPtrWillBeRawPtr<HTMLBRElement> addBlockPlaceholderIfNeeded(Element*,
EditingState*); | 151 PassRefPtrWillBeRawPtr<HTMLBRElement> addBlockPlaceholderIfNeeded(Element*,
EditingState*); |
| 152 void removePlaceholderAt(const Position&); | 152 void removePlaceholderAt(const Position&); |
| 153 | 153 |
| 154 PassRefPtrWillBeRawPtr<HTMLElement> insertNewDefaultParagraphElementAt(const
Position&); | 154 PassRefPtrWillBeRawPtr<HTMLElement> insertNewDefaultParagraphElementAt(const
Position&, EditingState*); |
| 155 | 155 |
| 156 PassRefPtrWillBeRawPtr<HTMLElement> moveParagraphContentsToNewBlockIfNecessa
ry(const Position&, EditingState*); | 156 PassRefPtrWillBeRawPtr<HTMLElement> moveParagraphContentsToNewBlockIfNecessa
ry(const Position&, EditingState*); |
| 157 | 157 |
| 158 void pushAnchorElementDown(Element*, EditingState*); | 158 void pushAnchorElementDown(Element*, EditingState*); |
| 159 | 159 |
| 160 // FIXME: preserveSelection and preserveStyle should be enums | 160 // FIXME: preserveSelection and preserveStyle should be enums |
| 161 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis
iblePosition&, EditingState*, bool preserveSelection = false, bool preserveStyle
= true, Node* constrainingAncestor = nullptr); | 161 void moveParagraph(const VisiblePosition&, const VisiblePosition&, const Vis
iblePosition&, EditingState*, bool preserveSelection = false, bool preserveStyle
= true, Node* constrainingAncestor = nullptr); |
| 162 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi
siblePosition&, EditingState*, bool preserveSelection = false, bool preserveStyl
e = true, Node* constrainingAncestor = nullptr); | 162 void moveParagraphs(const VisiblePosition&, const VisiblePosition&, const Vi
siblePosition&, EditingState*, bool preserveSelection = false, bool preserveStyl
e = true, Node* constrainingAncestor = nullptr); |
| 163 void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove,
const VisiblePosition& endOfParagraphToMove, HTMLElement* blockElement, Node* ou
terNode, EditingState*); | 163 void moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove,
const VisiblePosition& endOfParagraphToMove, HTMLElement* blockElement, Node* ou
terNode, EditingState*); |
| 164 void cloneParagraphUnderNewElement(const Position& start, const Position& en
d, Node* outerNode, Element* blockElement, EditingState*); | 164 void cloneParagraphUnderNewElement(const Position& start, const Position& en
d, Node* outerNode, Element* blockElement, EditingState*); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 177 bool isCompositeEditCommand() const final { return true; } | 177 bool isCompositeEditCommand() const final { return true; } |
| 178 | 178 |
| 179 RefPtrWillBeMember<EditCommandComposition> m_composition; | 179 RefPtrWillBeMember<EditCommandComposition> m_composition; |
| 180 }; | 180 }; |
| 181 | 181 |
| 182 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi
teEditCommand(), command.isCompositeEditCommand()); | 182 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi
teEditCommand(), command.isCompositeEditCommand()); |
| 183 | 183 |
| 184 } // namespace blink | 184 } // namespace blink |
| 185 | 185 |
| 186 #endif // CompositeEditCommand_h | 186 #endif // CompositeEditCommand_h |
| OLD | NEW |