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 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 break; | 989 break; |
990 } | 990 } |
991 | 991 |
992 return result; | 992 return result; |
993 } | 993 } |
994 | 994 |
995 void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, EditingStyle* sty
le) | 995 void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, EditingStyle* sty
le) |
996 { | 996 { |
997 ASSERT(node); | 997 ASSERT(node); |
998 | 998 |
999 node->document().updateStyleIfNeeded(); | 999 node->document().updateRenderTreeIfNeeded(); |
1000 | 1000 |
1001 if (!style || style->isEmpty() || !node->renderer() || isHTMLIFrameElement(*
node)) | 1001 if (!style || style->isEmpty() || !node->renderer() || isHTMLIFrameElement(*
node)) |
1002 return; | 1002 return; |
1003 | 1003 |
1004 RefPtr<EditingStyle> newInlineStyle = style; | 1004 RefPtr<EditingStyle> newInlineStyle = style; |
1005 if (node->isHTMLElement() && toHTMLElement(node)->inlineStyle()) { | 1005 if (node->isHTMLElement() && toHTMLElement(node)->inlineStyle()) { |
1006 newInlineStyle = style->copy(); | 1006 newInlineStyle = style->copy(); |
1007 newInlineStyle->mergeInlineStyleOfElement(toHTMLElement(node), EditingSt
yle::OverrideValues); | 1007 newInlineStyle->mergeInlineStyleOfElement(toHTMLElement(node), EditingSt
yle::OverrideValues); |
1008 } | 1008 } |
1009 | 1009 |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |