| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 Element* parent = parentElement(); | 65 Element* parent = parentElement(); |
| 66 if (!parent && removalRoot->isElementNode()) | 66 if (!parent && removalRoot->isElementNode()) |
| 67 parent = toElement(removalRoot); | 67 parent = toElement(removalRoot); |
| 68 if (parent && parent->isMediaElement()) | 68 if (parent && parent->isMediaElement()) |
| 69 toHTMLMediaElement(parent)->sourceWasRemoved(this); | 69 toHTMLMediaElement(parent)->sourceWasRemoved(this); |
| 70 HTMLElement::removedFrom(removalRoot); | 70 HTMLElement::removedFrom(removalRoot); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void HTMLSourceElement::setSrc(const String& url) | 73 void HTMLSourceElement::setSrc(const String& url) |
| 74 { | 74 { |
| 75 setAttribute(srcAttr, url); | 75 setAttribute(srcAttr, AtomicString(url)); |
| 76 } | 76 } |
| 77 | 77 |
| 78 String HTMLSourceElement::media() const | 78 const AtomicString& HTMLSourceElement::media() const |
| 79 { | 79 { |
| 80 return getAttribute(mediaAttr); | 80 return getAttribute(mediaAttr); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void HTMLSourceElement::setMedia(const String& media) | 83 void HTMLSourceElement::setMedia(const AtomicString& media) |
| 84 { | 84 { |
| 85 setAttribute(mediaAttr, media); | 85 setAttribute(mediaAttr, media); |
| 86 } | 86 } |
| 87 | 87 |
| 88 String HTMLSourceElement::type() const | 88 const AtomicString& HTMLSourceElement::type() const |
| 89 { | 89 { |
| 90 return getAttribute(typeAttr); | 90 return getAttribute(typeAttr); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void HTMLSourceElement::setType(const String& type) | 93 void HTMLSourceElement::setType(const AtomicString& type) |
| 94 { | 94 { |
| 95 setAttribute(typeAttr, type); | 95 setAttribute(typeAttr, type); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void HTMLSourceElement::scheduleErrorEvent() | 98 void HTMLSourceElement::scheduleErrorEvent() |
| 99 { | 99 { |
| 100 WTF_LOG(Media, "HTMLSourceElement::scheduleErrorEvent - %p", this); | 100 WTF_LOG(Media, "HTMLSourceElement::scheduleErrorEvent - %p", this); |
| 101 if (m_errorEventTimer.isActive()) | 101 if (m_errorEventTimer.isActive()) |
| 102 return; | 102 return; |
| 103 | 103 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 115 WTF_LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this); | 115 WTF_LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this); |
| 116 dispatchEvent(Event::createCancelable(EventTypeNames::error)); | 116 dispatchEvent(Event::createCancelable(EventTypeNames::error)); |
| 117 } | 117 } |
| 118 | 118 |
| 119 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const | 119 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const |
| 120 { | 120 { |
| 121 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute)
; | 121 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute)
; |
| 122 } | 122 } |
| 123 | 123 |
| 124 } | 124 } |
| OLD | NEW |