Author: hlship
Date: Fri Apr  1 23:54:41 2011
New Revision: 1087936

URL: http://svn.apache.org/viewvc?rev=1087936&view=rev
Log:
TAP5-73: Remove unnecessary logic for tracking "virtual libraries", a hold-over 
from how Tapestry 5.1 handle JavaScript aggregation

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/StackAssetRequestHandler.java
    
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/StackAssetRequestHandler.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/StackAssetRequestHandler.java?rev=1087936&r1=1087935&r2=1087936&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/StackAssetRequestHandler.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/StackAssetRequestHandler.java
 Fri Apr  1 23:54:41 2011
@@ -104,17 +104,18 @@ public class StackAssetRequestHandler im
 
     public boolean handleAssetRequest(Request request, Response response, 
final String extraPath) throws IOException
     {
-        TapestryInternalUtils.performIO(tracker, String.format("Streaming 
asset stack %s", extraPath), new IOOperation()
-        {
-            public void perform() throws IOException
-            {
-                boolean compress = compressionAnalyzer.isGZipSupported();
-
-                StreamableResource resource = getResource(extraPath, compress);
-
-                resourceStreamer.streamResource(resource);
-            }
-        });
+        TapestryInternalUtils.performIO(tracker, String.format("Streaming 
asset stack %s", extraPath),
+                new IOOperation()
+                {
+                    public void perform() throws IOException
+                    {
+                        boolean compress = 
compressionAnalyzer.isGZipSupported();
+
+                        StreamableResource resource = getResource(extraPath, 
compress);
+
+                        resourceStreamer.streamResource(resource);
+                    }
+                });
 
         return true;
     }
@@ -210,8 +211,6 @@ public class StackAssetRequestHandler im
             lastModified = Math.max(lastModified, 
streamable.getLastModified());
         }
 
-        writer.format("\n;/**/\nTapestry.markScriptLibrariesLoaded(%s);\n", 
paths);
-
         writer.close();
 
         return new StreamableResourceImpl(JAVASCRIPT_CONTENT_TYPE, 
CompressionStatus.COMPRESSABLE, lastModified,

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=1087936&r1=1087935&r2=1087936&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
 Fri Apr  1 23:54:41 2011
@@ -1,4 +1,4 @@
-/* Copyright 2007, 2008, 2009, 2010 The Apache Software Foundation
+/* Copyright 2007, 2008, 2009, 2010, 2011 The Apache Software Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -580,22 +580,6 @@ var Tapestry = {
        },
 
        /**
-        * Marks a number of script libraries as loaded; this is used with 
virtual
-        * scripts (which combine multiple actual scripts). This is necessary so
-        * that subsequent Ajax requests do not load scripts that have already 
been
-        * loaded
-        * 
-        * @param scripts
-        *            array of script paths
-        */
-       markScriptLibrariesLoaded : function(scripts) {
-               $(scripts).each(function(script) {
-                       var complete = Tapestry.rebuildURL(script);
-                       Tapestry.ScriptManager.virtualScripts.push(complete);
-               });
-       },
-
-       /**
         * Creates a clone of the indicated element, but with the alternate tag
         * name. Attributes of the original node are copied to the new node. Tag
         * names should be all upper-case. The content of the original element 
is
@@ -2017,12 +2001,6 @@ Tapestry.FormInjector = Class.create({
 
 Tapestry.ScriptManager = {
 
-       /**
-        * Complete URLs of virtually loaded scripts (combined scripts loaded 
as a
-        * single virtual asset).
-        */
-       virtualScripts : $A([]),
-
        initialize : function() {
 
                /*
@@ -2121,13 +2099,6 @@ Tapestry.ScriptManager = {
                (scripts || []).each(function(s) {
                        var assetURL = Tapestry.rebuildURL(s);
 
-                       /*
-                        * Check to see if the script is already loaded, either 
as a virtual
-                        * script, or as an individual script src="" element.
-                        */
-                       if 
(Tapestry.ScriptManager.virtualScripts.member(assetURL))
-                               return;
-
                        if (Tapestry.ScriptManager.contains(document.scripts, 
"src",
                                        assetURL))
                                return;


Reply via email to