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 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 | 1481 |
1482 float ApplyStyleCommand::computedFontSize(Node* node) | 1482 float ApplyStyleCommand::computedFontSize(Node* node) |
1483 { | 1483 { |
1484 if (!node) | 1484 if (!node) |
1485 return 0; | 1485 return 0; |
1486 | 1486 |
1487 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::cre
ate(node); | 1487 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::cre
ate(node); |
1488 if (!style) | 1488 if (!style) |
1489 return 0; | 1489 return 0; |
1490 | 1490 |
| 1491 // FIXME: oilpan: Change to RefPtrWillBeRawPtr when changing CSSValue. |
1491 RefPtr<CSSPrimitiveValue> value = static_pointer_cast<CSSPrimitiveValue>(sty
le->getPropertyCSSValue(CSSPropertyFontSize)); | 1492 RefPtr<CSSPrimitiveValue> value = static_pointer_cast<CSSPrimitiveValue>(sty
le->getPropertyCSSValue(CSSPropertyFontSize)); |
1492 if (!value) | 1493 if (!value) |
1493 return 0; | 1494 return 0; |
1494 | 1495 |
1495 return value->getFloatValue(CSSPrimitiveValue::CSS_PX); | 1496 return value->getFloatValue(CSSPrimitiveValue::CSS_PX); |
1496 } | 1497 } |
1497 | 1498 |
1498 void ApplyStyleCommand::joinChildTextNodes(Node* node, const Position& start, co
nst Position& end) | 1499 void ApplyStyleCommand::joinChildTextNodes(Node* node, const Position& start, co
nst Position& end) |
1499 { | 1500 { |
1500 if (!node) | 1501 if (!node) |
(...skipping 24 matching lines...) Expand all Loading... |
1525 String textToMove = nextText->data(); | 1526 String textToMove = nextText->data(); |
1526 insertTextIntoNode(childText, childText->length(), textToMove); | 1527 insertTextIntoNode(childText, childText->length(), textToMove); |
1527 removeNode(next); | 1528 removeNode(next); |
1528 // don't move child node pointer. it may want to merge with more text no
des. | 1529 // don't move child node pointer. it may want to merge with more text no
des. |
1529 } | 1530 } |
1530 | 1531 |
1531 updateStartEnd(newStart, newEnd); | 1532 updateStartEnd(newStart, newEnd); |
1532 } | 1533 } |
1533 | 1534 |
1534 } | 1535 } |
OLD | NEW |