GNOME Bugzilla – Bug 170786
need to get href attribute for embed elements
Last modified: 2005-03-21 17:28:06 UTC
Often for movie embeds, the "src" attribute of a nsIDOMHTMLObjectElement contains just an intro movie, while the main content is referenced in the "href" attribute. We should get both urls.
Created attachment 38925 [details] [review] Adds some code into ProcessEmbedNode to handle href tag.
Comment on attachment 38925 [details] [review] Adds some code into ProcessEmbedNode to handle href tag. + void PageInfoHelper::ProcessEmbedNodeHelper (const nsEmbedString &tag, +PageInfoHelper::ProcessEmbedNodeHelper (const nsEmbedString &tag, Nit: &aTag + // Look at href tag + aElement->GetAttribute(mHrefAttr, tmp); Nit: space before "(" + // Look at src tag + rv = aElement->GetSrc (tmp); + if (NS_FAILED (rv) || !tmp.Length()) return; + + ProcessEmbedNodeHelper (tmp, aElement); Should we maybe only ProcessEmbedNodeHelper if NS_SUCCEEDED (rv) ? Like this: + rv = aElement->GetSrc (tmp); if (NS_SUCCEEDED (rv) && tmp.Length ()) { ProcessEmbedNodeHelper (tmp, aElement); }
Created attachment 38947 [details] [review] New version.
+ void PageInfoHelper::ProcessEmbedNodeHelper (const nsEmbedString &tag, [...] +PageInfoHelper::ProcessEmbedNodeHelper (const nsEmbedString &aUrl, Nit: Make the var names in prototype and impl. match :) Ok to commit, thanks for the patch!
I should sleep more ...