OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 void WebSelectElement::setValue(const WebString& value) | 44 void WebSelectElement::setValue(const WebString& value) |
45 { | 45 { |
46 unwrap<HTMLSelectElement>()->setValue(value); | 46 unwrap<HTMLSelectElement>()->setValue(value); |
47 } | 47 } |
48 | 48 |
49 WebString WebSelectElement::value() const | 49 WebString WebSelectElement::value() const |
50 { | 50 { |
51 return constUnwrap<HTMLSelectElement>()->value(); | 51 return constUnwrap<HTMLSelectElement>()->value(); |
52 } | 52 } |
53 | 53 |
| 54 void WebSelectElement::setSuggestedValue(const WebString& value) |
| 55 { |
| 56 unwrap<HTMLSelectElement>()->setSuggestedValue(value); |
| 57 } |
| 58 |
| 59 WebString WebSelectElement::suggestedValue() const |
| 60 { |
| 61 return constUnwrap<HTMLSelectElement>()->suggestedValue(); |
| 62 } |
| 63 |
| 64 void WebSelectElement::setOriginalValue(const WebString& value) |
| 65 { |
| 66 unwrap<HTMLSelectElement>()->setOriginalValue(value); |
| 67 } |
| 68 |
| 69 WebString WebSelectElement::originalValue() const |
| 70 { |
| 71 return constUnwrap<HTMLSelectElement>()->originalValue(); |
| 72 } |
| 73 |
54 WebVector<WebElement> WebSelectElement::listItems() const | 74 WebVector<WebElement> WebSelectElement::listItems() const |
55 { | 75 { |
56 const Vector<HTMLElement*>& sourceItems = constUnwrap<HTMLSelectElement>()->
listItems(); | 76 const Vector<HTMLElement*>& sourceItems = constUnwrap<HTMLSelectElement>()->
listItems(); |
57 WebVector<WebElement> items(sourceItems.size()); | 77 WebVector<WebElement> items(sourceItems.size()); |
58 for (size_t i = 0; i < sourceItems.size(); ++i) | 78 for (size_t i = 0; i < sourceItems.size(); ++i) |
59 items[i] = WebElement(sourceItems[i]); | 79 items[i] = WebElement(sourceItems[i]); |
60 | 80 |
61 return items; | 81 return items; |
62 } | 82 } |
63 | 83 |
64 WebSelectElement::WebSelectElement(const PassRefPtr<HTMLSelectElement>& element) | 84 WebSelectElement::WebSelectElement(const PassRefPtr<HTMLSelectElement>& element) |
65 : WebFormControlElement(element) | 85 : WebFormControlElement(element) |
66 { | 86 { |
67 } | 87 } |
68 | 88 |
69 WebSelectElement& WebSelectElement::operator=(const PassRefPtr<HTMLSelectElement
>& element) | 89 WebSelectElement& WebSelectElement::operator=(const PassRefPtr<HTMLSelectElement
>& element) |
70 { | 90 { |
71 m_private = element; | 91 m_private = element; |
72 return *this; | 92 return *this; |
73 } | 93 } |
74 | 94 |
75 WebSelectElement::operator PassRefPtr<HTMLSelectElement>() const | 95 WebSelectElement::operator PassRefPtr<HTMLSelectElement>() const |
76 { | 96 { |
77 return toHTMLSelectElement(m_private.get()); | 97 return toHTMLSelectElement(m_private.get()); |
78 } | 98 } |
79 | 99 |
80 } // namespace blink | 100 } // namespace blink |
OLD | NEW |