| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Igalia S.L. | 4 * Copyright (C) 2011 Igalia S.L. |
| 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 accumulator.wrapWithStyleNode(fullySelectedRootStyle->style(
), &document, true); | 604 accumulator.wrapWithStyleNode(fullySelectedRootStyle->style(
), &document, true); |
| 605 } | 605 } |
| 606 } else { | 606 } else { |
| 607 // Since this node and all the other ancestors are not in the se
lection we want to set RangeFullySelectsNode to DoesNotFullySelectNode | 607 // Since this node and all the other ancestors are not in the se
lection we want to set RangeFullySelectsNode to DoesNotFullySelectNode |
| 608 // so that styles that affect the exterior of the node are not i
ncluded. | 608 // so that styles that affect the exterior of the node are not i
ncluded. |
| 609 accumulator.wrapWithNode(ancestor, convertBlocksToInlines, Style
dMarkupAccumulator::DoesNotFullySelectNode); | 609 accumulator.wrapWithNode(ancestor, convertBlocksToInlines, Style
dMarkupAccumulator::DoesNotFullySelectNode); |
| 610 } | 610 } |
| 611 if (nodes) | 611 if (nodes) |
| 612 nodes->append(ancestor); | 612 nodes->append(ancestor); |
| 613 | 613 |
| 614 lastClosed = ancestor; | |
| 615 | |
| 616 if (ancestor == specialCommonAncestor) | 614 if (ancestor == specialCommonAncestor) |
| 617 break; | 615 break; |
| 618 } | 616 } |
| 619 } | 617 } |
| 620 | 618 |
| 621 // FIXME: The interchange newline should be placed in the block that it's in
, not after all of the content, unconditionally. | 619 // FIXME: The interchange newline should be placed in the block that it's in
, not after all of the content, unconditionally. |
| 622 if (shouldAnnotate == AnnotateForInterchange && needInterchangeNewlineAfter(
visibleEnd.previous())) | 620 if (shouldAnnotate == AnnotateForInterchange && needInterchangeNewlineAfter(
visibleEnd.previous())) |
| 623 accumulator.appendString(interchangeNewlineString); | 621 accumulator.appendString(interchangeNewlineString); |
| 624 | 622 |
| 625 return accumulator.takeResults(); | 623 return accumulator.takeResults(); |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 return; | 1078 return; |
| 1081 | 1079 |
| 1082 RefPtr<Text> textNode = toText(node.get()); | 1080 RefPtr<Text> textNode = toText(node.get()); |
| 1083 RefPtr<Text> textNext = toText(next); | 1081 RefPtr<Text> textNext = toText(next); |
| 1084 textNode->appendData(textNext->data()); | 1082 textNode->appendData(textNext->data()); |
| 1085 if (textNext->parentNode()) // Might have been removed by mutation event. | 1083 if (textNext->parentNode()) // Might have been removed by mutation event. |
| 1086 textNext->remove(exceptionState); | 1084 textNext->remove(exceptionState); |
| 1087 } | 1085 } |
| 1088 | 1086 |
| 1089 } | 1087 } |
| OLD | NEW |