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

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

Issue 195953003: Oilpan: Move CSSStyleDeclaration and subclasses to the heap using transistion types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback Created 6 years, 9 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/Position.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 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 1494
1495 if (m_styledInlineElement && addStyledElement == AddStyledElement) 1495 if (m_styledInlineElement && addStyledElement == AddStyledElement)
1496 surroundNodeRangeWithElement(startNode, endNode, m_styledInlineElement-> cloneElementWithoutChildren()); 1496 surroundNodeRangeWithElement(startNode, endNode, m_styledInlineElement-> cloneElementWithoutChildren());
1497 } 1497 }
1498 1498
1499 float ApplyStyleCommand::computedFontSize(Node* node) 1499 float ApplyStyleCommand::computedFontSize(Node* node)
1500 { 1500 {
1501 if (!node) 1501 if (!node)
1502 return 0; 1502 return 0;
1503 1503
1504 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::cre ate(node); 1504 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDecl aration::create(node);
1505 if (!style) 1505 if (!style)
1506 return 0; 1506 return 0;
1507 1507
1508 RefPtrWillBeRawPtr<CSSPrimitiveValue> value = static_pointer_cast<CSSPrimiti veValue>(style->getPropertyCSSValue(CSSPropertyFontSize)); 1508 RefPtrWillBeRawPtr<CSSPrimitiveValue> value = static_pointer_cast<CSSPrimiti veValue>(style->getPropertyCSSValue(CSSPropertyFontSize));
1509 if (!value) 1509 if (!value)
1510 return 0; 1510 return 0;
1511 1511
1512 return value->getFloatValue(CSSPrimitiveValue::CSS_PX); 1512 return value->getFloatValue(CSSPrimitiveValue::CSS_PX);
1513 } 1513 }
1514 1514
(...skipping 27 matching lines...) Expand all
1542 String textToMove = nextText->data(); 1542 String textToMove = nextText->data();
1543 insertTextIntoNode(childText, childText->length(), textToMove); 1543 insertTextIntoNode(childText, childText->length(), textToMove);
1544 removeNode(next); 1544 removeNode(next);
1545 // don't move child node pointer. it may want to merge with more text no des. 1545 // don't move child node pointer. it may want to merge with more text no des.
1546 } 1546 }
1547 1547
1548 updateStartEnd(newStart, newEnd); 1548 updateStartEnd(newStart, newEnd);
1549 } 1549 }
1550 1550
1551 } 1551 }
OLDNEW
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698