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

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

Issue 137833018: Remove form control related virtual methods from Element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add HTMLFormControlElement.setFocus as suggested Created 6 years, 10 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
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | no next file » | 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, 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 { 51 {
52 return fastHasAttribute(disabledAttr); 52 return fastHasAttribute(disabledAttr);
53 } 53 }
54 54
55 bool HTMLOptGroupElement::rendererIsFocusable() const 55 bool HTMLOptGroupElement::rendererIsFocusable() const
56 { 56 {
57 // Optgroup elements do not have a renderer so we check the renderStyle inst ead. 57 // Optgroup elements do not have a renderer so we check the renderStyle inst ead.
58 return renderStyle() && renderStyle()->display() != NONE; 58 return renderStyle() && renderStyle()->display() != NONE;
59 } 59 }
60 60
61 const AtomicString& HTMLOptGroupElement::formControlType() const
62 {
63 DEFINE_STATIC_LOCAL(const AtomicString, optgroup, ("optgroup", AtomicString: :ConstructFromLiteral));
64 return optgroup;
65 }
66
67 void HTMLOptGroupElement::childrenChanged(bool changedByParser, Node* beforeChan ge, Node* afterChange, int childCountDelta) 61 void HTMLOptGroupElement::childrenChanged(bool changedByParser, Node* beforeChan ge, Node* afterChange, int childCountDelta)
68 { 62 {
69 recalcSelectOptions(); 63 recalcSelectOptions();
70 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi ldCountDelta); 64 HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, chi ldCountDelta);
71 } 65 }
72 66
73 void HTMLOptGroupElement::parseAttribute(const QualifiedName& name, const Atomic String& value) 67 void HTMLOptGroupElement::parseAttribute(const QualifiedName& name, const Atomic String& value)
74 { 68 {
75 HTMLElement::parseAttribute(name, value); 69 HTMLElement::parseAttribute(name, value);
76 recalcSelectOptions(); 70 recalcSelectOptions();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 141
148 void HTMLOptGroupElement::accessKeyAction(bool) 142 void HTMLOptGroupElement::accessKeyAction(bool)
149 { 143 {
150 HTMLSelectElement* select = ownerSelectElement(); 144 HTMLSelectElement* select = ownerSelectElement();
151 // send to the parent to bring focus to the list box 145 // send to the parent to bring focus to the list box
152 if (select && !select->focused()) 146 if (select && !select->focused())
153 select->accessKeyAction(false); 147 select->accessKeyAction(false);
154 } 148 }
155 149
156 } // namespace 150 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698