Bug 154946

Summary: Add URL::highLevelDomain() function
Product: WebKit Reporter: John Wilander <wilander>
Component: WebCore Misc.Assignee: John Wilander <wilander>
Status: NEW    
Severity: Normal CC: ap, bfulgham, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ap: review-

John Wilander
Reported 2016-03-02 17:57:11 PST
Add a highLevelDomain() function to the URL class.
Attachments
Patch (1.99 KB, patch)
2016-03-02 18:46 PST, John Wilander
ap: review-
John Wilander
Comment 1 2016-03-02 17:58:07 PST
John Wilander
Comment 2 2016-03-02 18:46:29 PST
Alexey Proskuryakov
Comment 3 2016-03-02 19:11:58 PST
Comment on attachment 272718 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272718&action=review > Source/WebCore/platform/URL.cpp:695 > +String URL::highLevelDomain() const > +{ > + return topPrivatelyControlledDomain(host()); Do we need two different names for this? Searching the internet, I see "hight level domain" being mostly used as a synonym to "top level domain", if used at all.
Darin Adler
Comment 4 2016-03-03 09:32:58 PST
Comment on attachment 272718 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272718&action=review >> Source/WebCore/platform/URL.cpp:695 >> + return topPrivatelyControlledDomain(host()); > > Do we need two different names for this? > > Searching the internet, I see "hight level domain" being mostly used as a synonym to "top level domain", if used at all. Terminology is important, I agree. I am concerned about calling these both hosts and domains, and also calling them both top level domains and high level domains. I don’t think this convenience function improves things much. If we only have a few call sites, then I think topPrivatelyControlledDomain(location.host()) would be fine at the call sites. > Source/WebCore/platform/URL.h:108 > WEBCORE_EXPORT String host() const; > + WEBCORE_EXPORT String highLevelDomain() const; > WEBCORE_EXPORT unsigned short port() const; Please don’t mix this in with functions that just return pieces of the URL. This is a higher level operation and should be in its own paragraph below or with other similarly high level functions.
Alexey Proskuryakov
Comment 5 2016-03-09 12:32:59 PST
Comment on attachment 272718 [details] Patch Marking r- based on feedback.
Brent Fulgham
Comment 6 2016-08-22 13:38:28 PDT
*** Bug 154341 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.