| 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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 848 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 849 | 849 |
| 850 HeapVector<InlineRunToApplyStyle> runs; | 850 HeapVector<InlineRunToApplyStyle> runs; |
| 851 Node* node = startNode; | 851 Node* node = startNode; |
| 852 for (Node* next; node && node != pastEndNode; node = next) { | 852 for (Node* next; node && node != pastEndNode; node = next) { |
| 853 next = NodeTraversal::next(*node); | 853 next = NodeTraversal::next(*node); |
| 854 | 854 |
| 855 if (!node->layoutObject() || !hasEditableStyle(*node)) | 855 if (!node->layoutObject() || !hasEditableStyle(*node)) |
| 856 continue; | 856 continue; |
| 857 | 857 |
| 858 if (!layoutObjectIsRichlyEditable(*node) && node->isHTMLElement()) { | 858 if (!hasRichlyEditableStyle(*node) && node->isHTMLElement()) { |
| 859 HTMLElement* element = toHTMLElement(node); | 859 HTMLElement* element = toHTMLElement(node); |
| 860 // This is a plaintext-only region. Only proceed if it's fully selec
ted. | 860 // This is a plaintext-only region. Only proceed if it's fully selec
ted. |
| 861 // pastEndNode is the node after the last fully selected node, so if
it's inside node then | 861 // pastEndNode is the node after the last fully selected node, so if
it's inside node then |
| 862 // node isn't fully selected. | 862 // node isn't fully selected. |
| 863 if (pastEndNode && pastEndNode->isDescendantOf(element)) | 863 if (pastEndNode && pastEndNode->isDescendantOf(element)) |
| 864 break; | 864 break; |
| 865 // Add to this element's inline style and skip over its contents. | 865 // Add to this element's inline style and skip over its contents. |
| 866 next = NodeTraversal::nextSkippingChildren(*node); | 866 next = NodeTraversal::nextSkippingChildren(*node); |
| 867 if (!style->style()) | 867 if (!style->style()) |
| 868 continue; | 868 continue; |
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1741 DEFINE_TRACE(ApplyStyleCommand) | 1741 DEFINE_TRACE(ApplyStyleCommand) |
| 1742 { | 1742 { |
| 1743 visitor->trace(m_style); | 1743 visitor->trace(m_style); |
| 1744 visitor->trace(m_start); | 1744 visitor->trace(m_start); |
| 1745 visitor->trace(m_end); | 1745 visitor->trace(m_end); |
| 1746 visitor->trace(m_styledInlineElement); | 1746 visitor->trace(m_styledInlineElement); |
| 1747 CompositeEditCommand::trace(visitor); | 1747 CompositeEditCommand::trace(visitor); |
| 1748 } | 1748 } |
| 1749 | 1749 |
| 1750 } // namespace blink | 1750 } // namespace blink |
| OLD | NEW |