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

Side by Side Diff: Source/core/html/HTMLOptionElement.h

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.cpp ('k') | Source/core/html/HTMLOptionElement.cpp » ('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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2010 Google Inc. All rights reserved. 6 * Copyright (C) 2010 Google Inc. All rights reserved.
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 "core/html/HTMLElement.h" 28 #include "core/html/HTMLElement.h"
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 class ExceptionState; 32 class ExceptionState;
33 class HTMLDataListElement; 33 class HTMLDataListElement;
34 class HTMLSelectElement; 34 class HTMLSelectElement;
35 35
36 class HTMLOptionElement FINAL : public HTMLElement { 36 class HTMLOptionElement FINAL : public HTMLElement {
37 public: 37 public:
38 static PassRefPtr<HTMLOptionElement> create(Document*); 38 static PassRefPtr<HTMLOptionElement> create(Document&);
39 static PassRefPtr<HTMLOptionElement> create(const QualifiedName&, Document*) ; 39 static PassRefPtr<HTMLOptionElement> create(const QualifiedName&, Document&) ;
40 static PassRefPtr<HTMLOptionElement> createForJSConstructor(Document*, const String& data, const String& value, 40 static PassRefPtr<HTMLOptionElement> createForJSConstructor(Document&, const String& data, const String& value,
41 bool defaultSelected, bool selected, ExceptionState&); 41 bool defaultSelected, bool selected, ExceptionState&);
42 42
43 virtual String text() const; 43 virtual String text() const;
44 void setText(const String&, ExceptionState&); 44 void setText(const String&, ExceptionState&);
45 45
46 int index() const; 46 int index() const;
47 47
48 String value() const; 48 String value() const;
49 void setValue(const String&); 49 void setValue(const String&);
50 50
51 bool selected(); 51 bool selected();
52 void setSelected(bool); 52 void setSelected(bool);
53 53
54 HTMLDataListElement* ownerDataListElement() const; 54 HTMLDataListElement* ownerDataListElement() const;
55 HTMLSelectElement* ownerSelectElement() const; 55 HTMLSelectElement* ownerSelectElement() const;
56 56
57 String label() const; 57 String label() const;
58 void setLabel(const String&); 58 void setLabel(const String&);
59 59
60 bool ownElementDisabled() const { return m_disabled; } 60 bool ownElementDisabled() const { return m_disabled; }
61 61
62 virtual bool isDisabledFormControl() const OVERRIDE; 62 virtual bool isDisabledFormControl() const OVERRIDE;
63 63
64 String textIndentedToRespectGroupLabel() const; 64 String textIndentedToRespectGroupLabel() const;
65 65
66 void setSelectedState(bool); 66 void setSelectedState(bool);
67 67
68 private: 68 private:
69 HTMLOptionElement(const QualifiedName&, Document*); 69 HTMLOptionElement(const QualifiedName&, Document&);
70 70
71 virtual bool rendererIsFocusable() const OVERRIDE; 71 virtual bool rendererIsFocusable() const OVERRIDE;
72 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; } 72 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
73 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 73 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
74 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; 74 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE;
75 75
76 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 76 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
77 77
78 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 78 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
79 virtual void accessKeyAction(bool); 79 virtual void accessKeyAction(bool);
(...skipping 24 matching lines...) Expand all
104 104
105 inline const HTMLOptionElement* toHTMLOptionElement(const Node* node) 105 inline const HTMLOptionElement* toHTMLOptionElement(const Node* node)
106 { 106 {
107 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::option Tag)); 107 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::option Tag));
108 return static_cast<const HTMLOptionElement*>(node); 108 return static_cast<const HTMLOptionElement*>(node);
109 } 109 }
110 110
111 } // namespace WebCore 111 } // namespace WebCore
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.cpp ('k') | Source/core/html/HTMLOptionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698