Skip to content

Commit

Permalink
resolved merge for README
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcher committed May 19, 2010
2 parents 01fc401 + 4f8cc28 commit cb738b9
Show file tree
Hide file tree
Showing 17 changed files with 297 additions and 113 deletions.
2 changes: 1 addition & 1 deletion bin/test-jquery.js
@@ -1,6 +1,6 @@
//debugger;
load("dist/env.rhino.js");
load("plugins/qunit.env.js");
load("plugins/env.qunit.js");

//yup its that easy
window.location = 'test/vendor/jQuery/'+arguments[0]+'/test/index.html';
79 changes: 56 additions & 23 deletions build.xml
Expand Up @@ -122,6 +122,7 @@
<fileset dir="${SRC_DIR}" includes="platform/core/__global__.js" />
<fileset dir="${SRC_DIR}" includes="common/intro.js" />
<fileset dir="${SRC_DIR}" includes="common/__extend__.js" />
<fileset dir="${SRC_DIR}" includes="common/__trim__.js" />
<fileset dir="${SRC_DIR}" includes="platform/core/console.js" />
<fileset dir="${SRC_DIR}" includes="platform/core/dom.js" />
<fileset dir="${SRC_DIR}" includes="platform/core/event.js" />
Expand All @@ -136,10 +137,10 @@
<echo message="Finished Building ${CORE_DIST}"/>
<echo message=""/>
</target>

<!-- TEST CORE ENV BINDINGS -->
<target name='core-env-spec'
depends='core-env, console'
depends='zip'
description='Test Core Env Specs'>
<echo message=""/>
<echo message="Executing Core Env Spec"/>
Expand Down Expand Up @@ -184,7 +185,7 @@

<!-- TEST RHINO ENV BINDINGS -->
<target name='rhino-env-spec'
depends='rhino-env, console'
depends='zip, rhino-env'
description='Test Rhino Env Specs'>
<echo message=""/>
<echo message="Executing Rhino Env Spec"/>
Expand Down Expand Up @@ -213,7 +214,6 @@
<fileset dir="${SRC_DIR}" includes="console/__global__.js" />
<fileset dir="${SRC_DIR}" includes="common/intro.js" />
<fileset dir="${SRC_DIR}" includes="console/console.js" />
<fileset dir="${SRC_DIR}" includes="console/json.js" />
<fileset dir="${SRC_DIR}" includes="common/outro.js" />
</concat>
<echo message="Finished Building ${CONSOLE_DIST}"/>
Expand All @@ -222,7 +222,7 @@

<!-- TEST CONSOLE SPECIFICATION -->
<target name='console-spec'
depends='console'
depends='zip'
description='Test Console Specs'>
<echo message=""/>
<echo message="Executing Console Spec"/>
Expand All @@ -238,7 +238,7 @@


<!-- BUILD DOM IMPLEMENTATIOM -->
<target name="dom" depends="env-platforms">
<target name="dom">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${DOM_DIST}" />
Expand Down Expand Up @@ -283,7 +283,7 @@

<!-- TEST DOM SPECIFICATION -->
<target name='dom-spec'
depends='dom'
depends='zip'
description='Test DOM Specs'>
<echo message=""/>
<echo message="Executing DOM Spec"/>
Expand All @@ -298,7 +298,7 @@
</target>

<!-- BUILD EVENT IMPLEMENTATIOM -->
<target name="event" depends="env-platforms">
<target name="event">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${EVENT_DIST}" />
Expand Down Expand Up @@ -330,7 +330,7 @@

<!-- TEST EVENT SPECIFICATION -->
<target name='event-spec'
depends='event'
depends='zip'
description='Test Event Specs'>
<echo message=""/>
<echo message="Executing Event Spec"/>
Expand All @@ -345,7 +345,7 @@
</target>

<!-- BUILD TIMER IMPLEMENTATIOM -->
<target name="timer" depends="env-platforms">
<target name="timer">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${TIMER_DIST}" />
Expand All @@ -367,7 +367,7 @@

