After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 170786 - need to get href attribute for embed elements
need to get href attribute for embed elements
Status: RESOLVED FIXED
Product: epiphany-extensions
Classification: Deprecated
Component: page-info
master
Other Linux
: Normal enhancement
: ---
Assigned To: epiphany-extensions-maint
epiphany-extensions-maint
Depends on:
Blocks:
 
 
Reported: 2005-03-18 12:42 UTC by Christian Persch
Modified: 2005-03-21 17:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds some code into ProcessEmbedNode to handle href tag. (2.00 KB, patch)
2005-03-18 23:26 UTC, Jean-François Rameau
none Details | Review
New version. (2.01 KB, patch)
2005-03-19 20:51 UTC, Jean-François Rameau
accepted-commit_now Details | Review

Description Christian Persch 2005-03-18 12:42:04 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.
Comment 1 Jean-François Rameau 2005-03-18 23:26:56 UTC
Created attachment 38925 [details] [review]
Adds some code into ProcessEmbedNode to handle href tag.
Comment 2 Christian Persch 2005-03-19 13:57:13 UTC
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);
  }
Comment 3 Jean-François Rameau 2005-03-19 20:51:21 UTC
Created attachment 38947 [details] [review]
New version.
Comment 4 Christian Persch 2005-03-19 21:04:07 UTC
+  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!
Comment 5 Jean-François Rameau 2005-03-19 21:14:02 UTC
I should sleep more ...