| 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, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 return false; | 44 return false; |
| 45 return toLabelableElement(element).supportLabels(); | 45 return toLabelableElement(element).supportLabels(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 inline HTMLLabelElement::HTMLLabelElement(Document& document) | 48 inline HTMLLabelElement::HTMLLabelElement(Document& document) |
| 49 : HTMLElement(labelTag, document) | 49 : HTMLElement(labelTag, document) |
| 50 { | 50 { |
| 51 ScriptWrappable::init(this); | 51 ScriptWrappable::init(this); |
| 52 } | 52 } |
| 53 | 53 |
| 54 PassRefPtrWillBeRawPtr<HTMLLabelElement> HTMLLabelElement::create(Document& docu
ment) | 54 DEFINE_NODE_FACTORY(HTMLLabelElement) |
| 55 { | |
| 56 return adoptRefWillBeRefCountedGarbageCollected(new HTMLLabelElement(documen
t)); | |
| 57 } | |
| 58 | 55 |
| 59 bool HTMLLabelElement::rendererIsFocusable() const | 56 bool HTMLLabelElement::rendererIsFocusable() const |
| 60 { | 57 { |
| 61 HTMLLabelElement* that = const_cast<HTMLLabelElement*>(this); | 58 HTMLLabelElement* that = const_cast<HTMLLabelElement*>(this); |
| 62 return that->isContentEditable(); | 59 return that->isContentEditable(); |
| 63 } | 60 } |
| 64 | 61 |
| 65 LabelableElement* HTMLLabelElement::control() const | 62 LabelableElement* HTMLLabelElement::control() const |
| 66 { | 63 { |
| 67 const AtomicString& controlId = getAttribute(forAttr); | 64 const AtomicString& controlId = getAttribute(forAttr); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 193 |
| 197 void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) | 194 void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) |
| 198 { | 195 { |
| 199 if (HTMLElement* element = control()) | 196 if (HTMLElement* element = control()) |
| 200 element->accessKeyAction(sendMouseEvents); | 197 element->accessKeyAction(sendMouseEvents); |
| 201 else | 198 else |
| 202 HTMLElement::accessKeyAction(sendMouseEvents); | 199 HTMLElement::accessKeyAction(sendMouseEvents); |
| 203 } | 200 } |
| 204 | 201 |
| 205 } // namespace | 202 } // namespace |
| OLD | NEW |