| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 Text* endContainer = toText(end.computeContainerNode()); | 242 Text* endContainer = toText(end.computeContainerNode()); |
| 243 splitTextNode(endContainer, end.offsetInContainerNode()); | 243 splitTextNode(endContainer, end.offsetInContainerNode()); |
| 244 if (isStartAndEndOnSameNode) | 244 if (isStartAndEndOnSameNode) |
| 245 start = firstPositionInOrBeforeNode(endContainer->previousSiblin
g()); | 245 start = firstPositionInOrBeforeNode(endContainer->previousSiblin
g()); |
| 246 if (isEndAndEndOfLastParagraphOnSameNode) { | 246 if (isEndAndEndOfLastParagraphOnSameNode) { |
| 247 if (m_endOfLastParagraph.offsetInContainerNode() == end.offsetIn
ContainerNode()) | 247 if (m_endOfLastParagraph.offsetInContainerNode() == end.offsetIn
ContainerNode()) |
| 248 m_endOfLastParagraph = lastPositionInOrAfterNode(endContaine
r->previousSibling()); | 248 m_endOfLastParagraph = lastPositionInOrAfterNode(endContaine
r->previousSibling()); |
| 249 else | 249 else |
| 250 m_endOfLastParagraph = Position(endContainer, m_endOfLastPar
agraph.offsetInContainerNode() - end.offsetInContainerNode()); | 250 m_endOfLastParagraph = Position(endContainer, m_endOfLastPar
agraph.offsetInContainerNode() - end.offsetInContainerNode()); |
| 251 } | 251 } |
| 252 end = lastPositionInNode(endContainer->previousSibling()); | 252 end = Position::lastPositionInNode(endContainer->previousSibling()); |
| 253 } | 253 } |
| 254 } | 254 } |
| 255 } | 255 } |
| 256 | 256 |
| 257 VisiblePosition ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfN
eeded(VisiblePosition& endOfCurrentParagraph, Position& start, Position& end) | 257 VisiblePosition ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfN
eeded(VisiblePosition& endOfCurrentParagraph, Position& start, Position& end) |
| 258 { | 258 { |
| 259 VisiblePosition endOfNextParagraph = endOfParagraph(nextPositionOf(endOfCurr
entParagraph)); | 259 VisiblePosition endOfNextParagraph = endOfParagraph(nextPositionOf(endOfCurr
entParagraph)); |
| 260 Position position = endOfNextParagraph.deepEquivalent(); | 260 Position position = endOfNextParagraph.deepEquivalent(); |
| 261 const ComputedStyle* style = computedStyleOfEnclosingTextNode(position); | 261 const ComputedStyle* style = computedStyleOfEnclosingTextNode(position); |
| 262 if (!style) | 262 if (!style) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 return element; | 301 return element; |
| 302 } | 302 } |
| 303 | 303 |
| 304 DEFINE_TRACE(ApplyBlockElementCommand) | 304 DEFINE_TRACE(ApplyBlockElementCommand) |
| 305 { | 305 { |
| 306 visitor->trace(m_endOfLastParagraph); | 306 visitor->trace(m_endOfLastParagraph); |
| 307 CompositeEditCommand::trace(visitor); | 307 CompositeEditCommand::trace(visitor); |
| 308 } | 308 } |
| 309 | 309 |
| 310 } // namespace blink | 310 } // namespace blink |
| OLD | NEW |