From: <dos...@us...> - 2014-04-27 19:13:05
|
Revision: 4788 http://sourceforge.net/p/mp-plugins/code/4788 Author: doskabouter Date: 2014-04-27 19:13:03 +0000 (Sun, 27 Apr 2014) Log Message: ----------- Fixed duplicate link-numbers for iframes Modified Paths: -------------- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/DomHelper.cs Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/DomHelper.cs =================================================================== --- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/DomHelper.cs 2014-04-21 19:48:57 UTC (rev 4787) +++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/DomHelper.cs 2014-04-27 19:13:03 UTC (rev 4788) @@ -85,7 +85,7 @@ return new Point(0, 0); } - private static void AddLinksToPage(GeckoDocument document, int id) + private static int AddLinksToPage(GeckoDocument document, int id) { Dictionary<string, int> hrefs = new Dictionary<string, int>(); GeckoElementCollection links = document.Links; @@ -253,7 +253,8 @@ GeckoElementCollection iframes = document.GetElementsByTagName("iframe"); MyLog.debug("page iframes cnt : " + iframes.Count<GeckoHtmlElement>()); foreach (GeckoIFrameElement element in iframes) - AddLinksToPage(element.ContentDocument, id); + id = AddLinksToPage(element.ContentDocument, id); + return id; } private static int GetMaxId(GeckoDocument document) @@ -282,7 +283,7 @@ private static GeckoHtmlElement CreateSpan(GeckoDocument owner, int geckoId, string className, string extra) { GeckoHtmlElement result = owner.CreateHtmlElement("span"); - result.SetAttribute("style", _spanstyle + extra); + result.SetAttribute("style", _spanstyle + extra); result.InnerHtml = geckoId.ToString(); if (!String.IsNullOrEmpty(className)) result.SetAttribute("class", className); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |