Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: Source/core/html/HTMLLabelElement.cpp

Issue 327633004: Apply DEFINE/DECLARE_NODE_FACTORY(T) macro to element factories with single Document& argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLLabelElement.h ('k') | Source/core/html/HTMLLegendElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLabelElement.h ('k') | Source/core/html/HTMLLegendElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698