epuber 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +5 -3
- data/README.md +3 -11
- data/bin/epuber +2 -3
- data/epuber.gemspec +3 -6
- data/lib/epuber/book/contributor.rb +1 -1
- data/lib/epuber/book/file_request.rb +1 -1
- data/lib/epuber/book/target.rb +1 -2
- data/lib/epuber/book/toc_item.rb +1 -2
- data/lib/epuber/book.rb +1 -2
- data/lib/epuber/checker/text_checker.rb +1 -1
- data/lib/epuber/checker.rb +1 -2
- data/lib/epuber/checker_transformer_base.rb +1 -0
- data/lib/epuber/command/build.rb +1 -2
- data/lib/epuber/command/compile.rb +1 -1
- data/lib/epuber/command/init.rb +1 -2
- data/lib/epuber/command/server.rb +1 -2
- data/lib/epuber/command.rb +1 -1
- data/lib/epuber/compiler/compilation_context.rb +1 -1
- data/lib/epuber/compiler/file_database.rb +3 -5
- data/lib/epuber/compiler/file_finders/abstract.rb +1 -1
- data/lib/epuber/compiler/file_finders/imaginary.rb +1 -2
- data/lib/epuber/compiler/file_finders/normal.rb +1 -1
- data/lib/epuber/compiler/file_resolver.rb +1 -1
- data/lib/epuber/compiler/file_stat.rb +0 -1
- data/lib/epuber/compiler/file_types/abstract_file.rb +1 -2
- data/lib/epuber/compiler/file_types/bade_file.rb +1 -2
- data/lib/epuber/compiler/file_types/coffee_script_file.rb +1 -2
- data/lib/epuber/compiler/file_types/container_xml_file.rb +1 -2
- data/lib/epuber/compiler/file_types/generated_file.rb +1 -2
- data/lib/epuber/compiler/file_types/ibooks_display_options_file.rb +1 -7
- data/lib/epuber/compiler/file_types/image_file.rb +1 -2
- data/lib/epuber/compiler/file_types/mime_type_file.rb +1 -2
- data/lib/epuber/compiler/file_types/nav_file.rb +1 -2
- data/lib/epuber/compiler/file_types/opf_file.rb +1 -2
- data/lib/epuber/compiler/file_types/source_file.rb +1 -2
- data/lib/epuber/compiler/file_types/static_file.rb +1 -2
- data/lib/epuber/compiler/file_types/stylus_file.rb +1 -2
- data/lib/epuber/compiler/file_types/xhtml_file.rb +2 -4
- data/lib/epuber/compiler/generator.rb +1 -1
- data/lib/epuber/compiler/meta_inf_generator.rb +1 -1
- data/lib/epuber/compiler/nav_generator.rb +1 -1
- data/lib/epuber/compiler/opf_generator.rb +1 -1
- data/lib/epuber/compiler/problem.rb +1 -2
- data/lib/epuber/compiler/xhtml_processor.rb +3 -1
- data/lib/epuber/compiler.rb +7 -11
- data/lib/epuber/config.rb +1 -2
- data/lib/epuber/dsl/attribute.rb +1 -1
- data/lib/epuber/dsl/attribute_support.rb +2 -2
- data/lib/epuber/dsl/object.rb +1 -1
- data/lib/epuber/dsl/tree_object.rb +1 -1
- data/lib/epuber/helper.rb +1 -1
- data/lib/epuber/lockfile.rb +1 -1
- data/lib/epuber/plugin.rb +1 -1
- data/lib/epuber/ruby_extensions/match_data.rb +1 -0
- data/lib/epuber/ruby_extensions/thread.rb +1 -0
- data/lib/epuber/server/handlers.rb +1 -1
- data/lib/epuber/server.rb +2 -2
- data/lib/epuber/templates.rb +2 -1
- data/lib/epuber/third_party/bower/bower.json +3 -3
- data/lib/epuber/third_party/bower/bower_components/cookies-js/bower.json +1 -1
- data/lib/epuber/third_party/bower/bower_components/cookies-js/dist/cookies.js +2 -3
- data/lib/epuber/third_party/bower/bower_components/cookies-js/dist/cookies.min.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/AUTHORS.txt +278 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/{MIT-LICENSE.txt → LICENSE.txt} +17 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/README.md +65 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/bower.json +2 -16
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.js +2566 -1962
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.min.js +4 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.min.map +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/LICENSE.txt +36 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/{src → external}/sizzle/dist/sizzle.js +236 -160
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/jsonp.js +25 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/load.js +20 -12
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/parseJSON.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/parseXML.js +4 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/script.js +16 -12
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/location.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/nonce.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/rquery.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/xhr.js +73 -42
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax.js +116 -57
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/attr.js +49 -48
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/classes.js +86 -67
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/prop.js +63 -32
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/support.js +6 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/val.js +40 -24
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/callbacks.js +114 -87
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/access.js +11 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/init.js +27 -16
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/parseHTML.js +10 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/ready.js +20 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/var/rsingleTag.js +4 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core.js +77 -85
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/addGetHookIf.js +5 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/adjustCSS.js +65 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/curCSS.js +20 -17
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/defaultDisplay.js +16 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/hiddenVisibleSelectors.js +9 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/showHide.js +48 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/support.js +86 -61
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/cssExpand.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/getStyles.js +8 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/isHidden.js +6 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/rmargin.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/rnumnonpx.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/{swap.js → var/swap.js} +3 -7
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css.js +107 -55
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/Data.js +93 -74
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/{accepts.js → var/acceptData.js} +4 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/var/{data_user.js → dataPriv.js} +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/var/{data_priv.js → dataUser.js} +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data.js +49 -40
- data/lib/epuber/third_party/bower/bower_components/jquery/src/deferred.js +34 -25
- data/lib/epuber/third_party/bower/bower_components/jquery/src/deprecated.js +27 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/dimensions.js +9 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects/Tween.js +14 -7
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects/animatedSelector.js +4 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects.js +96 -115
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/ajax.js +11 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/alias.js +11 -23
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js +53 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/support.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/trigger.js +183 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event.js +168 -325
- data/lib/epuber/third_party/bower/bower_components/jquery/src/exports/amd.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/exports/global.js +2 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/intro.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/jquery.js +5 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/_evalUrl.js +6 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/buildFragment.js +102 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/getAll.js +21 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/support.js +7 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rtagName.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/wrapMap.js +27 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation.js +206 -305
- data/lib/epuber/third_party/bower/bower_components/jquery/src/offset.js +40 -29
- data/lib/epuber/third_party/bower/bower_components/jquery/src/outro.js +1 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/queue/delay.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/queue.js +23 -22
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector-native.js +107 -68
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector-sizzle.js +5 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/serialize.js +28 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/findFilter.js +13 -13
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/dir.js +20 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/rneedsContext.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/siblings.js +15 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing.js +32 -56
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/arr.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/class2type.js +3 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/concat.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/document.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/documentElement.js +5 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/hasOwn.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/indexOf.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/pnum.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/push.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/rcssNum.js +7 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/rnotwhite.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/slice.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/support.js +3 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/toString.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/wrap.js +19 -19
- data/lib/epuber/third_party/bower/bower_components/spin.js/{LICENSE.txt → LICENSE.md} +2 -1
- data/lib/epuber/third_party/bower/bower_components/spin.js/README.md +21 -21
- data/lib/epuber/third_party/bower/bower_components/spin.js/bower.json +0 -1
- data/lib/epuber/third_party/bower/bower_components/spin.js/jquery.spin.js +23 -24
- data/lib/epuber/third_party/bower/bower_components/spin.js/spin.js +153 -113
- data/lib/epuber/third_party/bower/bower_components/spin.js/spin.min.js +2 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/CHANGELOG.md +424 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/README.md +23 -308
- data/lib/epuber/third_party/bower/bower_components/uri.js/SECURITY.md +12 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/bower.json +2 -2
- data/lib/epuber/third_party/bower/bower_components/uri.js/contributing.md +0 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/IPv6.js +3 -6
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/SecondLevelDomains.js +8 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.fragmentQuery.js +21 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.fragmentURI.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.js +312 -69
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.min.js +85 -77
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URITemplate.js +28 -11
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/jquery.URI.js +17 -18
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/jquery.URI.min.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/punycode.js +63 -38
- data/lib/epuber/third_party/bower.rb +2 -0
- data/lib/epuber/transformer/text_transformer.rb +1 -2
- data/lib/epuber/transformer.rb +1 -2
- data/lib/epuber/user_interface.rb +1 -1
- data/lib/epuber/vendor/hash_binding.rb +1 -1
- data/lib/epuber/vendor/nokogiri_extensions.rb +24 -21
- data/lib/epuber/vendor/ruby_templater.rb +1 -2
- data/lib/epuber/vendor/size.rb +1 -0
- data/lib/epuber/vendor/version.rb +1 -1
- data/lib/epuber/version.rb +2 -1
- data/lib/epuber.rb +1 -1
- metadata +48 -30
- data/lib/epuber/third_party/bower/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/strundefined.js +0 -3
- data/lib/epuber/vendor/globals_context.rb +0 -26
@@ -1,14 +1,16 @@
|
|
1
|
-
define([
|
1
|
+
define( [
|
2
2
|
"../core",
|
3
|
+
"../var/document",
|
4
|
+
"../var/documentElement",
|
3
5
|
"../var/support"
|
4
|
-
], function( jQuery, support ) {
|
6
|
+
], function( jQuery, document, documentElement, support ) {
|
5
7
|
|
6
|
-
(function() {
|
7
|
-
var pixelPositionVal, boxSizingReliableVal,
|
8
|
-
docElem = document.documentElement,
|
8
|
+
( function() {
|
9
|
+
var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
|
9
10
|
container = document.createElement( "div" ),
|
10
11
|
div = document.createElement( "div" );
|
11
12
|
|
13
|
+
// Finish early in limited (non-browser) environments
|
12
14
|
if ( !div.style ) {
|
13
15
|
return;
|
14
16
|
}
|
@@ -19,78 +21,101 @@ define([
|
|
19
21
|
div.cloneNode( true ).style.backgroundClip = "";
|
20
22
|
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
21
23
|
|
22
|
-
container.style.cssText = "border:0;width:
|
23
|
-
"position:absolute";
|
24
|
+
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
|
25
|
+
"padding:0;margin-top:1px;position:absolute";
|
24
26
|
container.appendChild( div );
|
25
27
|
|
26
28
|
// Executing both pixelPosition & boxSizingReliable tests require only one layout
|
27
29
|
// so they're executed at the same time to save the second computation.
|
28
|
-
function
|
30
|
+
function computeStyleTests() {
|
29
31
|
div.style.cssText =
|
32
|
+
|
30
33
|
// Support: Firefox<29, Android 2.3
|
31
34
|
// Vendor-prefix box-sizing
|
32
|
-
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
|
33
|
-
"
|
34
|
-
"border:1px;padding:1px;
|
35
|
+
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +
|
36
|
+
"position:relative;display:block;" +
|
37
|
+
"margin:auto;border:1px;padding:1px;" +
|
38
|
+
"top:1%;width:50%";
|
35
39
|
div.innerHTML = "";
|
36
|
-
|
40
|
+
documentElement.appendChild( container );
|
37
41
|
|
38
|
-
var divStyle = window.getComputedStyle( div
|
42
|
+
var divStyle = window.getComputedStyle( div );
|
39
43
|
pixelPositionVal = divStyle.top !== "1%";
|
44
|
+
reliableMarginLeftVal = divStyle.marginLeft === "2px";
|
40
45
|
boxSizingReliableVal = divStyle.width === "4px";
|
41
46
|
|
42
|
-
|
47
|
+
// Support: Android 4.0 - 4.3 only
|
48
|
+
// Some styles come back with percentage values, even though they shouldn't
|
49
|
+
div.style.marginRight = "50%";
|
50
|
+
pixelMarginRightVal = divStyle.marginRight === "4px";
|
51
|
+
|
52
|
+
documentElement.removeChild( container );
|
43
53
|
}
|
44
54
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
55
|
+
jQuery.extend( support, {
|
56
|
+
pixelPosition: function() {
|
57
|
+
|
58
|
+
// This test is executed only once but we still do memoizing
|
59
|
+
// since we can use the boxSizingReliable pre-computing.
|
60
|
+
// No need to check if the test was already performed, though.
|
61
|
+
computeStyleTests();
|
62
|
+
return pixelPositionVal;
|
63
|
+
},
|
64
|
+
boxSizingReliable: function() {
|
65
|
+
if ( boxSizingReliableVal == null ) {
|
66
|
+
computeStyleTests();
|
67
|
+
}
|
68
|
+
return boxSizingReliableVal;
|
69
|
+
},
|
70
|
+
pixelMarginRight: function() {
|
71
|
+
|
72
|
+
// Support: Android 4.0-4.3
|
73
|
+
// We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
|
74
|
+
// since that compresses better and they're computed together anyway.
|
75
|
+
if ( boxSizingReliableVal == null ) {
|
76
|
+
computeStyleTests();
|
77
|
+
}
|
78
|
+
return pixelMarginRightVal;
|
79
|
+
},
|
80
|
+
reliableMarginLeft: function() {
|
64
81
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
69
|
-
// This support function is only executed once so no memoizing is needed.
|
70
|
-
var ret,
|
71
|
-
marginDiv = div.appendChild( document.createElement( "div" ) );
|
72
|
-
|
73
|
-
// Reset CSS: box-sizing; display; margin; border; padding
|
74
|
-
marginDiv.style.cssText = div.style.cssText =
|
75
|
-
// Support: Firefox<29, Android 2.3
|
76
|
-
// Vendor-prefix box-sizing
|
77
|
-
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
|
78
|
-
"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
|
79
|
-
marginDiv.style.marginRight = marginDiv.style.width = "0";
|
80
|
-
div.style.width = "1px";
|
81
|
-
docElem.appendChild( container );
|
82
|
-
|
83
|
-
ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
|
84
|
-
|
85
|
-
docElem.removeChild( container );
|
86
|
-
div.removeChild( marginDiv );
|
87
|
-
|
88
|
-
return ret;
|
82
|
+
// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
|
83
|
+
if ( boxSizingReliableVal == null ) {
|
84
|
+
computeStyleTests();
|
89
85
|
}
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
return reliableMarginLeftVal;
|
87
|
+
},
|
88
|
+
reliableMarginRight: function() {
|
89
|
+
|
90
|
+
// Support: Android 2.3
|
91
|
+
// Check if div with explicit width and no margin-right incorrectly
|
92
|
+
// gets computed margin-right based on width of container. (#3333)
|
93
|
+
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
94
|
+
// This support function is only executed once so no memoizing is needed.
|
95
|
+
var ret,
|
96
|
+
marginDiv = div.appendChild( document.createElement( "div" ) );
|
97
|
+
|
98
|
+
// Reset CSS: box-sizing; display; margin; border; padding
|
99
|
+
marginDiv.style.cssText = div.style.cssText =
|
100
|
+
|
101
|
+
// Support: Android 2.3
|
102
|
+
// Vendor-prefix box-sizing
|
103
|
+
"-webkit-box-sizing:content-box;box-sizing:content-box;" +
|
104
|
+
"display:block;margin:0;border:0;padding:0";
|
105
|
+
marginDiv.style.marginRight = marginDiv.style.width = "0";
|
106
|
+
div.style.width = "1px";
|
107
|
+
documentElement.appendChild( container );
|
108
|
+
|
109
|
+
ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );
|
110
|
+
|
111
|
+
documentElement.removeChild( container );
|
112
|
+
div.removeChild( marginDiv );
|
113
|
+
|
114
|
+
return ret;
|
115
|
+
}
|
116
|
+
} );
|
117
|
+
} )();
|
93
118
|
|
94
119
|
return support;
|
95
120
|
|
96
|
-
});
|
121
|
+
} );
|
@@ -1,3 +1,3 @@
|
|
1
|
-
define(function() {
|
1
|
+
define( function() {
|
2
2
|
return [ "Top", "Right", "Bottom", "Left" ];
|
3
|
-
});
|
3
|
+
} );
|
@@ -1,12 +1,15 @@
|
|
1
|
-
define(function() {
|
1
|
+
define( function() {
|
2
2
|
return function( elem ) {
|
3
|
+
|
3
4
|
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
|
4
5
|
// IE throws on elements created in popups
|
5
6
|
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
6
|
-
|
7
|
-
|
7
|
+
var view = elem.ownerDocument.defaultView;
|
8
|
+
|
9
|
+
if ( !view || !view.opener ) {
|
10
|
+
view = window;
|
8
11
|
}
|
9
12
|
|
10
|
-
return
|
13
|
+
return view.getComputedStyle( elem );
|
11
14
|
};
|
12
|
-
});
|
15
|
+
} );
|
@@ -1,13 +1,16 @@
|
|
1
|
-
define([
|
1
|
+
define( [
|
2
2
|
"../../core",
|
3
3
|
"../../selector"
|
4
|
+
|
4
5
|
// css is assumed
|
5
6
|
], function( jQuery ) {
|
6
7
|
|
7
8
|
return function( elem, el ) {
|
9
|
+
|
8
10
|
// isHidden might be called from jQuery#filter function;
|
9
11
|
// in that case, element will be second argument
|
10
12
|
elem = el || elem;
|
11
|
-
return jQuery.css( elem, "display" ) === "none" ||
|
13
|
+
return jQuery.css( elem, "display" ) === "none" ||
|
14
|
+
!jQuery.contains( elem.ownerDocument, elem );
|
12
15
|
};
|
13
|
-
});
|
16
|
+
} );
|
@@ -1,3 +1,3 @@
|
|
1
|
-
define(function() {
|
2
|
-
return (/^margin/);
|
3
|
-
});
|
1
|
+
define( function() {
|
2
|
+
return ( /^margin/ );
|
3
|
+
} );
|
@@ -1,9 +1,7 @@
|
|
1
|
-
define(
|
2
|
-
"../core"
|
3
|
-
], function( jQuery ) {
|
1
|
+
define( function() {
|
4
2
|
|
5
3
|
// A method for quickly swapping in/out CSS properties to get correct calculations.
|
6
|
-
|
4
|
+
return function( elem, options, callback, args ) {
|
7
5
|
var ret, name,
|
8
6
|
old = {};
|
9
7
|
|
@@ -23,6 +21,4 @@ jQuery.swap = function( elem, options, callback, args ) {
|
|
23
21
|
return ret;
|
24
22
|
};
|
25
23
|
|
26
|
-
|
27
|
-
|
28
|
-
});
|
24
|
+
} );
|
@@ -1,31 +1,34 @@
|
|
1
|
-
define([
|
1
|
+
define( [
|
2
2
|
"./core",
|
3
3
|
"./var/pnum",
|
4
4
|
"./core/access",
|
5
5
|
"./css/var/rmargin",
|
6
|
+
"./var/document",
|
7
|
+
"./var/rcssNum",
|
6
8
|
"./css/var/rnumnonpx",
|
7
9
|
"./css/var/cssExpand",
|
8
10
|
"./css/var/isHidden",
|
9
11
|
"./css/var/getStyles",
|
12
|
+
"./css/var/swap",
|
10
13
|
"./css/curCSS",
|
14
|
+
"./css/adjustCSS",
|
11
15
|
"./css/defaultDisplay",
|
12
16
|
"./css/addGetHookIf",
|
13
17
|
"./css/support",
|
14
|
-
"./data/var/
|
18
|
+
"./data/var/dataPriv",
|
15
19
|
|
16
20
|
"./core/init",
|
17
|
-
"./css/swap",
|
18
21
|
"./core/ready",
|
19
22
|
"./selector" // contains
|
20
|
-
], function( jQuery, pnum, access, rmargin, rnumnonpx, cssExpand, isHidden,
|
21
|
-
getStyles, curCSS, defaultDisplay, addGetHookIf, support,
|
23
|
+
], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand, isHidden,
|
24
|
+
getStyles, swap, curCSS, adjustCSS, defaultDisplay, addGetHookIf, support, dataPriv ) {
|
22
25
|
|
23
26
|
var
|
24
|
-
|
27
|
+
|
28
|
+
// Swappable if display is none or starts with table
|
29
|
+
// except "table", "table-cell", or "table-caption"
|
25
30
|
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
26
31
|
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
27
|
-
rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
|
28
|
-
rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
|
29
32
|
|
30
33
|
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
31
34
|
cssNormalTransform = {
|
@@ -33,55 +36,61 @@ var
|
|
33
36
|
fontWeight: "400"
|
34
37
|
},
|
35
38
|
|
36
|
-
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]
|
39
|
+
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
|
40
|
+
emptyStyle = document.createElement( "div" ).style;
|
37
41
|
|
38
42
|
// Return a css property mapped to a potentially vendor prefixed property
|
39
|
-
function vendorPropName(
|
43
|
+
function vendorPropName( name ) {
|
40
44
|
|
41
45
|
// Shortcut for names that are not vendor prefixed
|
42
|
-
if ( name in
|
46
|
+
if ( name in emptyStyle ) {
|
43
47
|
return name;
|
44
48
|
}
|
45
49
|
|
46
50
|
// Check for vendor prefixed names
|
47
|
-
var capName = name[0].toUpperCase() + name.slice(1),
|
48
|
-
origName = name,
|
51
|
+
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
49
52
|
i = cssPrefixes.length;
|
50
53
|
|
51
54
|
while ( i-- ) {
|
52
55
|
name = cssPrefixes[ i ] + capName;
|
53
|
-
if ( name in
|
56
|
+
if ( name in emptyStyle ) {
|
54
57
|
return name;
|
55
58
|
}
|
56
59
|
}
|
57
|
-
|
58
|
-
return origName;
|
59
60
|
}
|
60
61
|
|
61
62
|
function setPositiveNumber( elem, value, subtract ) {
|
62
|
-
|
63
|
+
|
64
|
+
// Any relative (+/-) values have already been
|
65
|
+
// normalized at this point
|
66
|
+
var matches = rcssNum.exec( value );
|
63
67
|
return matches ?
|
68
|
+
|
64
69
|
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
65
|
-
Math.max( 0, matches[
|
70
|
+
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
66
71
|
value;
|
67
72
|
}
|
68
73
|
|
69
74
|
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
70
75
|
var i = extra === ( isBorderBox ? "border" : "content" ) ?
|
76
|
+
|
71
77
|
// If we already have the right measurement, avoid augmentation
|
72
78
|
4 :
|
79
|
+
|
73
80
|
// Otherwise initialize for horizontal or vertical properties
|
74
81
|
name === "width" ? 1 : 0,
|
75
82
|
|
76
83
|
val = 0;
|
77
84
|
|
78
85
|
for ( ; i < 4; i += 2 ) {
|
86
|
+
|
79
87
|
// Both box models exclude margin, so add it if we want it
|
80
88
|
if ( extra === "margin" ) {
|
81
89
|
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
|
82
90
|
}
|
83
91
|
|
84
92
|
if ( isBorderBox ) {
|
93
|
+
|
85
94
|
// border-box includes padding, so remove it if we want content
|
86
95
|
if ( extra === "content" ) {
|
87
96
|
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
@@ -92,6 +101,7 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
|
92
101
|
val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
93
102
|
}
|
94
103
|
} else {
|
104
|
+
|
95
105
|
// At this point, extra isn't content, so add padding
|
96
106
|
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
97
107
|
|
@@ -117,6 +127,7 @@ function getWidthOrHeight( elem, name, extra ) {
|
|
117
127
|
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
118
128
|
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
119
129
|
if ( val <= 0 || val == null ) {
|
130
|
+
|
120
131
|
// Fall back to computed then uncomputed css if necessary
|
121
132
|
val = curCSS( elem, name, styles );
|
122
133
|
if ( val < 0 || val == null ) {
|
@@ -124,7 +135,7 @@ function getWidthOrHeight( elem, name, extra ) {
|
|
124
135
|
}
|
125
136
|
|
126
137
|
// Computed unit is not pixels. Stop here and return.
|
127
|
-
if ( rnumnonpx.test(val) ) {
|
138
|
+
if ( rnumnonpx.test( val ) ) {
|
128
139
|
return val;
|
129
140
|
}
|
130
141
|
|
@@ -161,9 +172,10 @@ function showHide( elements, show ) {
|
|
161
172
|
continue;
|
162
173
|
}
|
163
174
|
|
164
|
-
values[ index ] =
|
175
|
+
values[ index ] = dataPriv.get( elem, "olddisplay" );
|
165
176
|
display = elem.style.display;
|
166
177
|
if ( show ) {
|
178
|
+
|
167
179
|
// Reset the inline display of this element to learn if it is
|
168
180
|
// being hidden by cascaded rules or not
|
169
181
|
if ( !values[ index ] && display === "none" ) {
|
@@ -174,13 +186,21 @@ function showHide( elements, show ) {
|
|
174
186
|
// in a stylesheet to whatever the default browser style is
|
175
187
|
// for such an element
|
176
188
|
if ( elem.style.display === "" && isHidden( elem ) ) {
|
177
|
-
values[ index ] =
|
189
|
+
values[ index ] = dataPriv.access(
|
190
|
+
elem,
|
191
|
+
"olddisplay",
|
192
|
+
defaultDisplay( elem.nodeName )
|
193
|
+
);
|
178
194
|
}
|
179
195
|
} else {
|
180
196
|
hidden = isHidden( elem );
|
181
197
|
|
182
198
|
if ( display !== "none" || !hidden ) {
|
183
|
-
|
199
|
+
dataPriv.set(
|
200
|
+
elem,
|
201
|
+
"olddisplay",
|
202
|
+
hidden ? display : jQuery.css( elem, "display" )
|
203
|
+
);
|
184
204
|
}
|
185
205
|
}
|
186
206
|
}
|
@@ -200,7 +220,7 @@ function showHide( elements, show ) {
|
|
200
220
|
return elements;
|
201
221
|
}
|
202
222
|
|
203
|
-
jQuery.extend({
|
223
|
+
jQuery.extend( {
|
204
224
|
|
205
225
|
// Add in style property hooks for overriding the default
|
206
226
|
// behavior of getting and setting a style property
|
@@ -219,6 +239,7 @@ jQuery.extend({
|
|
219
239
|
|
220
240
|
// Don't automatically add "px" to these possibly-unitless properties
|
221
241
|
cssNumber: {
|
242
|
+
"animationIterationCount": true,
|
222
243
|
"columnCount": true,
|
223
244
|
"fillOpacity": true,
|
224
245
|
"flexGrow": true,
|
@@ -252,7 +273,8 @@ jQuery.extend({
|
|
252
273
|
origName = jQuery.camelCase( name ),
|
253
274
|
style = elem.style;
|
254
275
|
|
255
|
-
name = jQuery.cssProps[ origName ] ||
|
276
|
+
name = jQuery.cssProps[ origName ] ||
|
277
|
+
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
256
278
|
|
257
279
|
// Gets hook for the prefixed version, then unprefixed version
|
258
280
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
@@ -262,8 +284,9 @@ jQuery.extend({
|
|
262
284
|
type = typeof value;
|
263
285
|
|
264
286
|
// Convert "+=" or "-=" to relative numbers (#7345)
|
265
|
-
if ( type === "string" && (ret =
|
266
|
-
value = (
|
287
|
+
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
288
|
+
value = adjustCSS( elem, name, ret );
|
289
|
+
|
267
290
|
// Fixes bug #9237
|
268
291
|
type = "number";
|
269
292
|
}
|
@@ -273,9 +296,9 @@ jQuery.extend({
|
|
273
296
|
return;
|
274
297
|
}
|
275
298
|
|
276
|
-
// If a number, add
|
277
|
-
if ( type === "number"
|
278
|
-
value += "px";
|
299
|
+
// If a number was passed in, add the unit (except for certain CSS properties)
|
300
|
+
if ( type === "number" ) {
|
301
|
+
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
279
302
|
}
|
280
303
|
|
281
304
|
// Support: IE9-11+
|
@@ -285,13 +308,18 @@ jQuery.extend({
|
|
285
308
|
}
|
286
309
|
|
287
310
|
// If a hook was provided, use that value, otherwise just set the specified value
|
288
|
-
if ( !hooks || !("set" in hooks) ||
|
311
|
+
if ( !hooks || !( "set" in hooks ) ||
|
312
|
+
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
313
|
+
|
289
314
|
style[ name ] = value;
|
290
315
|
}
|
291
316
|
|
292
317
|
} else {
|
318
|
+
|
293
319
|
// If a hook was provided get the non-computed value from there
|
294
|
-
if ( hooks && "get" in hooks &&
|
320
|
+
if ( hooks && "get" in hooks &&
|
321
|
+
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
|
322
|
+
|
295
323
|
return ret;
|
296
324
|
}
|
297
325
|
|
@@ -305,7 +333,8 @@ jQuery.extend({
|
|
305
333
|
origName = jQuery.camelCase( name );
|
306
334
|
|
307
335
|
// Make sure that we're working with the right name
|
308
|
-
name = jQuery.cssProps[ origName ] ||
|
336
|
+
name = jQuery.cssProps[ origName ] ||
|
337
|
+
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
309
338
|
|
310
339
|
// Try prefixed name followed by the unprefixed name
|
311
340
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
@@ -328,54 +357,77 @@ jQuery.extend({
|
|
328
357
|
// Make numeric if forced or a qualifier was provided and val looks numeric
|
329
358
|
if ( extra === "" || extra ) {
|
330
359
|
num = parseFloat( val );
|
331
|
-
return extra === true ||
|
360
|
+
return extra === true || isFinite( num ) ? num || 0 : val;
|
332
361
|
}
|
333
362
|
return val;
|
334
363
|
}
|
335
|
-
});
|
364
|
+
} );
|
336
365
|
|
337
|
-
jQuery.each([ "height", "width" ], function( i, name ) {
|
366
|
+
jQuery.each( [ "height", "width" ], function( i, name ) {
|
338
367
|
jQuery.cssHooks[ name ] = {
|
339
368
|
get: function( elem, computed, extra ) {
|
340
369
|
if ( computed ) {
|
341
370
|
|
342
371
|
// Certain elements can have dimension info if we invisibly show them
|
343
372
|
// but it must have a current display style that would benefit
|
344
|
-
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
373
|
+
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
374
|
+
elem.offsetWidth === 0 ?
|
375
|
+
swap( elem, cssShow, function() {
|
376
|
+
return getWidthOrHeight( elem, name, extra );
|
377
|
+
} ) :
|
378
|
+
getWidthOrHeight( elem, name, extra );
|
349
379
|
}
|
350
380
|
},
|
351
381
|
|
352
382
|
set: function( elem, value, extra ) {
|
353
|
-
var
|
354
|
-
|
355
|
-
augmentWidthOrHeight(
|
383
|
+
var matches,
|
384
|
+
styles = extra && getStyles( elem ),
|
385
|
+
subtract = extra && augmentWidthOrHeight(
|
356
386
|
elem,
|
357
387
|
name,
|
358
388
|
extra,
|
359
389
|
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
360
390
|
styles
|
361
|
-
)
|
362
|
-
|
391
|
+
);
|
392
|
+
|
393
|
+
// Convert to pixels if value adjustment is needed
|
394
|
+
if ( subtract && ( matches = rcssNum.exec( value ) ) &&
|
395
|
+
( matches[ 3 ] || "px" ) !== "px" ) {
|
396
|
+
|
397
|
+
elem.style[ name ] = value;
|
398
|
+
value = jQuery.css( elem, name );
|
399
|
+
}
|
400
|
+
|
401
|
+
return setPositiveNumber( elem, value, subtract );
|
363
402
|
}
|
364
403
|
};
|
365
|
-
});
|
404
|
+
} );
|
405
|
+
|
406
|
+
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
407
|
+
function( elem, computed ) {
|
408
|
+
if ( computed ) {
|
409
|
+
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
410
|
+
elem.getBoundingClientRect().left -
|
411
|
+
swap( elem, { marginLeft: 0 }, function() {
|
412
|
+
return elem.getBoundingClientRect().left;
|
413
|
+
} )
|
414
|
+
) + "px";
|
415
|
+
}
|
416
|
+
}
|
417
|
+
);
|
366
418
|
|
367
419
|
// Support: Android 2.3
|
368
420
|
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
|
369
421
|
function( elem, computed ) {
|
370
422
|
if ( computed ) {
|
371
|
-
return
|
423
|
+
return swap( elem, { "display": "inline-block" },
|
372
424
|
curCSS, [ elem, "marginRight" ] );
|
373
425
|
}
|
374
426
|
}
|
375
427
|
);
|
376
428
|
|
377
429
|
// These hooks are used by animate to expand properties
|
378
|
-
jQuery.each({
|
430
|
+
jQuery.each( {
|
379
431
|
margin: "",
|
380
432
|
padding: "",
|
381
433
|
border: "Width"
|
@@ -386,7 +438,7 @@ jQuery.each({
|
|
386
438
|
expanded = {},
|
387
439
|
|
388
440
|
// Assumes a single number if not a string
|
389
|
-
parts = typeof value === "string" ? value.split(" ") : [ value ];
|
441
|
+
parts = typeof value === "string" ? value.split( " " ) : [ value ];
|
390
442
|
|
391
443
|
for ( ; i < 4; i++ ) {
|
392
444
|
expanded[ prefix + cssExpand[ i ] + suffix ] =
|
@@ -400,9 +452,9 @@ jQuery.each({
|
|
400
452
|
if ( !rmargin.test( prefix ) ) {
|
401
453
|
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
402
454
|
}
|
403
|
-
});
|
455
|
+
} );
|
404
456
|
|
405
|
-
jQuery.fn.extend({
|
457
|
+
jQuery.fn.extend( {
|
406
458
|
css: function( name, value ) {
|
407
459
|
return access( this, function( elem, name, value ) {
|
408
460
|
var styles, len,
|
@@ -436,15 +488,15 @@ jQuery.fn.extend({
|
|
436
488
|
return state ? this.show() : this.hide();
|
437
489
|
}
|
438
490
|
|
439
|
-
return this.each(function() {
|
491
|
+
return this.each( function() {
|
440
492
|
if ( isHidden( this ) ) {
|
441
493
|
jQuery( this ).show();
|
442
494
|
} else {
|
443
495
|
jQuery( this ).hide();
|
444
496
|
}
|
445
|
-
});
|
497
|
+
} );
|
446
498
|
}
|
447
|
-
});
|
499
|
+
} );
|
448
500
|
|
449
501
|
return jQuery;
|
450
|
-
});
|
502
|
+
} );
|