Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: Source/core/editing/ApplyStyleCommand.cpp

Issue 15864004: Move create() methods from StylePropertySet to MutableStylePropertySet. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/StyledElement.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 paragraphStart = nextParagraphStart; 289 paragraphStart = nextParagraphStart;
290 nextParagraphStart = endOfParagraph(paragraphStart).next(); 290 nextParagraphStart = endOfParagraph(paragraphStart).next();
291 } 291 }
292 292
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<MutableStylePropertySet> copyStyleOrCreateEmpty(const StylePro pertySet* style)
300 { 300 {
301 if (!style) 301 if (!style)
302 return StylePropertySet::create(); 302 return MutableStylePropertySet::create();
303 return style->mutableCopy(); 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
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « Source/core/dom/StyledElement.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698