Changeset 113285 in webkit


Ignore:
Timestamp:
Apr 4, 2012 9:06:30 PM (12 years ago)
Author:
leo.yang@torchmobile.com.cn
Message:

[BlackBerry] Add local: protocol support in KURL for blackberry
https://bugs.webkit.org/show_bug.cgi?id=82695

Reviewed by Rob Buis.

BlackBerry porting is using local: protocol just as file: protocol
with the exception that it sandboxes the path to the application private space.

  • platform/KURL.cpp:

(WebCore::KURL::parse):
(WebCore::portAllowed):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r113284 r113285  
     12012-04-04  Leo Yang  <leo.yang@torchmobile.com.cn>
     2
     3        [BlackBerry] Add local: protocol support in KURL for blackberry
     4        https://bugs.webkit.org/show_bug.cgi?id=82695
     5
     6        Reviewed by Rob Buis.
     7
     8        BlackBerry porting is using local: protocol just as file: protocol
     9        with the exception that it sandboxes the path to the application private space.
     10
     11        * platform/KURL.cpp:
     12        (WebCore::KURL::parse):
     13        (WebCore::portAllowed):
     14
    1152012-04-04  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/platform/KURL.cpp

    r111354 r113285  
    11/*
    22 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved.
     3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    11081109        && isLetterMatchIgnoringCase(url[3], 'e');
    11091110
     1111#if PLATFORM(BLACKBERRY)
     1112    // Parse local: urls the same as file: urls.
     1113    if (!isFile)
     1114        isFile = schemeEnd == 5
     1115            && isLetterMatchIgnoringCase(url[0], 'l')
     1116            && isLetterMatchIgnoringCase(url[1], 'o')
     1117            && isLetterMatchIgnoringCase(url[2], 'c')
     1118            && isLetterMatchIgnoringCase(url[3], 'a')
     1119            && isLetterMatchIgnoringCase(url[4], 'l');
     1120#endif
     1121
    11101122    m_protocolIsInHTTPFamily = isLetterMatchIgnoringCase(url[0], 'h')
    11111123        && isLetterMatchIgnoringCase(url[1], 't')
     
    18721884        return true;
    18731885
     1886#if PLATFORM(BLACKBERRY)
     1887    if (url.protocolIs("local"))
     1888        return true;
     1889#endif
     1890
    18741891    return false;
    18751892}
Note: See TracChangeset for help on using the changeset viewer.