| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008, 2009 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 VisiblePosition paragraphStart(startOfParagraph(visibleStart)); | 267 VisiblePosition paragraphStart(startOfParagraph(visibleStart)); |
| 268 VisiblePosition nextParagraphStart(endOfParagraph(paragraphStart).next()); | 268 VisiblePosition nextParagraphStart(endOfParagraph(paragraphStart).next()); |
| 269 VisiblePosition beyondEnd(endOfParagraph(visibleEnd).next()); | 269 VisiblePosition beyondEnd(endOfParagraph(visibleEnd).next()); |
| 270 while (paragraphStart.isNotNull() && paragraphStart != beyondEnd) { | 270 while (paragraphStart.isNotNull() && paragraphStart != beyondEnd) { |
| 271 StyleChange styleChange(style, paragraphStart.deepEquivalent()); | 271 StyleChange styleChange(style, paragraphStart.deepEquivalent()); |
| 272 if (styleChange.cssStyle().length() || m_removeOnly) { | 272 if (styleChange.cssStyle().length() || m_removeOnly) { |
| 273 RefPtrWillBeRawPtr<Element> block = enclosingBlock(paragraphStart.de
epEquivalent().deprecatedNode()); | 273 RefPtrWillBeRawPtr<Element> block = enclosingBlock(paragraphStart.de
epEquivalent().deprecatedNode()); |
| 274 const Position& paragraphStartToMove = paragraphStart.deepEquivalent
(); | 274 const Position& paragraphStartToMove = paragraphStart.deepEquivalent
(); |
| 275 if (!m_removeOnly && isEditablePosition(paragraphStartToMove)) { | 275 if (!m_removeOnly && isEditablePosition(paragraphStartToMove)) { |
| 276 RefPtrWillBeRawPtr<Element> newBlock = moveParagraphContentsToNe
wBlockIfNecessary(paragraphStartToMove); | 276 RefPtrWillBeRawPtr<HTMLElement> newBlock = moveParagraphContents
ToNewBlockIfNecessary(paragraphStartToMove); |
| 277 if (newBlock) | 277 if (newBlock) |
| 278 block = newBlock; | 278 block = newBlock; |
| 279 } | 279 } |
| 280 if (block && block->isHTMLElement()) { | 280 if (block && block->isHTMLElement()) { |
| 281 removeCSSStyle(style, toHTMLElement(block)); | 281 removeCSSStyle(style, toHTMLElement(block)); |
| 282 if (!m_removeOnly) | 282 if (!m_removeOnly) |
| 283 addBlockStyle(styleChange, toHTMLElement(block)); | 283 addBlockStyle(styleChange, toHTMLElement(block)); |
| 284 } | 284 } |
| 285 | 285 |
| 286 if (nextParagraphStart.isOrphan()) | 286 if (nextParagraphStart.isOrphan()) |
| (...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 void ApplyStyleCommand::trace(Visitor* visitor) | 1571 void ApplyStyleCommand::trace(Visitor* visitor) |
| 1572 { | 1572 { |
| 1573 visitor->trace(m_style); | 1573 visitor->trace(m_style); |
| 1574 visitor->trace(m_start); | 1574 visitor->trace(m_start); |
| 1575 visitor->trace(m_end); | 1575 visitor->trace(m_end); |
| 1576 visitor->trace(m_styledInlineElement); | 1576 visitor->trace(m_styledInlineElement); |
| 1577 CompositeEditCommand::trace(visitor); | 1577 CompositeEditCommand::trace(visitor); |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 } | 1580 } |
| OLD | NEW |