OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // just removed one, then this assumption isn't true. By splitting the n
ext containing blockquote after this node, we keep this assumption true | 194 // just removed one, then this assumption isn't true. By splitting the n
ext containing blockquote after this node, we keep this assumption true |
195 if (splitPoint) { | 195 if (splitPoint) { |
196 if (Element* splitPointParent = splitPoint->parentElement()) { | 196 if (Element* splitPointParent = splitPoint->parentElement()) { |
197 if (splitPointParent->hasTagName(blockquoteTag) | 197 if (splitPointParent->hasTagName(blockquoteTag) |
198 && !splitPoint->hasTagName(blockquoteTag) | 198 && !splitPoint->hasTagName(blockquoteTag) |
199 && splitPointParent->parentNode()->hasEditableStyle()) // We
can't outdent if there is no place to go! | 199 && splitPointParent->parentNode()->hasEditableStyle()) // We
can't outdent if there is no place to go! |
200 splitElement(splitPointParent, splitPoint); | 200 splitElement(splitPointParent, splitPoint); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 document().updateLayoutIgnorePendingStylesheets(); | 204 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
205 visibleStartOfParagraph = createVisiblePosition(visibleStartOfParagraph.
deepEquivalent()); | 205 visibleStartOfParagraph = createVisiblePosition(visibleStartOfParagraph.
deepEquivalent()); |
206 visibleEndOfParagraph = createVisiblePosition(visibleEndOfParagraph.deep
Equivalent()); | 206 visibleEndOfParagraph = createVisiblePosition(visibleEndOfParagraph.deep
Equivalent()); |
207 if (visibleStartOfParagraph.isNotNull() && !isStartOfParagraph(visibleSt
artOfParagraph)) { | 207 if (visibleStartOfParagraph.isNotNull() && !isStartOfParagraph(visibleSt
artOfParagraph)) { |
208 insertNodeAt(HTMLBRElement::create(document()), visibleStartOfParagr
aph.deepEquivalent(), editingState); | 208 insertNodeAt(HTMLBRElement::create(document()), visibleStartOfParagr
aph.deepEquivalent(), editingState); |
209 if (editingState->isAborted()) | 209 if (editingState->isAborted()) |
210 return; | 210 return; |
211 } | 211 } |
212 if (visibleEndOfParagraph.isNotNull() && !isEndOfParagraph(visibleEndOfP
aragraph)) | 212 if (visibleEndOfParagraph.isNotNull() && !isEndOfParagraph(visibleEndOfP
aragraph)) |
213 insertNodeAt(HTMLBRElement::create(document()), visibleEndOfParagrap
h.deepEquivalent(), editingState); | 213 insertNodeAt(HTMLBRElement::create(document()), visibleEndOfParagrap
h.deepEquivalent(), editingState); |
214 return; | 214 return; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 bool indentingAsListItemResult = tryIndentingAsListItem(start, end, editingS
tate); | 286 bool indentingAsListItemResult = tryIndentingAsListItem(start, end, editingS
tate); |
287 if (editingState->isAborted()) | 287 if (editingState->isAborted()) |
288 return; | 288 return; |
289 if (indentingAsListItemResult) | 289 if (indentingAsListItemResult) |
290 blockquoteForNextIndent = nullptr; | 290 blockquoteForNextIndent = nullptr; |
291 else | 291 else |
292 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState); | 292 indentIntoBlockquote(start, end, blockquoteForNextIndent, editingState); |
293 } | 293 } |
294 | 294 |
295 } // namespace blink | 295 } // namespace blink |
OLD | NEW |