| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 using namespace HTMLNames; | 47 using namespace HTMLNames; |
| 48 | 48 |
| 49 bool WebElement::isFormControlElement() const { | 49 bool WebElement::isFormControlElement() const { |
| 50 return constUnwrap<Element>()->isFormControlElement(); | 50 return constUnwrap<Element>()->isFormControlElement(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool WebElement::isTextFormControlElement() const { | 53 bool WebElement::isTextFormControlElement() const { |
| 54 return constUnwrap<Element>()->isTextFormControl(); | 54 return constUnwrap<Element>()->isTextFormControl(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // TODO(dglazkov): Remove. Consumers of this code should use Node:hasEditableSty
le. | 57 // TODO(dglazkov): Remove. Consumers of this code should use |
| 58 // http://crbug.com/612560 | 58 // Node:hasEditableStyle. http://crbug.com/612560 |
| 59 bool WebElement::isEditable() const { | 59 bool WebElement::isEditable() const { |
| 60 const Element* element = constUnwrap<Element>(); | 60 const Element* element = constUnwrap<Element>(); |
| 61 | 61 |
| 62 element->document().updateStyleAndLayoutTree(); | 62 element->document().updateStyleAndLayoutTree(); |
| 63 if (hasEditableStyle(*element)) | 63 if (hasEditableStyle(*element)) |
| 64 return true; | 64 return true; |
| 65 | 65 |
| 66 if (element->isTextFormControl()) { | 66 if (element->isTextFormControl()) { |
| 67 const HTMLTextFormControlElement* input = | 67 const HTMLTextFormControlElement* input = |
| 68 toHTMLTextFormControlElement(element); | 68 toHTMLTextFormControlElement(element); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 WebElement& WebElement::operator=(Element* elem) { | 149 WebElement& WebElement::operator=(Element* elem) { |
| 150 m_private = elem; | 150 m_private = elem; |
| 151 return *this; | 151 return *this; |
| 152 } | 152 } |
| 153 | 153 |
| 154 WebElement::operator Element*() const { | 154 WebElement::operator Element*() const { |
| 155 return toElement(m_private.get()); | 155 return toElement(m_private.get()); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |