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

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

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 inline HTMLLabelElement::HTMLLabelElement(Document& document) 45 inline HTMLLabelElement::HTMLLabelElement(Document& document)
46 : HTMLElement(labelTag, document), m_processingClick(false) {} 46 : HTMLElement(labelTag, document), m_processingClick(false) {}
47 47
48 HTMLLabelElement* HTMLLabelElement::create(Document& document) { 48 HTMLLabelElement* HTMLLabelElement::create(Document& document) {
49 return new HTMLLabelElement(document); 49 return new HTMLLabelElement(document);
50 } 50 }
51 51
52 LabelableElement* HTMLLabelElement::control() const { 52 LabelableElement* HTMLLabelElement::control() const {
53 const AtomicString& controlId = getAttribute(forAttr); 53 const AtomicString& controlId = getAttribute(forAttr);
54 if (controlId.isNull()) { 54 if (controlId.isNull()) {
55 // Search the children and descendants of the label element for a form eleme nt. 55 // Search the children and descendants of the label element for a form
56 // element.
56 // per http://dev.w3.org/html5/spec/Overview.html#the-label-element 57 // per http://dev.w3.org/html5/spec/Overview.html#the-label-element
57 // the form element must be "labelable form-associated element". 58 // the form element must be "labelable form-associated element".
58 for (LabelableElement& element : 59 for (LabelableElement& element :
59 Traversal<LabelableElement>::descendantsOf(*this)) { 60 Traversal<LabelableElement>::descendantsOf(*this)) {
60 if (element.supportLabels()) { 61 if (element.supportLabels()) {
61 if (!element.isFormControlElement()) 62 if (!element.isFormControlElement())
62 UseCounter::count( 63 UseCounter::count(
63 document(), 64 document(),
64 UseCounter::HTMLLabelElementControlForNonFormAssociatedElement); 65 UseCounter::HTMLLabelElementControlForNonFormAssociatedElement);
65 return &element; 66 return &element;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 225 }
225 226
226 void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) { 227 void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) {
227 if (HTMLElement* element = control()) 228 if (HTMLElement* element = control())
228 element->accessKeyAction(sendMouseEvents); 229 element->accessKeyAction(sendMouseEvents);
229 else 230 else
230 HTMLElement::accessKeyAction(sendMouseEvents); 231 HTMLElement::accessKeyAction(sendMouseEvents);
231 } 232 }
232 233
233 } // namespace blink 234 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLIElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLLinkElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698