[Webkit-unassigned] [Bug 78358] REGRESSION (Safari 5.0.5 - 5.1): Link is not colored as visited if default port number is present

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 16 22:47:46 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=78358


webkitlearner at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |webkitlearner at gmail.com




--- Comment #20 from webkitlearner at gmail.com  2012-04-16 22:47:46 PST ---
Dear Eric,

The conversion of  AtomicString, To a STring , to a KURL is the key which solved this issue else you need to remove the defaultportscheme api and calling this api  in the KURL.cpp

When you click the URL you get "http://www.slowpokeproductions.com:80/wit/%77ittarget1b.xhtml" and this URL is sent to check the VistedLinkHash. In the VistedLinkHash link is stored as http://www.slowpokeproductions.com/wit/%77ittarget1b.xhtml,because after parsing the URL, which is done in the KURL.cpp :80 is removed and this URL is stored in the VistedLinkHash .When you click back you are checking "http://www.slowpokeproductions.com:80/wit/%77ittarget1b.xhtml" is present in the VistedLinkHash or not.So for that reason you need to parse the AtomicString.If you start parsing the AtomicString you end up writing another KURL.cpp file. 

For this purpose i have given the url to document->completeURL() which returns me the parsed URL.to give the url to document->completeURL() i strin String.Thats why i converted AtomicString to STring.

I got the parsed KURL object.but i need to send the AtomicString to visitedLinkHash api. There is no constructor in AtomicString which accepts the KURL object.As i found constructor which accepts char* in AtomicString, So i converted KURL to STring,CString and char* and created AtomicString which is parsed and doesnot have :80 in the URL.

Kindly check this solution once again or suggest me better way to achieve this.

~webkitlearner

(In reply to comment #19)
> (From update of attachment 137473 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=137473&action=review
> 
> > Source/WebCore/html/HTMLAnchorElement.h:152
> > +        KURL vistedURL = document()->completeURL(fastGetAttribute(HTMLNames::hrefAttr).string());
> > +        m_cachedVisitedLinkHash = WebCore::visitedLinkHash(document()->baseURL(), AtomicString(vistedURL.string().utf8().data()));
> 
> All these conversions make no sense. :)  You're converting from an AtomicString, to a STring, to a KURL, then to a STring, CSTring, and char* only to go back to an AtomicSTring! :p

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list