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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 if (isHTMLUListElement(*enclosing_element)) { | 220 if (isHTMLUListElement(*enclosing_element)) { |
221 ApplyCommandToComposite( | 221 ApplyCommandToComposite( |
222 InsertListCommand::Create(GetDocument(), | 222 InsertListCommand::Create(GetDocument(), |
223 InsertListCommand::kUnorderedList), | 223 InsertListCommand::kUnorderedList), |
224 editing_state); | 224 editing_state); |
225 return; | 225 return; |
226 } | 226 } |
227 | 227 |
228 // The selection is inside a blockquote i.e. enclosingNode is a blockquote | 228 // The selection is inside a blockquote i.e. enclosingNode is a blockquote |
229 VisiblePosition position_in_enclosing_block = | 229 VisiblePosition position_in_enclosing_block = |
230 VisiblePosition::FirstPositionInNode(enclosing_element); | 230 VisiblePosition::FirstPositionInNode(*enclosing_element); |
231 // If the blockquote is inline, the start of the enclosing block coincides | 231 // If the blockquote is inline, the start of the enclosing block coincides |
232 // with positionInEnclosingBlock. | 232 // with positionInEnclosingBlock. |
233 VisiblePosition start_of_enclosing_block = | 233 VisiblePosition start_of_enclosing_block = |
234 (enclosing_element->GetLayoutObject() && | 234 (enclosing_element->GetLayoutObject() && |
235 enclosing_element->GetLayoutObject()->IsInline()) | 235 enclosing_element->GetLayoutObject()->IsInline()) |
236 ? position_in_enclosing_block | 236 ? position_in_enclosing_block |
237 : StartOfBlock(position_in_enclosing_block); | 237 : StartOfBlock(position_in_enclosing_block); |
238 VisiblePosition last_position_in_enclosing_block = | 238 VisiblePosition last_position_in_enclosing_block = |
239 VisiblePosition::LastPositionInNode(enclosing_element); | 239 VisiblePosition::LastPositionInNode(enclosing_element); |
240 VisiblePosition end_of_enclosing_block = | 240 VisiblePosition end_of_enclosing_block = |
(...skipping 179 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 |