| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 { | 58 { |
| 59 return constUnwrap<Element>()->tagName(); | 59 return constUnwrap<Element>()->tagName(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool WebElement::hasTagName(const WebString& tagName) const | 62 bool WebElement::hasTagName(const WebString& tagName) const |
| 63 { | 63 { |
| 64 return equalIgnoringCase(constUnwrap<Element>()->tagName(), | 64 return equalIgnoringCase(constUnwrap<Element>()->tagName(), |
| 65 tagName.operator String()); | 65 tagName.operator String()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool WebElement::hasHTMLTagName(const WebString& tagName) const |
| 69 { |
| 70 const Element* element = constUnwrap<Element>(); |
| 71 return HTMLNames::xhtmlNamespaceURI == element->namespaceURI() && equalIgnor
ingCase(element->tagName(), String(tagName)); |
| 72 } |
| 73 |
| 68 bool WebElement::hasAttribute(const WebString& attrName) const | 74 bool WebElement::hasAttribute(const WebString& attrName) const |
| 69 { | 75 { |
| 70 return constUnwrap<Element>()->hasAttribute(attrName); | 76 return constUnwrap<Element>()->hasAttribute(attrName); |
| 71 } | 77 } |
| 72 | 78 |
| 73 WebString WebElement::getAttribute(const WebString& attrName) const | 79 WebString WebElement::getAttribute(const WebString& attrName) const |
| 74 { | 80 { |
| 75 return constUnwrap<Element>()->getAttribute(attrName); | 81 return constUnwrap<Element>()->getAttribute(attrName); |
| 76 } | 82 } |
| 77 | 83 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 m_private = elem; | 146 m_private = elem; |
| 141 return *this; | 147 return *this; |
| 142 } | 148 } |
| 143 | 149 |
| 144 WebElement::operator PassRefPtr<Element>() const | 150 WebElement::operator PassRefPtr<Element>() const |
| 145 { | 151 { |
| 146 return static_cast<Element*>(m_private.get()); | 152 return static_cast<Element*>(m_private.get()); |
| 147 } | 153 } |
| 148 | 154 |
| 149 } // namespace WebKit | 155 } // namespace WebKit |
| OLD | NEW |