| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 bool atEnd = false; | 123 bool atEnd = false; |
| 124 Position end; | 124 Position end; |
| 125 while (endOfCurrentParagraph != endAfterSelection && !atEnd) { | 125 while (endOfCurrentParagraph != endAfterSelection && !atEnd) { |
| 126 if (endOfCurrentParagraph.deepEquivalent() == m_endOfLastParagraph) | 126 if (endOfCurrentParagraph.deepEquivalent() == m_endOfLastParagraph) |
| 127 atEnd = true; | 127 atEnd = true; |
| 128 | 128 |
| 129 rangeForParagraphSplittingTextNodesIfNeeded(endOfCurrentParagraph, start
, end); | 129 rangeForParagraphSplittingTextNodesIfNeeded(endOfCurrentParagraph, start
, end); |
| 130 endOfCurrentParagraph = end; | 130 endOfCurrentParagraph = end; |
| 131 | 131 |
| 132 Position afterEnd = end.next(); | |
| 133 Node* enclosingCell = enclosingNodeOfType(start, &isTableCell); | 132 Node* enclosingCell = enclosingNodeOfType(start, &isTableCell); |
| 134 VisiblePosition endOfNextParagraph = endOfNextParagrahSplittingTextNodes
IfNeeded(endOfCurrentParagraph, start, end); | 133 VisiblePosition endOfNextParagraph = endOfNextParagrahSplittingTextNodes
IfNeeded(endOfCurrentParagraph, start, end); |
| 135 | 134 |
| 136 formatRange(start, end, m_endOfLastParagraph, blockquoteForNextIndent); | 135 formatRange(start, end, m_endOfLastParagraph, blockquoteForNextIndent); |
| 137 | 136 |
| 138 // Don't put the next paragraph in the blockquote we just created for th
is paragraph unless | 137 // Don't put the next paragraph in the blockquote we just created for th
is paragraph unless |
| 139 // the next paragraph is in the same cell. | 138 // the next paragraph is in the same cell. |
| 140 if (enclosingCell && enclosingCell != enclosingNodeOfType(endOfNextParag
raph.deepEquivalent(), &isTableCell)) | 139 if (enclosingCell && enclosingCell != enclosingNodeOfType(endOfNextParag
raph.deepEquivalent(), &isTableCell)) |
| 141 blockquoteForNextIndent = 0; | 140 blockquoteForNextIndent = 0; |
| 142 | 141 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 279 |
| 281 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const | 280 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const |
| 282 { | 281 { |
| 283 RefPtr<Element> element = createHTMLElement(document(), m_tagName); | 282 RefPtr<Element> element = createHTMLElement(document(), m_tagName); |
| 284 if (m_inlineStyle.length()) | 283 if (m_inlineStyle.length()) |
| 285 element->setAttribute(styleAttr, m_inlineStyle); | 284 element->setAttribute(styleAttr, m_inlineStyle); |
| 286 return element.release(); | 285 return element.release(); |
| 287 } | 286 } |
| 288 | 287 |
| 289 } | 288 } |
| OLD | NEW |