| 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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 if (select && select->usesMenuList()) | 90 if (select && select->usesMenuList()) |
| 91 return false; | 91 return false; |
| 92 return HTMLElement::supportsFocus(); | 92 return HTMLElement::supportsFocus(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 bool HTMLOptGroupElement::matchesEnabledPseudoClass() const | 95 bool HTMLOptGroupElement::matchesEnabledPseudoClass() const |
| 96 { | 96 { |
| 97 return !isDisabledFormControl(); | 97 return !isDisabledFormControl(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 Node::InsertionNotificationRequest HTMLOptGroupElement::insertedInto(ContainerNo
de* insertionPoint) |
| 101 { |
| 102 HTMLElement::insertedInto(insertionPoint); |
| 103 if (HTMLSelectElement* select = ownerSelectElement()) { |
| 104 if (insertionPoint == select) |
| 105 select->optGroupInsertedOrRemoved(*this); |
| 106 } |
| 107 return InsertionDone; |
| 108 } |
| 109 |
| 110 void HTMLOptGroupElement::removedFrom(ContainerNode* insertionPoint) |
| 111 { |
| 112 if (isHTMLSelectElement(*insertionPoint)) { |
| 113 if (!parentNode()) |
| 114 toHTMLSelectElement(insertionPoint)->optGroupInsertedOrRemoved(*this
); |
| 115 } |
| 116 HTMLElement::removedFrom(insertionPoint); |
| 117 } |
| 118 |
| 100 void HTMLOptGroupElement::updateNonComputedStyle() | 119 void HTMLOptGroupElement::updateNonComputedStyle() |
| 101 { | 120 { |
| 102 m_style = originalStyleForLayoutObject(); | 121 m_style = originalStyleForLayoutObject(); |
| 103 if (layoutObject()) { | 122 if (layoutObject()) { |
| 104 if (HTMLSelectElement* select = ownerSelectElement()) | 123 if (HTMLSelectElement* select = ownerSelectElement()) |
| 105 select->updateListOnLayoutObject(); | 124 select->updateListOnLayoutObject(); |
| 106 } | 125 } |
| 107 } | 126 } |
| 108 | 127 |
| 109 ComputedStyle* HTMLOptGroupElement::nonLayoutObjectComputedStyle() const | 128 ComputedStyle* HTMLOptGroupElement::nonLayoutObjectComputedStyle() const |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 label.setTextContent(labelText); | 193 label.setTextContent(labelText); |
| 175 label.setAttribute(aria_labelAttr, AtomicString(labelText)); | 194 label.setAttribute(aria_labelAttr, AtomicString(labelText)); |
| 176 } | 195 } |
| 177 | 196 |
| 178 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const | 197 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const |
| 179 { | 198 { |
| 180 return *toHTMLDivElement(userAgentShadowRoot()->getElementById(ShadowElement
Names::optGroupLabel())); | 199 return *toHTMLDivElement(userAgentShadowRoot()->getElementById(ShadowElement
Names::optGroupLabel())); |
| 181 } | 200 } |
| 182 | 201 |
| 183 } // namespace blink | 202 } // namespace blink |
| OLD | NEW |