Index: Source/core/html/HTMLObjectElement.cpp |
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp |
index 76d2709da0c1a3b12500a1c79257659dad30e836..51ec27e27a930e7e152f6e831cc0925fd9092400 100644 |
--- a/Source/core/html/HTMLObjectElement.cpp |
+++ b/Source/core/html/HTMLObjectElement.cpp |
@@ -98,22 +98,25 @@ void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicSt |
size_t pos = m_serviceType.find(";"); |
if (pos != kNotFound) |
m_serviceType = m_serviceType.left(pos); |
- if (renderer()) |
- setNeedsWidgetUpdate(true); |
+ setNeedsWidgetUpdate(true); |
+ // Per spec, only re-determine representation iff 'classid' and 'data' aren't present. |
+ if (!fastHasAttribute(classidAttr) && !fastHasAttribute(dataAttr)) |
+ setNeedsStyleRecalc(); |
} else if (name == dataAttr) { |
m_url = stripLeadingAndTrailingHTMLSpaces(value); |
- if (renderer()) { |
- setNeedsWidgetUpdate(true); |
- if (isImageType()) { |
- if (!m_imageLoader) |
- m_imageLoader = adoptPtr(new HTMLImageLoader(this)); |
- m_imageLoader->updateFromElementIgnoringPreviousError(); |
- } |
+ setNeedsWidgetUpdate(true); |
+ if (renderer() && isImageType()) { |
+ if (!m_imageLoader) |
+ m_imageLoader = adoptPtr(new HTMLImageLoader(this)); |
eseidel
2014/01/15 18:40:09
Lame that the original author didn't just add an e
|
+ m_imageLoader->updateFromElementIgnoringPreviousError(); |
+ } 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
|
+ setNeedsStyleRecalc(); |
} |
} else if (name == classidAttr) { |
m_classId = value; |
- if (renderer()) |
- setNeedsWidgetUpdate(true); |
+ setNeedsWidgetUpdate(true); |
+ // Always re-determine representation upon 'classid' changing. |
+ setNeedsStyleRecalc(); |
} else if (name == onbeforeloadAttr) { |
setAttributeEventListener(EventTypeNames::beforeload, createAttributeEventListener(this, name, value)); |
} else { |