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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLOptionElement.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, 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 17 matching lines...) Expand all
28 #include "HTMLNames.h" 28 #include "HTMLNames.h"
29 #include "core/dom/Document.h" 29 #include "core/dom/Document.h"
30 #include "core/dom/NodeRenderStyle.h" 30 #include "core/dom/NodeRenderStyle.h"
31 #include "core/html/HTMLSelectElement.h" 31 #include "core/html/HTMLSelectElement.h"
32 #include "wtf/StdLibExtras.h" 32 #include "wtf/StdLibExtras.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 using namespace HTMLNames; 36 using namespace HTMLNames;
37 37
38 inline HTMLOptGroupElement::HTMLOptGroupElement(const QualifiedName& tagName, Do cument* document) 38 inline HTMLOptGroupElement::HTMLOptGroupElement(const QualifiedName& tagName, Do cument& document)
39 : HTMLElement(tagName, document) 39 : HTMLElement(tagName, document)
40 { 40 {
41 ASSERT(hasTagName(optgroupTag)); 41 ASSERT(hasTagName(optgroupTag));
42 setHasCustomStyleCallbacks(); 42 setHasCustomStyleCallbacks();
43 ScriptWrappable::init(this); 43 ScriptWrappable::init(this);
44 } 44 }
45 45
46 PassRefPtr<HTMLOptGroupElement> HTMLOptGroupElement::create(const QualifiedName& tagName, Document* document) 46 PassRefPtr<HTMLOptGroupElement> HTMLOptGroupElement::create(const QualifiedName& tagName, Document& document)
47 { 47 {
48 return adoptRef(new HTMLOptGroupElement(tagName, document)); 48 return adoptRef(new HTMLOptGroupElement(tagName, document));
49 } 49 }
50 50
51 bool HTMLOptGroupElement::isDisabledFormControl() const 51 bool HTMLOptGroupElement::isDisabledFormControl() const
52 { 52 {
53 return fastHasAttribute(disabledAttr); 53 return fastHasAttribute(disabledAttr);
54 } 54 }
55 55
56 bool HTMLOptGroupElement::rendererIsFocusable() const 56 bool HTMLOptGroupElement::rendererIsFocusable() const
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 void HTMLOptGroupElement::accessKeyAction(bool) 150 void HTMLOptGroupElement::accessKeyAction(bool)
151 { 151 {
152 HTMLSelectElement* select = ownerSelectElement(); 152 HTMLSelectElement* select = ownerSelectElement();
153 // send to the parent to bring focus to the list box 153 // send to the parent to bring focus to the list box
154 if (select && !select->focused()) 154 if (select && !select->focused())
155 select->accessKeyAction(false); 155 select->accessKeyAction(false);
156 } 156 }
157 157
158 } // namespace 158 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLOptionElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698