| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 { | 54 { |
| 55 return constUnwrap<Element>()->isTextFormControl(); | 55 return constUnwrap<Element>()->isTextFormControl(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 // TODO(dglazkov): Remove. Consumers of this code should use Node:hasEditableSty
le. | 58 // TODO(dglazkov): Remove. Consumers of this code should use Node:hasEditableSty
le. |
| 59 // http://crbug.com/612560 | 59 // http://crbug.com/612560 |
| 60 bool WebElement::isEditable() const | 60 bool WebElement::isEditable() const |
| 61 { | 61 { |
| 62 const Element* element = constUnwrap<Element>(); | 62 const Element* element = constUnwrap<Element>(); |
| 63 | 63 |
| 64 if (element->isContentEditable()) | 64 if (blink::isContentEditable(*element)) |
| 65 return true; | 65 return true; |
| 66 | 66 |
| 67 if (element->isTextFormControl()) { | 67 if (element->isTextFormControl()) { |
| 68 const HTMLTextFormControlElement* input = toHTMLTextFormControlElement(e
lement); | 68 const HTMLTextFormControlElement* input = toHTMLTextFormControlElement(e
lement); |
| 69 if (!input->isDisabledOrReadOnly()) | 69 if (!input->isDisabledOrReadOnly()) |
| 70 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 return equalIgnoringCase(element->getAttribute(roleAttr), "textbox"); | 73 return equalIgnoringCase(element->getAttribute(roleAttr), "textbox"); |
| 74 } | 74 } |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 m_private = elem; | 163 m_private = elem; |
| 164 return *this; | 164 return *this; |
| 165 } | 165 } |
| 166 | 166 |
| 167 WebElement::operator Element*() const | 167 WebElement::operator Element*() const |
| 168 { | 168 { |
| 169 return toElement(m_private.get()); | 169 return toElement(m_private.get()); |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |