<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[194818] trunk/Source/WebInspectorUI</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/194818">194818</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-08 22:32:23 -0800 (Fri, 08 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Test Resources should not be included in Production builds unless FORCE_TOOL_INSTALL
https://bugs.webkit.org/show_bug.cgi?id=152941
&lt;rdar://problem/24119013&gt;

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2016-01-08
Reviewed by Dan Bernstein.

* Configurations/Base.xcconfig:
Combine inspector resources in production, but not test resources.

* Configurations/DebugRelease.xcconfig:
Do not combine inspector resources in Release/Debug. Combine test resources.

* Configurations/WebInspectorUIFramework.xcconfig:
Simplify by moving to other config files.

* Scripts/copy-user-interface-resources.pl:
Have FORCE_TOOL_INSTALL combine test resources as well.

* WebInspectorUI.vcxproj/build-webinspectorui.pl:
Only combine test resources in non-Production.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIConfigurationsBasexcconfig">trunk/Source/WebInspectorUI/Configurations/Base.xcconfig</a></li>
<li><a href="#trunkSourceWebInspectorUIConfigurationsDebugReleasexcconfig">trunk/Source/WebInspectorUI/Configurations/DebugRelease.xcconfig</a></li>
<li><a href="#trunkSourceWebInspectorUIConfigurationsWebInspectorUIFrameworkxcconfig">trunk/Source/WebInspectorUI/Configurations/WebInspectorUIFramework.xcconfig</a></li>
<li><a href="#trunkSourceWebInspectorUIScriptscopyuserinterfaceresourcespl">trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl</a></li>
<li><a href="#trunkSourceWebInspectorUIWebInspectorUIvcxprojbuildwebinspectoruipl">trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (194817 => 194818)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-01-09 06:27:42 UTC (rev 194817)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-01-09 06:32:23 UTC (rev 194818)
</span><span class="lines">@@ -1,5 +1,28 @@
</span><span class="cx"> 2016-01-08  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Test Resources should not be included in Production builds unless FORCE_TOOL_INSTALL
+        https://bugs.webkit.org/show_bug.cgi?id=152941
+        &lt;rdar://problem/24119013&gt;
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+        Combine inspector resources in production, but not test resources.
+
+        * Configurations/DebugRelease.xcconfig:
+        Do not combine inspector resources in Release/Debug. Combine test resources.
+
+        * Configurations/WebInspectorUIFramework.xcconfig:
+        Simplify by moving to other config files.
+
+        * Scripts/copy-user-interface-resources.pl:
+        Have FORCE_TOOL_INSTALL combine test resources as well.
+
+        * WebInspectorUI.vcxproj/build-webinspectorui.pl:
+        Only combine test resources in non-Production.
+
+2016-01-08  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Initiated section of Resource Details Sidebar should not display as empty and should update as the list changes
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=152907
</span><span class="cx">         &lt;rdar://problem/24109927&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIConfigurationsBasexcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Configurations/Base.xcconfig (194817 => 194818)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Configurations/Base.xcconfig        2016-01-09 06:27:42 UTC (rev 194817)
+++ trunk/Source/WebInspectorUI/Configurations/Base.xcconfig        2016-01-09 06:32:23 UTC (rev 194818)
</span><span class="lines">@@ -66,3 +66,6 @@
</span><span class="cx"> OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
</span><span class="cx"> OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
</span><span class="cx"> OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
</span><ins>+
+COMBINE_INSPECTOR_RESOURCES = YES;
+COMBINE_TEST_RESOURCES = NO;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIConfigurationsDebugReleasexcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Configurations/DebugRelease.xcconfig (194817 => 194818)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Configurations/DebugRelease.xcconfig        2016-01-09 06:27:42 UTC (rev 194817)
+++ trunk/Source/WebInspectorUI/Configurations/DebugRelease.xcconfig        2016-01-09 06:32:23 UTC (rev 194818)
</span><span class="lines">@@ -18,3 +18,6 @@
</span><span class="cx"> SDKROOT = $(SDKROOT_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
</span><span class="cx"> SDKROOT_macosx_ = macosx;
</span><span class="cx"> SDKROOT_macosx_YES = macosx.internal;
</span><ins>+
+COMBINE_INSPECTOR_RESOURCES = NO;
+COMBINE_TEST_RESOURCES = YES;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIConfigurationsWebInspectorUIFrameworkxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Configurations/WebInspectorUIFramework.xcconfig (194817 => 194818)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Configurations/WebInspectorUIFramework.xcconfig        2016-01-09 06:27:42 UTC (rev 194817)
+++ trunk/Source/WebInspectorUI/Configurations/WebInspectorUIFramework.xcconfig        2016-01-09 06:32:23 UTC (rev 194818)
</span><span class="lines">@@ -32,14 +32,4 @@
</span><span class="cx"> JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production[sdk=macosx*] = $(SDKROOT)$(PRODUCTION_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders;
</span><span class="cx"> JAVASCRIPTCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/PrivateHeaders;
</span><span class="cx"> 
</span><del>-COMBINE_INSPECTOR_RESOURCES = $(COMBINE_INSPECTOR_RESOURCES_$(CONFIGURATION));
-COMBINE_INSPECTOR_RESOURCES_Debug = NO;
-COMBINE_INSPECTOR_RESOURCES_Release = NO;
-COMBINE_INSPECTOR_RESOURCES_Production = YES;
-
-COMBINE_TEST_RESOURCES = $(COMBINE_TEST_RESOURCES_$(CONFIGURATION));
-COMBINE_TEST_RESOURCES_Debug = YES;
-COMBINE_TEST_RESOURCES_Release = YES;
-COMBINE_TEST_RESOURCES_Production = YES;
-
</del><span class="cx"> SKIP_INSTALL[sdk=iphone*] = YES;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIScriptscopyuserinterfaceresourcespl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl (194817 => 194818)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl        2016-01-09 06:27:42 UTC (rev 194817)
+++ trunk/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl        2016-01-09 06:32:23 UTC (rev 194818)
</span><span class="lines">@@ -137,17 +137,21 @@
</span><span class="cx"> # Copy over dynamically loaded files from other frameworks, even if we aren't combining resources.
</span><span class="cx"> copy(File::Spec-&gt;catfile($ENV{'JAVASCRIPTCORE_PRIVATE_HEADERS_DIR'}, 'InspectorBackendCommands.js'), File::Spec-&gt;catfile($protocolDir, 'InspectorBackendCommands.js')) or die &quot;Copy of InspectorBackendCommands.js failed: $!&quot;;
</span><span class="cx"> 
</span><del>-if (defined $ENV{'FORCE_TOOL_INSTALL'} &amp;&amp; ($ENV{'FORCE_TOOL_INSTALL'} eq 'YES')) {
</del><ins>+my $forceToolInstall = defined $ENV{'FORCE_TOOL_INSTALL'} &amp;&amp; ($ENV{'FORCE_TOOL_INSTALL'} eq 'YES');
+my $shouldCombineMain = defined $ENV{'COMBINE_INSPECTOR_RESOURCES'} &amp;&amp; ($ENV{'COMBINE_INSPECTOR_RESOURCES'} eq 'YES');
+my $shouldCombineTest = defined $ENV{'COMBINE_TEST_RESOURCES'} &amp;&amp; ($ENV{'COMBINE_TEST_RESOURCES'} eq 'YES');
+my $combineResourcesCmd = File::Spec-&gt;catfile($scriptsRoot, 'combine-resources.pl');
+
+if ($forceToolInstall) {
</ins><span class="cx">     # Copy all files over individually to ensure we have Test.html / Test.js and files included from Test.html.
</span><span class="cx">     # We may then proceed to include combined &amp; optimized resources which will output mostly to different paths
</span><span class="cx">     # but overwrite Main.html / Main.js with optimized versions.
</span><span class="cx">     ditto($uiRoot, $targetResourcePath);
</span><ins>+
+    # Also force combining test resources for tool installs.
+    $shouldCombineTest = 1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-my $shouldCombineMain = defined $ENV{'COMBINE_INSPECTOR_RESOURCES'} &amp;&amp; ($ENV{'COMBINE_INSPECTOR_RESOURCES'} eq 'YES');
-my $shouldCombineTest = defined $ENV{'COMBINE_TEST_RESOURCES'} &amp;&amp; ($ENV{'COMBINE_TEST_RESOURCES'} eq 'YES');
-my $combineResourcesCmd = File::Spec-&gt;catfile($scriptsRoot, 'combine-resources.pl');
-
</del><span class="cx"> if ($shouldCombineMain) {
</span><span class="cx">     # Remove Debug JavaScript and CSS files in Production builds.
</span><span class="cx">     system($combineResourcesCmd, '--input-dir', 'Debug', '--input-html', File::Spec-&gt;catfile($uiRoot, 'Main.html'), '--input-html-dir', $uiRoot, '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'Debug.js', '--output-style-name', 'Debug.css', '--strip');
</span><span class="lines">@@ -239,7 +243,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> if ($shouldCombineTest) {
</span><del>-    # Combine the JavaScript files for testing into a single file (TestCombined.js ).
</del><ins>+    # Combine the JavaScript files for testing into a single file (TestCombined.js).
</ins><span class="cx">     system($combineResourcesCmd, '--input-html', File::Spec-&gt;catfile($uiRoot, 'Test.html'), '--derived-sources-dir', $derivedSourcesDir, '--output-dir', $derivedSourcesDir, '--output-script-name', 'TestCombined.js', '--output-style-name', 'TestCombined.css');
</span><span class="cx"> 
</span><span class="cx">     my $derivedSourcesTestHTML = File::Spec-&gt;catfile($derivedSourcesDir, 'Test.html');
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIWebInspectorUIvcxprojbuildwebinspectoruipl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl (194817 => 194818)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl        2016-01-09 06:27:42 UTC (rev 194817)
+++ trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/build-webinspectorui.pl        2016-01-09 06:32:23 UTC (rev 194818)
</span><span class="lines">@@ -62,11 +62,14 @@
</span><span class="cx"> 
</span><span class="cx"> $ENV{'UNLOCALIZED_RESOURCES_FOLDER_PATH'} = 'WebInspectorUI';
</span><span class="cx"> 
</span><del>-$ENV{'COMBINE_TEST_RESOURCES'} = 'YES';
</del><span class="cx"> if (($TARGET_BUILD_DIR =~ /Release/) || ($TARGET_BUILD_DIR =~ /Production/)) {
</span><span class="cx">     $ENV{'COMBINE_INSPECTOR_RESOURCES'} = 'YES';
</span><del>-} 
</del><ins>+}
</ins><span class="cx"> 
</span><ins>+if ($TARGET_BUILD_DIR !~ /Production/) {
+    $ENV{'COMBINE_TEST_RESOURCES'} = 'YES';
+}
+
</ins><span class="cx"> my $targetResourcePath = File::Spec-&gt;catdir($ENV{'TARGET_BUILD_DIR'}, $ENV{'UNLOCALIZED_RESOURCES_FOLDER_PATH'});
</span><span class="cx"> my $protocolDir = File::Spec-&gt;catdir($targetResourcePath, 'Protocol');
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>