| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 bool isHTMLListElement(Node* n) | 1129 bool isHTMLListElement(Node* n) |
| 1130 { | 1130 { |
| 1131 return (n && (isHTMLUListElement(*n) || isHTMLOListElement(*n) || isHTMLDLis
tElement(*n))); | 1131 return (n && (isHTMLUListElement(*n) || isHTMLOListElement(*n) || isHTMLDLis
tElement(*n))); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 bool isListItem(const Node* n) | 1134 bool isListItem(const Node* n) |
| 1135 { | 1135 { |
| 1136 return n && n->layoutObject() && n->layoutObject()->isListItem(); | 1136 return n && n->layoutObject() && n->layoutObject()->isListItem(); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 bool isPresentationalHTMLElement(const Node* node) |
| 1140 { |
| 1141 if (!node->isHTMLElement()) |
| 1142 return false; |
| 1143 |
| 1144 const HTMLElement& element = toHTMLElement(*node); |
| 1145 return element.hasTagName(uTag) || element.hasTagName(sTag) || element.hasTa
gName(strikeTag) |
| 1146 || element.hasTagName(iTag) || element.hasTagName(emTag) || element.hasT
agName(bTag) || element.hasTagName(strongTag); |
| 1147 } |
| 1148 |
| 1139 Element* associatedElementOf(const Position& position) | 1149 Element* associatedElementOf(const Position& position) |
| 1140 { | 1150 { |
| 1141 Node* node = position.anchorNode(); | 1151 Node* node = position.anchorNode(); |
| 1142 if (!node || node->isElementNode()) | 1152 if (!node || node->isElementNode()) |
| 1143 return toElement(node); | 1153 return toElement(node); |
| 1144 ContainerNode* parent = NodeTraversal::parent(*node); | 1154 ContainerNode* parent = NodeTraversal::parent(*node); |
| 1145 return parent && parent->isElementNode() ? toElement(parent) : nullptr; | 1155 return parent && parent->isElementNode() ? toElement(parent) : nullptr; |
| 1146 } | 1156 } |
| 1147 | 1157 |
| 1148 Element* enclosingElementWithTag(const Position& p, const QualifiedName& tagName
) | 1158 Element* enclosingElementWithTag(const Position& p, const QualifiedName& tagName
) |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 return InputType::DeleteWordBackward; | 1898 return InputType::DeleteWordBackward; |
| 1889 if (granularity == LineBoundary) | 1899 if (granularity == LineBoundary) |
| 1890 return InputType::DeleteLineBackward; | 1900 return InputType::DeleteLineBackward; |
| 1891 return InputType::DeleteContentBackward; | 1901 return InputType::DeleteContentBackward; |
| 1892 default: | 1902 default: |
| 1893 return InputType::None; | 1903 return InputType::None; |
| 1894 } | 1904 } |
| 1895 } | 1905 } |
| 1896 | 1906 |
| 1897 } // namespace blink | 1907 } // namespace blink |
| OLD | NEW |