| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 startRange = TextIterator::rangeFromLocationAndLength(toContainerNode(scope)
, startIndex, 0, true); | 293 startRange = TextIterator::rangeFromLocationAndLength(toContainerNode(scope)
, startIndex, 0, true); |
| 294 endRange = TextIterator::rangeFromLocationAndLength(toContainerNode(scope),
endIndex, 0, true); | 294 endRange = TextIterator::rangeFromLocationAndLength(toContainerNode(scope),
endIndex, 0, true); |
| 295 if (startRange && endRange) | 295 if (startRange && endRange) |
| 296 updateStartEnd(startRange->startPosition(), endRange->startPosition()); | 296 updateStartEnd(startRange->startPosition(), endRange->startPosition()); |
| 297 } | 297 } |
| 298 | 298 |
| 299 static PassRefPtr<StylePropertySet> copyStyleOrCreateEmpty(const StylePropertySe
t* style) | 299 static PassRefPtr<StylePropertySet> copyStyleOrCreateEmpty(const StylePropertySe
t* style) |
| 300 { | 300 { |
| 301 if (!style) | 301 if (!style) |
| 302 return StylePropertySet::create(); | 302 return StylePropertySet::create(); |
| 303 return style->copy(); | 303 return style->mutableCopy(); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style) | 306 void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style) |
| 307 { | 307 { |
| 308 static const float MinimumFontSize = 0.1f; | 308 static const float MinimumFontSize = 0.1f; |
| 309 | 309 |
| 310 if (!style || !style->hasFontSizeDelta()) | 310 if (!style || !style->hasFontSizeDelta()) |
| 311 return; | 311 return; |
| 312 | 312 |
| 313 Position start = startPosition(); | 313 Position start = startPosition(); |
| (...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1547 String textToMove = nextText->data(); | 1547 String textToMove = nextText->data(); |
| 1548 insertTextIntoNode(childText, childText->length(), textToMove); | 1548 insertTextIntoNode(childText, childText->length(), textToMove); |
| 1549 removeNode(next); | 1549 removeNode(next); |
| 1550 // don't move child node pointer. it may want to merge with more text no
des. | 1550 // don't move child node pointer. it may want to merge with more text no
des. |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 updateStartEnd(newStart, newEnd); | 1553 updateStartEnd(newStart, newEnd); |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 } | 1556 } |
| OLD | NEW |