Skip to content
Permalink
Browse files

Merge branch 'attrhooks.1.6v2' of https://github.com/timmywil/jquery

…into timmywil-attrhooks.1.6v2

Conflicts:
	src/attributes.js
  • Loading branch information...
jeresig committed Apr 10, 2011
2 parents d4e4414 + 3a1b466 commit b92d2f0bc96d65c83252fa3033c37b92eb32d442
Showing with 510 additions and 243 deletions.
  1. +0 −2 .gitignore
  2. +6 −0 .gitmodules
  3. +29 −37 Makefile
  4. +4 −5 src/ajax.js
  5. +148 −68 src/attributes.js
  6. +1 −1 src/core.js
  7. +24 −1 src/css.js
  8. +4 −1 src/deferred.js
  9. +24 −10 src/event.js
  10. +6 −3 src/manipulation.js
  11. +4 −5 src/offset.js
  12. +1 −0 src/sizzle
  13. +24 −12 src/support.js
  14. +1 −0 test/data/offset/fixed.html
  15. +4 −0 test/index.html
  16. +1 −0 test/qunit
  17. +11 −1 test/unit/ajax.js
  18. +138 −89 test/unit/attributes.js
  19. +12 −0 test/unit/css.js
  20. +44 −0 test/unit/event.js
  21. +9 −4 test/unit/manipulation.js
  22. +14 −3 test/unit/offset.js
  23. +1 −1 version.txt
@@ -4,7 +4,5 @@ dist
*~
*.diff
*.patch
test/qunit
src/sizzle
/*.html
.DS_Store
@@ -0,0 +1,6 @@
[submodule "src/sizzle"]
path = src/sizzle
url = git://github.com/jquery/sizzle.git
[submodule "test/qunit"]
path = test/qunit
url = git://github.com/jquery/qunit.git
@@ -1,5 +1,3 @@
V ?= 0

SRC_DIR = src
TEST_DIR = test
BUILD_DIR = build
@@ -38,48 +36,21 @@ JQ = ${DIST_DIR}/jquery.js
JQ_MIN = ${DIST_DIR}/jquery.min.js

SIZZLE_DIR = ${SRC_DIR}/sizzle
QUNIT_DIR = ${TEST_DIR}/qunit

JQ_VER = $(shell cat version.txt)
VER = sed "s/@VERSION/${JQ_VER}/"

DATE=$(shell git log -1 --pretty=format:%ad)

all: jquery min lint
all: update_submodules core

core: jquery min lint
@@echo "jQuery build complete."

${DIST_DIR}:
@@mkdir -p ${DIST_DIR}

ifeq ($(strip $(V)),0)
verbose = --quiet
else ifeq ($(strip $(V)),1)
verbose =
else
verbose = --verbose
endif

define clone_or_pull
-@@if test ! -d $(strip ${1})/.git; then \
echo "Cloning $(strip ${1})..."; \
git clone $(strip ${verbose}) --depth=1 $(strip ${2}) $(strip ${1}); \
else \
echo "Pulling $(strip ${1})..."; \
git --git-dir=$(strip ${1})/.git pull $(strip ${verbose}) origin master; \
fi

endef

${QUNIT_DIR}:
$(call clone_or_pull, ${QUNIT_DIR}, git://github.com/jquery/qunit.git)

${SIZZLE_DIR}:
$(call clone_or_pull, ${SIZZLE_DIR}, git://github.com/jeresig/sizzle.git)

init: ${QUNIT_DIR} ${SIZZLE_DIR}

jquery: init ${JQ}
jq: init ${JQ}
jquery: ${JQ}

${JQ}: ${MODULES} | ${DIST_DIR}
@@echo "Building" ${JQ}
@@ -102,9 +73,9 @@ lint: jquery
echo "You must have NodeJS installed in order to test jQuery against JSLint."; \
fi

min: ${JQ_MIN}
min: jquery ${JQ_MIN}

${JQ_MIN}: jquery
${JQ_MIN}: ${JQ}
@@if test ! -z ${JS_ENGINE}; then \
echo "Minifying jQuery" ${JQ_MIN}; \
${COMPILER} ${JQ} > ${JQ_MIN}.tmp; \
@@ -122,7 +93,28 @@ clean:
@@echo "Removing built copy of Sizzle"
@@rm -f src/selector.js

@@echo "Removing cloned directories"
distclean: clean
@@echo "Removing submodules"
@@rm -rf test/qunit src/sizzle

.PHONY: all jquery lint min init jq clean
# change pointers for submodules and update them to what is specified in jQuery
# --merge doesn't work when doing an initial clone, thus test if we have non-existing
# submodules, then do an real update
update_submodules:
@@if [ -d .git ]; then \
if git submodule status | grep -q -E '^-'; then \
git submodule update --init --recursive; \
else \
git submodule update --init --recursive --merge; \
fi; \
fi;

# update the submodules to the latest at the most logical branch
pull_submodules:
@@git submodule foreach "git pull origin \$$(git branch --no-color --contains \$$(git rev-parse HEAD) | grep -v \( | head -1)"
@@git submodule summary

pull: pull_submodules
@@git pull ${REMOTE} ${BRANCH}

.PHONY: all jquery lint min clean distclean update_submodules pull_submodules pull core
@@ -7,7 +7,7 @@ var r20 = /%20/g,
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
// #7653, #8125, #8152: local protocol detection
rlocalProtocol = /(?:^file|^widget|\-extension):$/,
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rquery = /\?/,
@@ -19,7 +19,7 @@ var r20 = /%20/g,
rucHeadersFunc = function( _, $1, $2 ) {
return $1 + $2.toUpperCase();
},
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?|\/[^\/])/,
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,

// Keep a copy of the old load method
_load = jQuery.fn.load,
@@ -61,7 +61,7 @@ try {
}

// Segment location into parts
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() );
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {
@@ -319,7 +319,6 @@ jQuery.extend({
cache: null,
traditional: false,
headers: {},
crossDomain: null,
*/

accepts: {
@@ -604,7 +603,7 @@ jQuery.extend({
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );

// Determine if a cross-domain request is in order
if ( !s.crossDomain ) {
if ( s.crossDomain == null ) {
parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!( parts &&
( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||

0 comments on commit b92d2f0

Please sign in to comment.
You can’t perform that action at this time.