OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 return nullptr; | 116 return nullptr; |
117 Node* grandParent = parentNode()->parentNode(); | 117 Node* grandParent = parentNode()->parentNode(); |
118 return isHTMLSelectElement(grandParent) ? toHTMLSelectElement(grandParent) | 118 return isHTMLSelectElement(grandParent) ? toHTMLSelectElement(grandParent) |
119 : nullptr; | 119 : nullptr; |
120 } | 120 } |
121 | 121 |
122 Node::InsertionNotificationRequest HTMLHRElement::insertedInto( | 122 Node::InsertionNotificationRequest HTMLHRElement::insertedInto( |
123 ContainerNode* insertionPoint) { | 123 ContainerNode* insertionPoint) { |
124 HTMLElement::insertedInto(insertionPoint); | 124 HTMLElement::insertedInto(insertionPoint); |
125 if (HTMLSelectElement* select = ownerSelectElement()) { | 125 if (HTMLSelectElement* select = ownerSelectElement()) { |
126 if (insertionPoint == select || (isHTMLOptGroupElement(*insertionPoint) && | 126 if (insertionPoint == select || |
127 insertionPoint->parentNode() == select)) | 127 (isHTMLOptGroupElement(*insertionPoint) && |
| 128 insertionPoint->parentNode() == select)) |
128 select->hrInsertedOrRemoved(*this); | 129 select->hrInsertedOrRemoved(*this); |
129 } | 130 } |
130 return InsertionDone; | 131 return InsertionDone; |
131 } | 132 } |
132 | 133 |
133 void HTMLHRElement::removedFrom(ContainerNode* insertionPoint) { | 134 void HTMLHRElement::removedFrom(ContainerNode* insertionPoint) { |
134 if (isHTMLSelectElement(*insertionPoint)) { | 135 if (isHTMLSelectElement(*insertionPoint)) { |
135 if (!parentNode() || isHTMLOptGroupElement(*parentNode())) | 136 if (!parentNode() || isHTMLOptGroupElement(*parentNode())) |
136 toHTMLSelectElement(insertionPoint)->hrInsertedOrRemoved(*this); | 137 toHTMLSelectElement(insertionPoint)->hrInsertedOrRemoved(*this); |
137 } else if (isHTMLOptGroupElement(*insertionPoint)) { | 138 } else if (isHTMLOptGroupElement(*insertionPoint)) { |
138 Node* parent = insertionPoint->parentNode(); | 139 Node* parent = insertionPoint->parentNode(); |
139 if (isHTMLSelectElement(parent)) | 140 if (isHTMLSelectElement(parent)) |
140 toHTMLSelectElement(parent)->hrInsertedOrRemoved(*this); | 141 toHTMLSelectElement(parent)->hrInsertedOrRemoved(*this); |
141 } | 142 } |
142 HTMLElement::removedFrom(insertionPoint); | 143 HTMLElement::removedFrom(insertionPoint); |
143 } | 144 } |
144 | 145 |
145 } // namespace blink | 146 } // namespace blink |
OLD | NEW |