| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 m_endOfInsertedContent = endingSelection().visibleEnd().deepEquivalent(
); | 849 m_endOfInsertedContent = endingSelection().visibleEnd().deepEquivalent(
); |
| 850 // If we merged text nodes, m_endOfInsertedContent could be null. If thi
s is the case, we use m_startOfInsertedContent. | 850 // If we merged text nodes, m_endOfInsertedContent could be null. If thi
s is the case, we use m_startOfInsertedContent. |
| 851 if (m_endOfInsertedContent.isNull()) | 851 if (m_endOfInsertedContent.isNull()) |
| 852 m_endOfInsertedContent = m_startOfInsertedContent; | 852 m_endOfInsertedContent = m_startOfInsertedContent; |
| 853 } | 853 } |
| 854 } | 854 } |
| 855 | 855 |
| 856 static Node* enclosingInline(Node* node) | 856 static Node* enclosingInline(Node* node) |
| 857 { | 857 { |
| 858 while (ContainerNode* parent = node->parentNode()) { | 858 while (ContainerNode* parent = node->parentNode()) { |
| 859 if (parent->isBlockFlowElement() || isHTMLBodyElement(*parent)) | 859 if (isBlockFlowElement(*parent) || isHTMLBodyElement(*parent)) |
| 860 return node; | 860 return node; |
| 861 // Stop if any previous sibling is a block. | 861 // Stop if any previous sibling is a block. |
| 862 for (Node* sibling = node->previousSibling(); sibling; sibling = sibling
->previousSibling()) { | 862 for (Node* sibling = node->previousSibling(); sibling; sibling = sibling
->previousSibling()) { |
| 863 if (sibling->isBlockFlowElement()) | 863 if (isBlockFlowElement(*sibling)) |
| 864 return node; | 864 return node; |
| 865 } | 865 } |
| 866 node = parent; | 866 node = parent; |
| 867 } | 867 } |
| 868 return node; | 868 return node; |
| 869 } | 869 } |
| 870 | 870 |
| 871 static bool isInlineNodeWithStyle(const Node* node) | 871 static bool isInlineNodeWithStyle(const Node* node) |
| 872 { | 872 { |
| 873 // We don't want to skip over any block elements. | 873 // We don't want to skip over any block elements. |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 void ReplaceSelectionCommand::trace(Visitor* visitor) | 1529 void ReplaceSelectionCommand::trace(Visitor* visitor) |
| 1530 { | 1530 { |
| 1531 visitor->trace(m_startOfInsertedContent); | 1531 visitor->trace(m_startOfInsertedContent); |
| 1532 visitor->trace(m_endOfInsertedContent); | 1532 visitor->trace(m_endOfInsertedContent); |
| 1533 visitor->trace(m_insertionStyle); | 1533 visitor->trace(m_insertionStyle); |
| 1534 visitor->trace(m_documentFragment); | 1534 visitor->trace(m_documentFragment); |
| 1535 CompositeEditCommand::trace(visitor); | 1535 CompositeEditCommand::trace(visitor); |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 } // namespace blink | 1538 } // namespace blink |
| OLD | NEW |