diff options
Diffstat (limited to 'WebCore/rendering/RenderPartObject.cpp')
-rw-r--r-- | WebCore/rendering/RenderPartObject.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/WebCore/rendering/RenderPartObject.cpp b/WebCore/rendering/RenderPartObject.cpp index 2964e39..b020ef6 100644 --- a/WebCore/rendering/RenderPartObject.cpp +++ b/WebCore/rendering/RenderPartObject.cpp @@ -72,7 +72,7 @@ static bool isURLAllowed(Document* doc, const String& url) KURL completeURL = doc->completeURL(url); bool foundSelfReference = false; for (Frame* frame = doc->frame(); frame; frame = frame->tree()->parent()) { - if (equalIgnoringRef(frame->loader()->url(), completeURL)) { + if (equalIgnoringFragmentIdentifier(frame->loader()->url(), completeURL)) { if (foundSelfReference) return false; foundSelfReference = true; @@ -142,6 +142,24 @@ static inline bool shouldUseEmbedDescendant(HTMLObjectElement* objectElement, co #endif } +static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramValues) +{ + // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e. Real and WMP + // require "src" attribute). + int srcIndex = -1, dataIndex = -1; + for (unsigned int i = 0; i < paramNames->size(); ++i) { + if (equalIgnoringCase((*paramNames)[i], "src")) + srcIndex = i; + else if (equalIgnoringCase((*paramNames)[i], "data")) + dataIndex = i; + } + + if (srcIndex == -1 && dataIndex != -1) { + paramNames->append("src"); + paramValues->append((*paramValues)[dataIndex]); + } +} + void RenderPartObject::updateWidget(bool onlyCreateNonNetscapePlugins) { String url; @@ -238,6 +256,8 @@ void RenderPartObject::updateWidget(bool onlyCreateNonNetscapePlugins) } } + mapDataParamToSrc(¶mNames, ¶mValues); + // If we still don't have a type, try to map from a specific CLASSID to a type. if (serviceType.isEmpty()) serviceType = serviceTypeForClassId(o->classId(), pluginData); |