Changeset 231978 in webkit


Ignore:
Timestamp:
May 18, 2018 12:33:35 PM (6 years ago)
Author:
dbates@webkit.org
Message:

"debug-safari --ios-simulator" creates lldb target to launch Mac Safari
https://bugs.webkit.org/show_bug.cgi?id=185774

Reviewed by Andy Estes.

For now, the script debug-safari is not supported for WebKit for iOS. To
fix this we differentiate between the Apple Mac port and Apple embedded
ports.

  • Scripts/webkitdirs.pm:

(safariPath): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(isAppleMacWebKit): Added.
(isAppleCocoaWebKit): Write in terms of isAppleMacWebKit() and isEmbeddedWebKit().
(launcherName): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(mobileSafariBundle): Substitute isIOSWebKit() for isAppleCocoaWebKit().
(debugSafari): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(runSafari): Ditto.
(runMiniBrowser): Ditto.
(debugMiniBrowser): Ditto.
(runWebKitTestRunner): Ditto.
(debugWebKitTestRunner): Ditto.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r231977 r231978  
     12018-05-18  Daniel Bates  <dabates@apple.com>
     2
     3        "debug-safari --ios-simulator" creates lldb target to launch Mac Safari
     4        https://bugs.webkit.org/show_bug.cgi?id=185774
     5
     6        Reviewed by Andy Estes.
     7
     8        For now, the script debug-safari is not supported for WebKit for iOS. To
     9        fix this we differentiate between the Apple Mac port and Apple embedded
     10        ports.
     11
     12        * Scripts/webkitdirs.pm:
     13        (safariPath): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
     14        (isAppleMacWebKit): Added.
     15        (isAppleCocoaWebKit): Write in terms of isAppleMacWebKit() and isEmbeddedWebKit().
     16        (launcherName): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
     17        (mobileSafariBundle): Substitute isIOSWebKit() for isAppleCocoaWebKit().
     18        (debugSafari): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
     19        (runSafari): Ditto.
     20        (runMiniBrowser): Ditto.
     21        (debugMiniBrowser): Ditto.
     22        (runWebKitTestRunner): Ditto.
     23        (debugWebKitTestRunner): Ditto.
     24
    1252018-05-18  Antoine Quint  <graouts@apple.com>
    226
  • trunk/Tools/Scripts/webkitdirs.pm

    r231677 r231978  
    990990sub safariPath
    991991{
    992     die "Safari path is only relevant on Apple Mac platform\n" unless isAppleCocoaWebKit();
     992    die "Safari path is only relevant on Apple Mac platform\n" unless isAppleMacWebKit();
    993993
    994994    my $safariPath;
     
    13741374}
    13751375
     1376sub isIOSWebKit()
     1377{
     1378    return portName() eq iOS;
     1379}
     1380
     1381sub isTVOSWebKit()
     1382{
     1383    return portName() eq tvOS;
     1384}
     1385
     1386sub isWatchOSWebKit()
     1387{
     1388    return portName() eq watchOS;
     1389}
     1390
     1391sub isEmbeddedWebKit()
     1392{
     1393    return isIOSWebKit() || isTVOSWebKit() || isWatchOSWebKit();
     1394}
     1395
    13761396sub isAppleWebKit()
    13771397{
     
    13791399}
    13801400
     1401sub isAppleMacWebKit()
     1402{
     1403    return portName() eq Mac;
     1404}
     1405
    13811406sub isAppleCocoaWebKit()
    13821407{
    1383     return (portName() eq Mac) || isIOSWebKit() || isTVOSWebKit() || isWatchOSWebKit();
     1408    return isAppleMacWebKit() || isEmbeddedWebKit();
    13841409}
    13851410
     
    14651490{
    14661491    return xcodeSDKPlatformName() eq "watchsimulator";
    1467 }
    1468 
    1469 sub isIOSWebKit()
    1470 {
    1471     return portName() eq iOS;
    1472 }
    1473 
    1474 sub isTVOSWebKit()
    1475 {
    1476     return portName() eq tvOS;
    1477 }
    1478 
    1479 sub isWatchOSWebKit()
    1480 {
    1481     return portName() eq watchOS;
    1482 }
    1483 
    1484 sub isEmbeddedWebKit()
    1485 {
    1486     return isIOSWebKit() || isTVOSWebKit() || isWatchOSWebKit();
    14871492}
    14881493
     
    16481653    if (isGtk()) {
    16491654        return "MiniBrowser";
    1650     } elsif (isAppleCocoaWebKit()) {
     1655    } elsif (isAppleMacWebKit()) {
    16511656        return "Safari";
    16521657    } elsif (isAppleWinWebKit()) {
     
    24112416
    24122417    # Use MobileSafari.app in product directory if present.
    2413     if (isAppleCocoaWebKit() && -d "$configurationProductDir/MobileSafari.app") {
     2418    if (isIOSWebKit() && -d "$configurationProductDir/MobileSafari.app") {
    24142419        return "$configurationProductDir/MobileSafari.app";
    24152420    }
     
    27242729sub debugSafari
    27252730{
    2726     if (isAppleCocoaWebKit()) {
     2731    if (isAppleMacWebKit()) {
    27272732        checkFrameworks();
    27282733        execMacWebKitAppForDebugging(safariPath());
     
    27382743    }
    27392744
    2740     if (isAppleCocoaWebKit()) {
     2745    if (isAppleMacWebKit()) {
    27412746        return runMacWebKitApp(safariPath());
    27422747    }
     
    27532758sub runMiniBrowser
    27542759{
    2755     if (isAppleCocoaWebKit()) {
     2760    if (isAppleMacWebKit()) {
    27562761        return runMacWebKitApp(File::Spec->catfile(productDir(), "MiniBrowser.app", "Contents", "MacOS", "MiniBrowser"));
    2757     } elsif (isAppleWinWebKit()) {
    2758         my $result;
     2762    }
     2763    if (isAppleWinWebKit()) {
    27592764        my $webKitLauncherPath = File::Spec->catfile(executableProductDir(), "MiniBrowser.exe");
    27602765        return system { $webKitLauncherPath } $webKitLauncherPath, @ARGV;
    27612766    }
    2762 
    27632767    return 1;
    27642768}
     
    27662770sub debugMiniBrowser
    27672771{
    2768     if (isAppleCocoaWebKit()) {
     2772    if (isAppleMacWebKit()) {
    27692773        execMacWebKitAppForDebugging(File::Spec->catfile(productDir(), "MiniBrowser.app", "Contents", "MacOS", "MiniBrowser"));
    27702774    }
     
    27752779sub runWebKitTestRunner
    27762780{
    2777     if (isAppleCocoaWebKit()) {
     2781    if (isAppleMacWebKit()) {
    27782782        return runMacWebKitApp(File::Spec->catfile(productDir(), "WebKitTestRunner"));
    27792783    }
     
    27842788sub debugWebKitTestRunner
    27852789{
    2786     if (isAppleCocoaWebKit()) {
     2790    if (isAppleMacWebKit()) {
    27872791        execMacWebKitAppForDebugging(File::Spec->catfile(productDir(), "WebKitTestRunner"));
    27882792    }
Note: See TracChangeset for help on using the changeset viewer.