| 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 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "public/web/WebFormControlElement.h" | 32 #include "public/web/WebFormControlElement.h" |
| 33 | 33 |
| 34 #include "core/dom/NodeLayoutStyle.h" | 34 #include "core/dom/NodeComputedStyle.h" |
| 35 #include "core/html/HTMLFormControlElement.h" | 35 #include "core/html/HTMLFormControlElement.h" |
| 36 #include "core/html/HTMLFormElement.h" | 36 #include "core/html/HTMLFormElement.h" |
| 37 #include "core/html/HTMLInputElement.h" | 37 #include "core/html/HTMLInputElement.h" |
| 38 #include "core/html/HTMLSelectElement.h" | 38 #include "core/html/HTMLSelectElement.h" |
| 39 #include "core/html/HTMLTextAreaElement.h" | 39 #include "core/html/HTMLTextAreaElement.h" |
| 40 | 40 |
| 41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 { | 158 { |
| 159 if (isHTMLInputElement(*m_private)) | 159 if (isHTMLInputElement(*m_private)) |
| 160 return constUnwrap<HTMLInputElement>()->selectionEnd(); | 160 return constUnwrap<HTMLInputElement>()->selectionEnd(); |
| 161 if (isHTMLTextAreaElement(*m_private)) | 161 if (isHTMLTextAreaElement(*m_private)) |
| 162 return constUnwrap<HTMLTextAreaElement>()->selectionEnd(); | 162 return constUnwrap<HTMLTextAreaElement>()->selectionEnd(); |
| 163 return 0; | 163 return 0; |
| 164 } | 164 } |
| 165 | 165 |
| 166 WebString WebFormControlElement::directionForFormData() const | 166 WebString WebFormControlElement::directionForFormData() const |
| 167 { | 167 { |
| 168 if (const LayoutStyle* style = constUnwrap<HTMLFormControlElement>()->layout
Style()) | 168 if (const ComputedStyle* style = constUnwrap<HTMLFormControlElement>()->comp
utedStyle()) |
| 169 return style->isLeftToRightDirection() ? WebString::fromUTF8("ltr") : We
bString::fromUTF8("rtl"); | 169 return style->isLeftToRightDirection() ? WebString::fromUTF8("ltr") : We
bString::fromUTF8("rtl"); |
| 170 return WebString::fromUTF8("ltr"); | 170 return WebString::fromUTF8("ltr"); |
| 171 } | 171 } |
| 172 | 172 |
| 173 bool WebFormControlElement::isActivatedSubmit() const | 173 bool WebFormControlElement::isActivatedSubmit() const |
| 174 { | 174 { |
| 175 return constUnwrap<HTMLFormControlElement>()->isActivatedSubmit(); | 175 return constUnwrap<HTMLFormControlElement>()->isActivatedSubmit(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 WebFormElement WebFormControlElement::form() const | 178 WebFormElement WebFormControlElement::form() const |
| (...skipping 11 matching lines...) Expand all Loading... |
| 190 m_private = elem; | 190 m_private = elem; |
| 191 return *this; | 191 return *this; |
| 192 } | 192 } |
| 193 | 193 |
| 194 WebFormControlElement::operator PassRefPtrWillBeRawPtr<HTMLFormControlElement>()
const | 194 WebFormControlElement::operator PassRefPtrWillBeRawPtr<HTMLFormControlElement>()
const |
| 195 { | 195 { |
| 196 return toHTMLFormControlElement(m_private.get()); | 196 return toHTMLFormControlElement(m_private.get()); |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace blink | 199 } // namespace blink |
| OLD | NEW |