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 if (renderer()) { |
esprehn
2014/01/15 00:16:38
Blah, this isn't right, if the thing was display:
sof
2014/01/15 15:26:58
ok, I went ahead & did it here/now.
| |
102 setNeedsWidgetUpdate(true); | 102 setNeedsWidgetUpdate(true); |
103 // Per spec, only re-determine representation iff 'classid' and 'dat a' aren't present. | |
eseidel
2014/01/15 00:09:41
setNeedsWidgetUpdate is going to cause a recalc, n
esprehn
2014/01/15 00:16:38
no, it just sets a boolean, that whole system is b
| |
104 if (inDocument() && !fastHasAttribute(classidAttr) && !fastHasAttrib ute(dataAttr)) | |
esprehn
2014/01/15 00:16:38
You don't need the inDocument() check, setNeedsSty
sof
2014/01/15 15:26:58
Done.
| |
105 setNeedsStyleRecalc(); | |
106 } | |
103 } else if (name == dataAttr) { | 107 } else if (name == dataAttr) { |
104 m_url = stripLeadingAndTrailingHTMLSpaces(value); | 108 m_url = stripLeadingAndTrailingHTMLSpaces(value); |
105 if (renderer()) { | 109 if (renderer()) { |
106 setNeedsWidgetUpdate(true); | 110 setNeedsWidgetUpdate(true); |
107 if (isImageType()) { | 111 if (isImageType()) { |
108 if (!m_imageLoader) | 112 if (!m_imageLoader) |
109 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); | 113 m_imageLoader = adoptPtr(new HTMLImageLoader(this)); |
110 m_imageLoader->updateFromElementIgnoringPreviousError(); | 114 m_imageLoader->updateFromElementIgnoringPreviousError(); |
115 } else if (inDocument() && !fastHasAttribute(classidAttr)) { | |
esprehn
2014/01/15 00:16:38
Same, don't check inDocument()
sof
2014/01/15 15:26:58
Done.
| |
116 setNeedsStyleRecalc(); | |
111 } | 117 } |
112 } | 118 } |
113 } else if (name == classidAttr) { | 119 } else if (name == classidAttr) { |
114 m_classId = value; | 120 m_classId = value; |
115 if (renderer()) | 121 if (renderer()) { |
116 setNeedsWidgetUpdate(true); | 122 setNeedsWidgetUpdate(true); |
123 // Always re-determine representation upon 'classid' changing. | |
124 if (inDocument()) | |
esprehn
2014/01/15 00:16:38
Remove inDocument()
sof
2014/01/15 15:26:58
Done.
| |
125 setNeedsStyleRecalc(); | |
126 } | |
117 } else if (name == onbeforeloadAttr) { | 127 } else if (name == onbeforeloadAttr) { |
118 setAttributeEventListener(EventTypeNames::beforeload, createAttributeEve ntListener(this, name, value)); | 128 setAttributeEventListener(EventTypeNames::beforeload, createAttributeEve ntListener(this, name, value)); |
119 } else { | 129 } else { |
120 HTMLPlugInElement::parseAttribute(name, value); | 130 HTMLPlugInElement::parseAttribute(name, value); |
121 } | 131 } |
122 } | 132 } |
123 | 133 |
124 static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramV alues) | 134 static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramV alues) |
125 { | 135 { |
126 // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e . Real and WMP | 136 // 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 { | 464 { |
455 return fastHasAttribute(usemapAttr); | 465 return fastHasAttribute(usemapAttr); |
456 } | 466 } |
457 | 467 |
458 bool HTMLObjectElement::useFallbackContent() const | 468 bool HTMLObjectElement::useFallbackContent() const |
459 { | 469 { |
460 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; | 470 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; |
461 } | 471 } |
462 | 472 |
463 } | 473 } |
OLD | NEW |