OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 bool WebElement::isFormControlElement() const | 49 bool WebElement::isFormControlElement() const |
50 { | 50 { |
51 return constUnwrap<Element>()->isFormControlElement(); | 51 return constUnwrap<Element>()->isFormControlElement(); |
52 } | 52 } |
53 | 53 |
54 bool WebElement::isTextFormControlElement() const | 54 bool WebElement::isTextFormControlElement() const |
55 { | 55 { |
56 return constUnwrap<Element>()->isTextFormControl(); | 56 return constUnwrap<Element>()->isTextFormControl(); |
57 } | 57 } |
58 | 58 |
| 59 // TODO(dglazkov): Remove. Consumers of this code should use Node:hasEditableSty
le. |
| 60 // http://crbug.com/612560 |
59 bool WebElement::isEditable() const | 61 bool WebElement::isEditable() const |
60 { | 62 { |
61 const Element* element = constUnwrap<Element>(); | 63 const Element* element = constUnwrap<Element>(); |
62 | 64 |
63 if (element->isContentEditable()) | 65 if (element->isContentEditable()) |
64 return true; | 66 return true; |
65 | 67 |
66 if (element->isTextFormControl()) { | 68 if (element->isTextFormControl()) { |
67 const HTMLTextFormControlElement* input = toHTMLTextFormControlElement(e
lement); | 69 const HTMLTextFormControlElement* input = toHTMLTextFormControlElement(e
lement); |
68 if (!input->isDisabledOrReadOnly()) | 70 if (!input->isDisabledOrReadOnly()) |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 m_private = elem; | 170 m_private = elem; |
169 return *this; | 171 return *this; |
170 } | 172 } |
171 | 173 |
172 WebElement::operator Element*() const | 174 WebElement::operator Element*() const |
173 { | 175 { |
174 return toElement(m_private.get()); | 176 return toElement(m_private.get()); |
175 } | 177 } |
176 | 178 |
177 } // namespace blink | 179 } // namespace blink |
OLD | NEW |