| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void HTMLSourceElement::setSrc(const String& url) | 82 void HTMLSourceElement::setSrc(const String& url) |
| 83 { | 83 { |
| 84 setAttribute(srcAttr, AtomicString(url)); | 84 setAttribute(srcAttr, AtomicString(url)); |
| 85 } | 85 } |
| 86 | 86 |
| 87 const AtomicString& HTMLSourceElement::type() const | 87 const AtomicString& HTMLSourceElement::type() const |
| 88 { | 88 { |
| 89 return getAttribute(typeAttr); | 89 return getAttribute(typeAttr); |
| 90 } | 90 } |
| 91 | 91 |
| 92 const AtomicString& HTMLSourceElement::media() const |
| 93 { |
| 94 return getAttribute(mediaAttr); |
| 95 } |
| 96 |
| 97 const AtomicString& HTMLSourceElement::srcset() const |
| 98 { |
| 99 return getAttribute(srcsetAttr); |
| 100 } |
| 101 |
| 102 const AtomicString& HTMLSourceElement::sizes() const |
| 103 { |
| 104 return getAttribute(sizesAttr); |
| 105 } |
| 106 |
| 92 void HTMLSourceElement::setType(const AtomicString& type) | 107 void HTMLSourceElement::setType(const AtomicString& type) |
| 93 { | 108 { |
| 94 setAttribute(typeAttr, type); | 109 setAttribute(typeAttr, type); |
| 95 } | 110 } |
| 96 | 111 |
| 97 void HTMLSourceElement::scheduleErrorEvent() | 112 void HTMLSourceElement::scheduleErrorEvent() |
| 98 { | 113 { |
| 99 WTF_LOG(Media, "HTMLSourceElement::scheduleErrorEvent - %p", this); | 114 WTF_LOG(Media, "HTMLSourceElement::scheduleErrorEvent - %p", this); |
| 100 sourceErrorEventSender().dispatchEventSoon(this); | 115 sourceErrorEventSender().dispatchEventSoon(this); |
| 101 } | 116 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 112 WTF_LOG(Media, "HTMLSourceElement::dispatchPendingEvent - %p", this); | 127 WTF_LOG(Media, "HTMLSourceElement::dispatchPendingEvent - %p", this); |
| 113 dispatchEvent(Event::createCancelable(EventTypeNames::error)); | 128 dispatchEvent(Event::createCancelable(EventTypeNames::error)); |
| 114 } | 129 } |
| 115 | 130 |
| 116 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const | 131 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const |
| 117 { | 132 { |
| 118 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute)
; | 133 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute)
; |
| 119 } | 134 } |
| 120 | 135 |
| 121 } | 136 } |
| OLD | NEW |