| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 WebString WebElement::getAttribute(const WebString& attrName) const { | 89 WebString WebElement::getAttribute(const WebString& attrName) const { |
| 90 return constUnwrap<Element>()->getAttribute(attrName); | 90 return constUnwrap<Element>()->getAttribute(attrName); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void WebElement::setAttribute(const WebString& attrName, | 93 void WebElement::setAttribute(const WebString& attrName, |
| 94 const WebString& attrValue) { | 94 const WebString& attrValue) { |
| 95 // TODO: Custom element callbacks need to be called on WebKit API methods that | 95 // TODO: Custom element callbacks need to be called on WebKit API methods that |
| 96 // mutate the DOM in any way. | 96 // mutate the DOM in any way. |
| 97 V0CustomElementProcessingStack::CallbackDeliveryScope | 97 V0CustomElementProcessingStack::CallbackDeliveryScope |
| 98 deliverCustomElementCallbacks; | 98 deliverCustomElementCallbacks; |
| 99 unwrap<Element>()->setAttribute(attrName, attrValue, IGNORE_EXCEPTION); | 99 unwrap<Element>()->setAttribute(attrName, attrValue, |
| 100 IGNORE_EXCEPTION_FOR_TESTING); |
| 100 } | 101 } |
| 101 | 102 |
| 102 unsigned WebElement::attributeCount() const { | 103 unsigned WebElement::attributeCount() const { |
| 103 if (!constUnwrap<Element>()->hasAttributes()) | 104 if (!constUnwrap<Element>()->hasAttributes()) |
| 104 return 0; | 105 return 0; |
| 105 return constUnwrap<Element>()->attributes().size(); | 106 return constUnwrap<Element>()->attributes().size(); |
| 106 } | 107 } |
| 107 | 108 |
| 108 WebString WebElement::attributeLocalName(unsigned index) const { | 109 WebString WebElement::attributeLocalName(unsigned index) const { |
| 109 if (index >= attributeCount()) | 110 if (index >= attributeCount()) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 WebElement& WebElement::operator=(Element* elem) { | 144 WebElement& WebElement::operator=(Element* elem) { |
| 144 m_private = elem; | 145 m_private = elem; |
| 145 return *this; | 146 return *this; |
| 146 } | 147 } |
| 147 | 148 |
| 148 WebElement::operator Element*() const { | 149 WebElement::operator Element*() const { |
| 149 return toElement(m_private.get()); | 150 return toElement(m_private.get()); |
| 150 } | 151 } |
| 151 | 152 |
| 152 } // namespace blink | 153 } // namespace blink |
| OLD | NEW |