| 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 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDecl
aration::create(node); | 1504 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::cre
ate(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 Loading... |
| 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 } |
| OLD | NEW |