| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 if (!m_mediaQueryList) | 157 if (!m_mediaQueryList) |
| 158 return true; | 158 return true; |
| 159 | 159 |
| 160 return m_mediaQueryList->matches(); | 160 return m_mediaQueryList->matches(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const { | 163 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const { |
| 164 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute); | 164 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void HTMLSourceElement::parseAttribute(const QualifiedName& name, | 167 void HTMLSourceElement::parseAttribute( |
| 168 const AtomicString& oldValue, | 168 const AttributeModificationParams& params) { |
| 169 const AtomicString& value) { | 169 HTMLElement::parseAttribute(params); |
| 170 HTMLElement::parseAttribute(name, oldValue, value); | 170 const QualifiedName& name = params.name; |
| 171 if (name == mediaAttr) | 171 if (name == mediaAttr) |
| 172 createMediaQueryList(value); | 172 createMediaQueryList(params.newValue); |
| 173 if (name == srcsetAttr || name == sizesAttr || name == mediaAttr || | 173 if (name == srcsetAttr || name == sizesAttr || name == mediaAttr || |
| 174 name == typeAttr) { | 174 name == typeAttr) { |
| 175 Element* parent = parentElement(); | 175 Element* parent = parentElement(); |
| 176 if (isHTMLPictureElement(parent)) | 176 if (isHTMLPictureElement(parent)) |
| 177 toHTMLPictureElement(parent)->sourceOrMediaChanged(); | 177 toHTMLPictureElement(parent)->sourceOrMediaChanged(); |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 void HTMLSourceElement::notifyMediaQueryChanged() { | 181 void HTMLSourceElement::notifyMediaQueryChanged() { |
| 182 Element* parent = parentElement(); | 182 Element* parent = parentElement(); |
| 183 if (isHTMLPictureElement(parent)) | 183 if (isHTMLPictureElement(parent)) |
| 184 toHTMLPictureElement(parent)->sourceOrMediaChanged(); | 184 toHTMLPictureElement(parent)->sourceOrMediaChanged(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 DEFINE_TRACE(HTMLSourceElement) { | 187 DEFINE_TRACE(HTMLSourceElement) { |
| 188 visitor->trace(m_mediaQueryList); | 188 visitor->trace(m_mediaQueryList); |
| 189 visitor->trace(m_listener); | 189 visitor->trace(m_listener); |
| 190 HTMLElement::trace(visitor); | 190 HTMLElement::trace(visitor); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace blink | 193 } // namespace blink |
| OLD | NEW |