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 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 if (is_end_and_end_of_last_paragraph_on_same_node) { | 328 if (is_end_and_end_of_last_paragraph_on_same_node) { |
329 if (end_of_last_paragraph.OffsetInContainerNode() == | 329 if (end_of_last_paragraph.OffsetInContainerNode() == |
330 end.OffsetInContainerNode()) | 330 end.OffsetInContainerNode()) |
331 end_of_last_paragraph = | 331 end_of_last_paragraph = |
332 LastPositionInOrAfterNode(end_container->previousSibling()); | 332 LastPositionInOrAfterNode(end_container->previousSibling()); |
333 else | 333 else |
334 end_of_last_paragraph = Position( | 334 end_of_last_paragraph = Position( |
335 end_container, end_of_last_paragraph.OffsetInContainerNode() - | 335 end_container, end_of_last_paragraph.OffsetInContainerNode() - |
336 end.OffsetInContainerNode()); | 336 end.OffsetInContainerNode()); |
337 } | 337 } |
338 end = Position::LastPositionInNode(end_container->previousSibling()); | 338 end = Position::LastPositionInNode(*end_container->previousSibling()); |
339 } | 339 } |
340 } | 340 } |
341 } | 341 } |
342 | 342 |
343 VisiblePosition | 343 VisiblePosition |
344 ApplyBlockElementCommand::EndOfNextParagrahSplittingTextNodesIfNeeded( | 344 ApplyBlockElementCommand::EndOfNextParagrahSplittingTextNodesIfNeeded( |
345 VisiblePosition& end_of_current_paragraph, | 345 VisiblePosition& end_of_current_paragraph, |
346 Position& end_of_last_paragraph, | 346 Position& end_of_last_paragraph, |
347 Position& start, | 347 Position& start, |
348 Position& end) { | 348 Position& end) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 } | 411 } |
412 | 412 |
413 HTMLElement* ApplyBlockElementCommand::CreateBlockElement() const { | 413 HTMLElement* ApplyBlockElementCommand::CreateBlockElement() const { |
414 HTMLElement* element = CreateHTMLElement(GetDocument(), tag_name_); | 414 HTMLElement* element = CreateHTMLElement(GetDocument(), tag_name_); |
415 if (inline_style_.length()) | 415 if (inline_style_.length()) |
416 element->setAttribute(styleAttr, inline_style_); | 416 element->setAttribute(styleAttr, inline_style_); |
417 return element; | 417 return element; |
418 } | 418 } |
419 | 419 |
420 } // namespace blink | 420 } // namespace blink |
OLD | NEW |