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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = |
241 EndOfBlock(last_position_in_enclosing_block); | 241 EndOfBlock(last_position_in_enclosing_block); |
242 if (visible_start_of_paragraph.DeepEquivalent() == | 242 if (visible_start_of_paragraph.DeepEquivalent() == |
243 start_of_enclosing_block.DeepEquivalent() && | 243 start_of_enclosing_block.DeepEquivalent() && |
244 visible_end_of_paragraph.DeepEquivalent() == | 244 visible_end_of_paragraph.DeepEquivalent() == |
245 end_of_enclosing_block.DeepEquivalent()) { | 245 end_of_enclosing_block.DeepEquivalent()) { |
246 // The blockquote doesn't contain anything outside the paragraph, so it can | 246 // The blockquote doesn't contain anything outside the paragraph, so it can |
247 // be totally removed. | 247 // be totally removed. |
248 Node* split_point = enclosing_element->nextSibling(); | 248 Node* split_point = enclosing_element->nextSibling(); |
249 RemoveNodePreservingChildren(enclosing_element, editing_state); | 249 RemoveNodePreservingChildren(enclosing_element, editing_state); |
(...skipping 170 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 |