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, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. |
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 | 91 |
92 void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value) | 92 void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value) |
93 { | 93 { |
94 if (name == formAttr) | 94 if (name == formAttr) |
95 formAttributeChanged(); | 95 formAttributeChanged(); |
96 else if (name == typeAttr) { | 96 else if (name == typeAttr) { |
97 m_serviceType = value.lower(); | 97 m_serviceType = value.lower(); |
98 size_t pos = m_serviceType.find(";"); | 98 size_t pos = m_serviceType.find(";"); |
99 if (pos != kNotFound) | 99 if (pos != kNotFound) |
100 m_serviceType = m_serviceType.left(pos); | 100 m_serviceType = m_serviceType.left(pos); |
101 if (renderer()) | 101 setNeedsWidgetUpdate(true); |
102 setNeedsWidgetUpdate(true); | 102 // Per spec, only re-determine representation iff 'classid' and 'data' a ren't present. |
103 if (!fastHasAttribute(classidAttr) && !fastHasAttribute(dataAttr)) | |
104 setNeedsStyleRecalc(); | |
103 } else if (name == dataAttr) { | 105 } else if (name == dataAttr) { |
104 m_url = stripLeadingAndTrailingHTMLSpaces(value); | 106 m_url = stripLeadingAndTrailingHTMLSpaces(value); |
105 if (renderer()) { | 107 setNeedsWidgetUpdate(true); |
106 setNeedsWidgetUpdate(true); | 108 if (renderer() && isImageType()) { |
107 if (isImageType()) { | 109 if (!m_imageLoader) |
108 if (!m_imageLoader) | 110 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); |
eseidel
2014/01/15 18:40:09
Lame that the original author didn't just add an e
| |
109 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); | 111 m_imageLoader->updateFromElementIgnoringPreviousError(); |
110 m_imageLoader->updateFromElementIgnoringPreviousError(); | 112 } else if (!fastHasAttribute(classidAttr)) { |
eseidel
2014/01/15 18:40:09
I don't understand this bit? Maybe we should abst
sof
2014/01/15 19:52:54
That's a good suggestion; now done (taking care no
| |
111 } | 113 setNeedsStyleRecalc(); |
112 } | 114 } |
113 } else if (name == classidAttr) { | 115 } else if (name == classidAttr) { |
114 m_classId = value; | 116 m_classId = value; |
115 if (renderer()) | 117 setNeedsWidgetUpdate(true); |
116 setNeedsWidgetUpdate(true); | 118 // Always re-determine representation upon 'classid' changing. |
119 setNeedsStyleRecalc(); | |
117 } else if (name == onbeforeloadAttr) { | 120 } else if (name == onbeforeloadAttr) { |
118 setAttributeEventListener(EventTypeNames::beforeload, createAttributeEve ntListener(this, name, value)); | 121 setAttributeEventListener(EventTypeNames::beforeload, createAttributeEve ntListener(this, name, value)); |
119 } else { | 122 } else { |
120 HTMLPlugInElement::parseAttribute(name, value); | 123 HTMLPlugInElement::parseAttribute(name, value); |
121 } | 124 } |
122 } | 125 } |
123 | 126 |
124 static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramV alues) | 127 static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramV alues) |
125 { | 128 { |
126 // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e . Real and WMP | 129 // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e . Real and WMP |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
454 { | 457 { |
455 return fastHasAttribute(usemapAttr); | 458 return fastHasAttribute(usemapAttr); |
456 } | 459 } |
457 | 460 |
458 bool HTMLObjectElement::useFallbackContent() const | 461 bool HTMLObjectElement::useFallbackContent() const |
459 { | 462 { |
460 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; | 463 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; |
461 } | 464 } |
462 | 465 |
463 } | 466 } |
OLD | NEW |