<!-- TEST TIMER SPECIFICATION -->
<target name='timer-spec'
depends='timer'
depends='zip'
description='Test Timer Specs'>
<echo message=""/>
<echo message="Executing Timer Spec"/>
Expand All @@ -382,7 +382,7 @@
</target>

<!-- BUILD HTML IMPLEMENTATIOM -->
<target name="html" depends="env-platforms">
<target name="html">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${HTML_DIST}" />
Expand Down Expand Up @@ -461,7 +461,7 @@

<!-- TEST HTML SPECIFICATION -->
<target name='html-spec'
depends='html'
depends='zip'
description='Test HTML Specs'>
<echo message=""/>
<echo message="Executing HTML Spec"/>
Expand All @@ -476,7 +476,7 @@
</target>

<!-- BUILD CSS IMPLEMENTATIOM -->
<target name="css" depends="env-platforms">
<target name="css">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${CSS_DIST}" />
Expand Down Expand Up @@ -505,7 +505,7 @@

<!-- TEST CSS SPECIFICATION -->
<target name='css-spec'
depends='css'
depends='zip'
description='Test CSS Specs'>
<echo message=""/>
<echo message="Executing CSS Spec"/>
Expand All @@ -520,7 +520,7 @@
</target>

<!-- BUILD PARSER IMPLEMENTATIOM -->
<target name="parser" depends="env-platforms">
<target name="parser">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${PARSER_DIST}" />
Expand Down Expand Up @@ -548,7 +548,7 @@

<!-- TEST PARSER SPECIFICATION -->
<target name='parser-spec'
depends='parser'
depends='zip'
description='Test Parser Specs'>
<echo message=""/>
<echo message="Executing Parser Spec"/>
Expand All @@ -565,7 +565,7 @@
</target>

<!-- BUILD XMLHTTPREQUEST IMPLEMENTATIOM -->
<target name="xhr" depends="env-platforms">
<target name="xhr">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${XHR_DIST}" />
Expand Down Expand Up @@ -593,7 +593,7 @@

<!-- TEST XHR SPECIFICATION -->
<target name='xhr-spec'
depends='xhr, local-settings'
depends='zip, local-settings'
description='Test XMLHttpRequest Specs'>
<echo message=""/>
<echo message="Executing XMLHttpRequest Spec"/>
Expand All @@ -608,7 +608,7 @@
</target>

<!-- BUILD WINDOW IMPLEMENTATIOM -->
<target name="window" depends="env-platforms">
<target name="window">
<mkdir dir="${DIST_DIR}" />
<echo message=""/>
<echo message="Building ${WINDOW_DIST}" />
Expand Down Expand Up @@ -637,7 +637,7 @@

<!-- TEST WINDOW SPECIFICATION -->
<target name='window-spec'
depends='window, local-settings'
depends='zip, local-settings'
description='Test Window Specs'>
<echo message=""/>
<echo message="Executing Window Spec"/>
Expand All @@ -651,9 +651,26 @@
<echo message=""/>
</target>

<target name='fulldoc-spec'
depends='zip'
description='Test Full Document Specs'>
<echo message="Starting"/>
<echo message="Executing FullDoc Spec"/>
<java fork="true"
jar="${RHINO_JAR}"
failonerror="true">
<arg value="-opt"/>
<arg value="-1"/>
<arg value="${TEST_DIR}/fulldoc/boot.js"/>
<jvmarg value="-Dfile.encoding=utf-8"/>
<jvmarg value="-Xmx256m"/>
</java>
<echo message="DONE."/>
</target>

<target description="jslint quick build - no parser!"
name="jslint"
depends="dom, event, timer, html, xhr, css, window">
depends="zip">
<echo message="Building ${ENV_JSLINT}" />
<concat destfile="${ENV_JSLINT}">
<filterchain>
Expand Down Expand Up @@ -692,11 +709,27 @@
<echo message="dist/jslint-out.txt has results" />
</target>

