| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 insertedNodes.willRemoveNodePreservingChildren(*element); | 511 insertedNodes.willRemoveNodePreservingChildren(*element); |
| 512 removeNodePreservingChildren(element); | 512 removeNodePreservingChildren(element); |
| 513 continue; | 513 continue; |
| 514 } | 514 } |
| 515 removeNodeAttribute(element, styleAttr); | 515 removeNodeAttribute(element, styleAttr); |
| 516 } else if (newInlineStyle->style()->propertyCount() != inlineStyle->prop
ertyCount()) { | 516 } else if (newInlineStyle->style()->propertyCount() != inlineStyle->prop
ertyCount()) { |
| 517 setNodeAttribute(element, styleAttr, AtomicString(newInlineStyle->st
yle()->asText())); | 517 setNodeAttribute(element, styleAttr, AtomicString(newInlineStyle->st
yle()->asText())); |
| 518 } | 518 } |
| 519 | 519 |
| 520 // FIXME: Tolerate differences in id, class, and style attributes. | 520 // FIXME: Tolerate differences in id, class, and style attributes. |
| 521 if (isNonTableCellHTMLBlockElement(element) && areIdenticalElements(elem
ent, element->parentNode()) | 521 if (element->parentNode() && isNonTableCellHTMLBlockElement(element) &&
areIdenticalElements(element, element->parentNode()) |
| 522 && VisiblePosition(firstPositionInNode(element->parentNode())) == Vi
siblePosition(firstPositionInNode(element)) | 522 && VisiblePosition(firstPositionInNode(element->parentNode())) == Vi
siblePosition(firstPositionInNode(element)) |
| 523 && VisiblePosition(lastPositionInNode(element->parentNode())) == Vis
iblePosition(lastPositionInNode(element))) { | 523 && VisiblePosition(lastPositionInNode(element->parentNode())) == Vis
iblePosition(lastPositionInNode(element))) { |
| 524 insertedNodes.willRemoveNodePreservingChildren(*element); | 524 insertedNodes.willRemoveNodePreservingChildren(*element); |
| 525 removeNodePreservingChildren(element); | 525 removeNodePreservingChildren(element); |
| 526 continue; | 526 continue; |
| 527 } | 527 } |
| 528 | 528 |
| 529 if (element->parentNode() && element->parentNode()->rendererIsRichlyEdit
able()) | 529 if (element->parentNode() && element->parentNode()->rendererIsRichlyEdit
able()) |
| 530 removeNodeAttribute(element, contenteditableAttr); | 530 removeNodeAttribute(element, contenteditableAttr); |
| 531 | 531 |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 removeNodeAndPruneAncestors(nodeAfterInsertionPos.get()); | 1497 removeNodeAndPruneAncestors(nodeAfterInsertionPos.get()); |
| 1498 | 1498 |
| 1499 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); | 1499 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); |
| 1500 | 1500 |
| 1501 setEndingSelection(selectionAfterReplace); | 1501 setEndingSelection(selectionAfterReplace); |
| 1502 | 1502 |
| 1503 return true; | 1503 return true; |
| 1504 } | 1504 } |
| 1505 | 1505 |
| 1506 } // namespace WebCore | 1506 } // namespace WebCore |
| OLD | NEW |