⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 237637 in webkit


Ignore:
Timestamp:
Oct 31, 2018, 8:19:24 AM (8 years ago)
Author:
Claudio Saavedra
Message:

[GTK][WPE] Remaining topPrivatelyControlledDomain() fixes
https://bugs.webkit.org/show_bug.cgi?id=191110

Reviewed by Michael Catanzaro.

Covered by existing tests.

Turns out that this method is expected to reject domains that
are not registrable. Also sync with the Mac implementation in
that given domains that are not all ASCII should be returned
back as is. This fixes the remaining Public Suffix API tests.

  • platform/soup/PublicSuffixSoup.cpp:

(WebCore::topPrivatelyControlledDomain):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r237636 r237637  
     12018-10-31  Claudio Saavedra  <csaavedra@igalia.com>
     2
     3        [GTK][WPE] Remaining topPrivatelyControlledDomain() fixes
     4        https://bugs.webkit.org/show_bug.cgi?id=191110
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Covered by existing tests.
     9
     10        Turns out that this method is expected to reject domains that
     11        are not registrable. Also sync with the Mac implementation in
     12        that given domains that are not all ASCII should be returned
     13        back as is. This fixes the remaining Public Suffix API tests.
     14
     15        * platform/soup/PublicSuffixSoup.cpp:
     16        (WebCore::topPrivatelyControlledDomain):
     17
    1182018-10-31  Antti Koivisto  <antti@apple.com>
    219
  • trunk/Source/WebCore/platform/soup/PublicSuffixSoup.cpp

    r237584 r237637  
    4646    if (domain.isEmpty())
    4747        return String();
     48    if (!domain.isAllASCII())
     49        return domain;
    4850
    4951    String lowercaseDomain = domain.convertToASCIILowercase();
     
    5860        return String::fromUTF8(baseDomain);
    5961
    60     if (g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_INVALID_HOSTNAME) || g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS))
     62    if (g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_INVALID_HOSTNAME) || g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS) || g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_NO_BASE_DOMAIN))
    6163        return String();
    6264
    63     if (g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_IS_IP_ADDRESS) || g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_NO_BASE_DOMAIN))
     65    if (g_error_matches(error.get(), SOUP_TLD_ERROR, SOUP_TLD_ERROR_IS_IP_ADDRESS))
    6466        return domain;
    6567
Note: See TracChangeset for help on using the changeset viewer.