<!-- TODO: add back core/env-spec. Right now it breaks -->
<target description="Main ENV build"
name="concat"
depends="dom-spec, event-spec, timer-spec,
depends="rhino-env-spec,
dom-spec, event-spec, timer-spec,
html-spec, parser-spec, xhr-spec,
css-spec, window-spec">
<!-- TODO: nice message saying all worked. Zap /dist on error? -->
</target>

<target name="clean" description="Clean up">
<delete dir="${DIST_DIR}" verbose="true" />
</target>


<target description="Main ENV concatenator"
name="zip"
depends="core-env, rhino-env, console,
dom, event, timer,
html, parser, xhr,
css, window">
<!-- CORE -->
<echo message="Building ${ENV_DIST}" />
<concat destfile="${ENV_DIST}">
Expand Down
25 changes: 19 additions & 6 deletions htmlparser/gwt2/build.sh
Expand Up @@ -2,15 +2,23 @@

#
# Autodownload Parser
# from mozilla HG.
# TODO: use specific releases
#
#
PARSER=htmlparser-1.2.1
PARSER_ZIP="${PARSER}.zip"
PARSER=htmlparser

#
# Use mozilla trunk
#
echo "HG update from http://hg.mozilla.org/projects/htmlparser"
if [ ! -d "${PARSER}" ]; then
wget "http://about.validator.nu/htmlparser/${PARSER_ZIP}"
unzip ${PARSER_ZIP}
hg clone http://hg.mozilla.org/projects/htmlparser
else
(cd "${PARSER}"; hg pull; hg update )
fi
echo "----"

echo "Installing GWT"

#
# Autodownload GWT
Expand All @@ -23,15 +31,17 @@ if [ ! -d "${GWT}" ]; then
wget "http://google-web-toolkit.googlecode.com/files/${GWT_ZIP}"
unzip ${GWT_ZIP}
fi
echo "----"

echo "Starting GWT compile..."
CP="./src:./${PARSER}/src:./${PARSER}/super:./${GWT}/gwt-user.jar:./${GWT}/gwt-dev.jar"

# Compile a new GWT linker. Very simple to Single Script Linker but
# removes all the "bootstrap" and client (real browser) onScriptLoad
# events, etc.
echo "Javac our linker"
javac -cp ${CP} src/com/envjs/gwt/linker/ServerSingleScriptLinker.java

echo "Starting GWT..."
java \
-Xmx256M \
-cp "${CP}" \
Expand All @@ -41,13 +51,16 @@ java \
nu.validator.htmlparser.HtmlParser;

# -draftCompile \
echo "----"
echo "COPY to envjs src tree"
cp war/nu.validator.htmlparser.HtmlParser/nu.validator.htmlparser.HtmlParser.nocache.js ../../src/parser/htmlparser.js

#
# On innerhtml and some document-writes,some problems occurs when the
# parser being invoked with the wrong state. This patch just prevents
# the parser from dying and throwing an exception.
#
echo "PATCHING"
patch ../../src/parser/htmlparser.js patch1.diff
echo "DONE"

23 changes: 14 additions & 9 deletions htmlparser/gwt2/patch1.diff
@@ -1,9 +1,14 @@
2884a2885
> if (current) {
2885a2887
> }
10214c10216
< gwtOnLoad();})();
\ No newline at end of file
---
> gwtOnLoad();})();
*** nu.validator.htmlparser.HtmlParser.nocache.js~ Wed May 5 14:56:28 2010
--- nu.validator.htmlparser.HtmlParser.nocache.js Wed May 5 15:12:56 2010
***************
*** 2825,2831 ****
--- 2825,2833 ----
$processNonNcNames(attributes, this$static, this$static.namePolicy);
elt = $createElement_0(this$static, ns, elementName.name_0, attributes);
current = this$static.stack_0[this$static.currentPtr];
+ if (current) {
current.fosterParenting?$insertIntoFosterParent(this$static, elt):$appendElement(this$static, elt, current.node);
+ }
node = $StackNode_0(new StackNode, ns, elementName, elt);
$push_0(this$static, node);
}

0 comments on commit cb738b9

Please sign in to comment.