| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 InsertNodeBefore(placeholder, split_blockquote_node, editing_state); | 326 InsertNodeBefore(placeholder, split_blockquote_node, editing_state); |
| 327 if (editing_state->IsAborted()) | 327 if (editing_state->IsAborted()) |
| 328 return; | 328 return; |
| 329 | 329 |
| 330 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 330 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
| 331 start_of_paragraph_to_move = CreateVisiblePosition( | 331 start_of_paragraph_to_move = CreateVisiblePosition( |
| 332 start_of_paragraph_to_move.ToPositionWithAffinity()); | 332 start_of_paragraph_to_move.ToPositionWithAffinity()); |
| 333 end_of_paragraph_to_move = | 333 end_of_paragraph_to_move = |
| 334 CreateVisiblePosition(end_of_paragraph_to_move.ToPositionWithAffinity()); | 334 CreateVisiblePosition(end_of_paragraph_to_move.ToPositionWithAffinity()); |
| 335 MoveParagraph(start_of_paragraph_to_move, end_of_paragraph_to_move, | 335 MoveParagraph(start_of_paragraph_to_move, end_of_paragraph_to_move, |
| 336 VisiblePosition::BeforeNode(placeholder), editing_state, | 336 VisiblePosition::BeforeNode(*placeholder), editing_state, |
| 337 kPreserveSelection); | 337 kPreserveSelection); |
| 338 } | 338 } |
| 339 | 339 |
| 340 // FIXME: We should merge this function with | 340 // FIXME: We should merge this function with |
| 341 // ApplyBlockElementCommand::formatSelection | 341 // ApplyBlockElementCommand::formatSelection |
| 342 void IndentOutdentCommand::OutdentRegion( | 342 void IndentOutdentCommand::OutdentRegion( |
| 343 const VisiblePosition& start_of_selection, | 343 const VisiblePosition& start_of_selection, |
| 344 const VisiblePosition& end_of_selection, | 344 const VisiblePosition& end_of_selection, |
| 345 EditingState* editing_state) { | 345 EditingState* editing_state) { |
| 346 VisiblePosition end_of_current_paragraph = EndOfParagraph(start_of_selection); | 346 VisiblePosition end_of_current_paragraph = EndOfParagraph(start_of_selection); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 else | 420 else |
| 421 IndentIntoBlockquote(start, end, blockquote_for_next_indent, editing_state); | 421 IndentIntoBlockquote(start, end, blockquote_for_next_indent, editing_state); |
| 422 } | 422 } |
| 423 | 423 |
| 424 InputEvent::InputType IndentOutdentCommand::GetInputType() const { | 424 InputEvent::InputType IndentOutdentCommand::GetInputType() const { |
| 425 return type_of_action_ == kIndent ? InputEvent::InputType::kFormatIndent | 425 return type_of_action_ == kIndent ? InputEvent::InputType::kFormatIndent |
| 426 : InputEvent::InputType::kFormatOutdent; | 426 : InputEvent::InputType::kFormatOutdent; |
| 427 } | 427 } |
| 428 | 428 |
| 429 } // namespace blink | 429 } // namespace blink |
| OLD | NEW |