| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 } | 99 } |
| 100 | 100 |
| 101 void HTMLFormControlElement::updateAncestorDisabledState() const | 101 void HTMLFormControlElement::updateAncestorDisabledState() const |
| 102 { | 102 { |
| 103 HTMLFieldSetElement* fieldSetAncestor = 0; | 103 HTMLFieldSetElement* fieldSetAncestor = 0; |
| 104 ContainerNode* legendAncestor = 0; | 104 ContainerNode* legendAncestor = 0; |
| 105 for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->
parentNode()) { | 105 for (ContainerNode* ancestor = parentNode(); ancestor; ancestor = ancestor->
parentNode()) { |
| 106 if (!legendAncestor && ancestor->hasTagName(legendTag)) | 106 if (!legendAncestor && ancestor->hasTagName(legendTag)) |
| 107 legendAncestor = ancestor; | 107 legendAncestor = ancestor; |
| 108 if (ancestor->hasTagName(fieldsetTag)) { | 108 if (ancestor->hasTagName(fieldsetTag)) { |
| 109 fieldSetAncestor = static_cast<HTMLFieldSetElement*>(ancestor); | 109 fieldSetAncestor = toHTMLFieldSetElement(ancestor); |
| 110 break; | 110 break; |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 m_ancestorDisabledState = (fieldSetAncestor && fieldSetAncestor->isDisabledF
ormControl() && !(legendAncestor && legendAncestor == fieldSetAncestor->legend()
)) ? AncestorDisabledStateDisabled : AncestorDisabledStateEnabled; | 113 m_ancestorDisabledState = (fieldSetAncestor && fieldSetAncestor->isDisabledF
ormControl() && !(legendAncestor && legendAncestor == fieldSetAncestor->legend()
)) ? AncestorDisabledStateDisabled : AncestorDisabledStateEnabled; |
| 114 } | 114 } |
| 115 | 115 |
| 116 void HTMLFormControlElement::ancestorDisabledStateWasChanged() | 116 void HTMLFormControlElement::ancestorDisabledStateWasChanged() |
| 117 { | 117 { |
| 118 m_ancestorDisabledState = AncestorDisabledStateUnknown; | 118 m_ancestorDisabledState = AncestorDisabledStateUnknown; |
| 119 disabledAttributeChanged(); | 119 disabledAttributeChanged(); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) | 494 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node
* node) |
| 495 { | 495 { |
| 496 for (; node; node = node->parentNode()) { | 496 for (; node; node = node->parentNode()) { |
| 497 if (node->isElementNode() && toElement(node)->isFormControlElement()) | 497 if (node->isElementNode() && toElement(node)->isFormControlElement()) |
| 498 return toHTMLFormControlElement(node); | 498 return toHTMLFormControlElement(node); |
| 499 } | 499 } |
| 500 return 0; | 500 return 0; |
| 501 } | 501 } |
| 502 | 502 |
| 503 } // namespace Webcore | 503 } // namespace Webcore |
| OLD | NEW |