| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Computer, 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 if (!currentNode->renderer() || !currentNode->renderer()->isRenderIn
line() || toRenderInline(currentNode->renderer())->alwaysCreateLineBoxes()) | 71 if (!currentNode->renderer() || !currentNode->renderer()->isRenderIn
line() || toRenderInline(currentNode->renderer())->alwaysCreateLineBoxes()) |
| 72 continue; | 72 continue; |
| 73 | 73 |
| 74 if (currentNode->firstChild() != currentNode->lastChild()) { | 74 if (currentNode->firstChild() != currentNode->lastChild()) { |
| 75 topNodeWithStartingStyle = 0; | 75 topNodeWithStartingStyle = 0; |
| 76 break; | 76 break; |
| 77 } | 77 } |
| 78 | 78 |
| 79 unsigned context; | 79 unsigned context; |
| 80 if (currentNode->renderStyle()->visualInvalidationDiff(startingStyle
, context) == StyleDifferenceEqual) | 80 if (currentNode->renderStyle()->visualInvalidationDiff(*startingStyl
e, context) == StyleDifferenceEqual) |
| 81 topNodeWithStartingStyle = currentNode; | 81 topNodeWithStartingStyle = currentNode; |
| 82 | 82 |
| 83 } | 83 } |
| 84 if (topNodeWithStartingStyle) { | 84 if (topNodeWithStartingStyle) { |
| 85 for (Node* node = startingNode; node != topNodeWithStartingStyle; no
de = node->parentNode()) | 85 for (Node* node = startingNode; node != topNodeWithStartingStyle; no
de = node->parentNode()) |
| 86 nodesToRemove.append(node); | 86 nodesToRemove.append(node); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 // we perform all the DOM mutations at once. | 90 // we perform all the DOM mutations at once. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 116 return 0; | 116 return 0; |
| 117 | 117 |
| 118 removeNode(nodesToRemove[startNodeIndex], AssumeContentIsAlwaysEditable); | 118 removeNode(nodesToRemove[startNodeIndex], AssumeContentIsAlwaysEditable); |
| 119 insertNodeBefore(nodesToRemove[startNodeIndex], highestAncestorToRemove, Ass
umeContentIsAlwaysEditable); | 119 insertNodeBefore(nodesToRemove[startNodeIndex], highestAncestorToRemove, Ass
umeContentIsAlwaysEditable); |
| 120 removeNode(highestAncestorToRemove, AssumeContentIsAlwaysEditable); | 120 removeNode(highestAncestorToRemove, AssumeContentIsAlwaysEditable); |
| 121 | 121 |
| 122 return pastLastNodeToRemove - startNodeIndex - 1; | 122 return pastLastNodeToRemove - startNodeIndex - 1; |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace WebCore | 125 } // namespace WebCore |
| OLD | NEW |