| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
| 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv
ed. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 for (const Attribute& attribute : attributes) { | 119 for (const Attribute& attribute : attributes) { |
| 120 paramNames.append(attribute.localName().getString()); | 120 paramNames.append(attribute.localName().getString()); |
| 121 paramValues.append(attribute.value().getString()); | 121 paramValues.append(attribute.value().getString()); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | 124 |
| 125 // FIXME: This should be unified with HTMLObjectElement::updateWidget and | 125 // FIXME: This should be unified with HTMLObjectElement::updateWidget and |
| 126 // moved down into HTMLPluginElement.cpp | 126 // moved down into HTMLPluginElement.cpp |
| 127 void HTMLEmbedElement::updateWidgetInternal() | 127 void HTMLEmbedElement::updateWidgetInternal() |
| 128 { | 128 { |
| 129 ASSERT(!layoutEmbeddedItem().showsUnavailablePluginIndicator()); | 129 DCHECK(!layoutEmbeddedItem().showsUnavailablePluginIndicator()); |
| 130 ASSERT(needsWidgetUpdate()); | 130 DCHECK(needsWidgetUpdate()); |
| 131 setNeedsWidgetUpdate(false); | 131 setNeedsWidgetUpdate(false); |
| 132 | 132 |
| 133 if (m_url.isEmpty() && m_serviceType.isEmpty()) | 133 if (m_url.isEmpty() && m_serviceType.isEmpty()) |
| 134 return; | 134 return; |
| 135 | 135 |
| 136 // Note these pass m_url and m_serviceType to allow better code sharing with | 136 // Note these pass m_url and m_serviceType to allow better code sharing with |
| 137 // <object> which modifies url and serviceType before calling these. | 137 // <object> which modifies url and serviceType before calling these. |
| 138 if (!allowedToLoadFrameURL(m_url)) | 138 if (!allowedToLoadFrameURL(m_url)) |
| 139 return; | 139 return; |
| 140 | 140 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 if (!fastHasAttribute(srcAttr) && !fastHasAttribute(typeAttr)) | 174 if (!fastHasAttribute(srcAttr) && !fastHasAttribute(typeAttr)) |
| 175 return false; | 175 return false; |
| 176 | 176 |
| 177 // * The element has a media element ancestor. | 177 // * The element has a media element ancestor. |
| 178 // -> It's realized by LayoutMedia::isChildAllowed. | 178 // -> It's realized by LayoutMedia::isChildAllowed. |
| 179 | 179 |
| 180 // * The element has an ancestor object element that is not showing its | 180 // * The element has an ancestor object element that is not showing its |
| 181 // fallback content. | 181 // fallback content. |
| 182 ContainerNode* p = parentNode(); | 182 ContainerNode* p = parentNode(); |
| 183 if (isHTMLObjectElement(p)) { | 183 if (isHTMLObjectElement(p)) { |
| 184 ASSERT(p->layoutObject()); | 184 DCHECK(p->layoutObject()); |
| 185 if (!toHTMLObjectElement(p)->useFallbackContent()) { | 185 if (!toHTMLObjectElement(p)->useFallbackContent()) { |
| 186 ASSERT(!p->layoutObject()->isEmbeddedObject()); | 186 DCHECK(!p->layoutObject()->isEmbeddedObject()); |
| 187 return false; | 187 return false; |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 return HTMLPlugInElement::layoutObjectIsNeeded(style); | 190 return HTMLPlugInElement::layoutObjectIsNeeded(style); |
| 191 } | 191 } |
| 192 | 192 |
| 193 bool HTMLEmbedElement::isURLAttribute(const Attribute& attribute) const | 193 bool HTMLEmbedElement::isURLAttribute(const Attribute& attribute) const |
| 194 { | 194 { |
| 195 return attribute.name() == srcAttr || HTMLPlugInElement::isURLAttribute(attr
ibute); | 195 return attribute.name() == srcAttr || HTMLPlugInElement::isURLAttribute(attr
ibute); |
| 196 } | 196 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 209 { | 209 { |
| 210 // http://www.whatwg.org/specs/web-apps/current-work/#exposed | 210 // http://www.whatwg.org/specs/web-apps/current-work/#exposed |
| 211 for (HTMLObjectElement* object = Traversal<HTMLObjectElement>::firstAncestor
(*this); object; object = Traversal<HTMLObjectElement>::firstAncestor(*object))
{ | 211 for (HTMLObjectElement* object = Traversal<HTMLObjectElement>::firstAncestor
(*this); object; object = Traversal<HTMLObjectElement>::firstAncestor(*object))
{ |
| 212 if (object->isExposed()) | 212 if (object->isExposed()) |
| 213 return false; | 213 return false; |
| 214 } | 214 } |
| 215 return true; | 215 return true; |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |