selenium-webdriver 2.33.0 → 2.34.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,13 +1,32 @@
1
+ 2.34.0 (2013-08-06)
2
+ ===================
3
+
4
+ Remote:
5
+ * Add `Driver#remote_status` (remote driver only) (#5669)
6
+ Firefox:
7
+ * Updated Firefox native event components to support Firefox 22.
8
+ iPhone:
9
+ * The driver is now deprecated (see http://appium.io/ or http://ios-driver.github.io/ios-driver/ for a replacement)
10
+ Various:
11
+ * Updated our copy of the Closure compiler and library to the most
12
+ recent versions.
13
+ * Updated the atoms library, including support for MS pointer events
14
+ and refinements to element visibility tests.
15
+ * Update synthesized mouse implementation. Mouse moves are
16
+ implemented using nsIDOMWindowUtils.
17
+ * Added support for the HTML5 "hidden" attribute. If an element, or
18
+ ancestor, has hidden attribute make, it is not shown.
19
+
1
20
  2.33.0 (2013-05-26)
2
21
  ===================
3
22
 
4
23
  Remote:
5
24
  * Support rotating devices, such as iPhone & iPad in simulator and Android browser in emulator
6
25
  * Support for interacting with touch screen devices, such as iPhone & iPad in simulator and Android browser in emulator
7
- * Improve error messages for invalid wire protocol responses
26
+ * Improve error messages for invalid wire protocol responses
8
27
  Chrome:
9
28
  * Accept :service_log_path for Chrome. (#3475)
10
- IE:
29
+ IE:
11
30
  * IE >=9 versions triggerMouseEvent like other browsers (#2218).
12
31
  Various:
13
32
  * Element#text ignores elements in <head>
@@ -33,6 +33,7 @@ require 'selenium/webdriver/common/driver_extensions/has_web_storage'
33
33
  require 'selenium/webdriver/common/driver_extensions/has_location'
34
34
  require 'selenium/webdriver/common/driver_extensions/has_session_id'
35
35
  require 'selenium/webdriver/common/driver_extensions/has_touch_screen'
36
+ require 'selenium/webdriver/common/driver_extensions/has_remote_status'
36
37
  require 'selenium/webdriver/common/driver_extensions/uploads_files'
37
38
  require 'selenium/webdriver/common/keys'
38
39
  require 'selenium/webdriver/common/bridge_helper'
@@ -0,0 +1,13 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module DriverExtensions
4
+ module HasRemoteStatus
5
+
6
+ def remote_status
7
+ @bridge.status
8
+ end
9
+
10
+ end
11
+ end
12
+ end
13
+ end
@@ -52,7 +52,7 @@ module Selenium
52
52
  msg = "timed out after #{@timeout} seconds"
53
53
  end
54
54
 
55
- msg << " (#{last_error.message})}" if last_error
55
+ msg << " (#{last_error.message})" if last_error
56
56
 
57
57
  raise Error::TimeOutError, msg
58
58
  end
@@ -10,6 +10,8 @@ module Selenium
10
10
  DEFAULT_URL = "http://#{Platform.localhost}:3001/wd/hub/"
11
11
 
12
12
  def initialize(opts = {})
13
+ warn 'The iPhone driver is reprecated - please use http://appium.io/ or http://ios-driver.github.io/ios-driver/ instead'
14
+
13
15
  remote_opts = {
14
16
  :url => opts.fetch(:url, DEFAULT_URL),
15
17
  :desired_capabilities => opts.fetch(:desired_capabilities, capabilities),
@@ -82,7 +82,8 @@ module Selenium
82
82
  DriverExtensions::TakesScreenshot,
83
83
  DriverExtensions::HasSessionId,
84
84
  DriverExtensions::Rotatable,
85
- DriverExtensions::HasTouchScreen
85
+ DriverExtensions::HasTouchScreen,
86
+ DriverExtensions::HasRemoteStatus
86
87
  ]
87
88
  end
88
89
 
@@ -101,6 +102,10 @@ module Selenium
101
102
  Capabilities.json_create resp['value']
102
103
  end
103
104
 
105
+ def status
106
+ execute :status
107
+ end
108
+
104
109
  def get(url)
105
110
  execute :get, {}, :url => url
106
111
  end
@@ -7,6 +7,7 @@ class Selenium::WebDriver::Remote::Bridge
7
7
 
8
8
  command :newSession, :post, "session"
9
9
  command :getCapabilities, :get, "session/:session_id"
10
+ command :status, :get, "status"
10
11
 
11
12
  #
12
13
  # basic driver
@@ -1,7 +1,21 @@
1
1
  var COMPILED = !0, goog = goog || {};
2
2
  goog.global = this;
3
+ goog.exportPath_ = function(a, b, c) {
4
+ a = a.split(".");
5
+ c = c || goog.global;
6
+ a[0] in c || !c.execScript || c.execScript("var " + a[0]);
7
+ for(var d;a.length && (d = a.shift());) {
8
+ a.length || void 0 === b ? c = c[d] ? c[d] : c[d] = {} : c[d] = b
9
+ }
10
+ };
11
+ goog.define = function(a, b) {
12
+ var c = b;
13
+ COMPILED || goog.global.CLOSURE_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES, a) && (c = goog.global.CLOSURE_DEFINES[a]);
14
+ goog.exportPath_(a, c)
15
+ };
3
16
  goog.DEBUG = !0;
4
17
  goog.LOCALE = "en";
18
+ goog.TRUSTED_SITE = !0;
5
19
  goog.provide = function(a) {
6
20
  if(!COMPILED) {
7
21
  if(goog.isProvided_(a)) {
@@ -22,14 +36,6 @@ goog.setTestOnly = function(a) {
22
36
  COMPILED || (goog.isProvided_ = function(a) {
23
37
  return!goog.implicitNamespaces_[a] && !!goog.getObjectByName(a)
24
38
  }, goog.implicitNamespaces_ = {});
25
- goog.exportPath_ = function(a, b, c) {
26
- a = a.split(".");
27
- c = c || goog.global;
28
- !(a[0] in c) && c.execScript && c.execScript("var " + a[0]);
29
- for(var d;a.length && (d = a.shift());) {
30
- !a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {}
31
- }
32
- };
33
39
  goog.getObjectByName = function(a, b) {
34
40
  for(var c = a.split("."), d = b || goog.global, e;e = c.shift();) {
35
41
  if(goog.isDefAndNotNull(d[e])) {
@@ -47,7 +53,7 @@ goog.globalize = function(a, b) {
47
53
  }
48
54
  };
49
55
  goog.addDependency = function(a, b, c) {
50
- if(!COMPILED) {
56
+ if(goog.DEPENDENCIES_ENABLED) {
51
57
  var d;
52
58
  a = a.replace(/\\/g, "/");
53
59
  for(var e = goog.dependencies_, f = 0;d = b[f];f++) {
@@ -93,7 +99,8 @@ goog.addSingletonGetter = function(a) {
93
99
  }
94
100
  };
95
101
  goog.instantiatedSingletons_ = [];
96
- !COMPILED && goog.ENABLE_DEBUG_LOADER && (goog.included_ = {}, goog.dependencies_ = {pathToNames:{}, nameToPath:{}, requires:{}, visited:{}, written:{}}, goog.inHtmlDocument_ = function() {
102
+ goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
103
+ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathToNames:{}, nameToPath:{}, requires:{}, visited:{}, written:{}}, goog.inHtmlDocument_ = function() {
97
104
  var a = goog.global.document;
98
105
  return"undefined" != typeof a && "write" in a
99
106
  }, goog.findBasePath_ = function() {
@@ -232,7 +239,7 @@ goog.removeUid = function(a) {
232
239
  }catch(b) {
233
240
  }
234
241
  };
235
- goog.UID_PROPERTY_ = "closure_uid_" + Math.floor(2147483648 * Math.random()).toString(36);
242
+ goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0);
236
243
  goog.uidCounter_ = 0;
237
244
  goog.getHashCode = goog.getUid;
238
245
  goog.removeHashCode = goog.removeUid;
@@ -286,7 +293,7 @@ goog.mixin = function(a, b) {
286
293
  a[c] = b[c]
287
294
  }
288
295
  };
289
- goog.now = Date.now || function() {
296
+ goog.now = goog.TRUSTED_SITE && Date.now || function() {
290
297
  return+new Date
291
298
  };
292
299
  goog.globalEval = function(a) {
@@ -356,6 +363,9 @@ goog.inherits = function(a, b) {
356
363
  };
357
364
  goog.base = function(a, b, c) {
358
365
  var d = arguments.callee.caller;
366
+ if(goog.DEBUG && !d) {
367
+ throw Error("arguments.caller not defined. goog.base() expects not to be running in strict mode. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");
368
+ }
359
369
  if(d.superClass_) {
360
370
  return d.superClass_.constructor.apply(a, Array.prototype.slice.call(arguments, 1))
361
371
  }
@@ -398,12 +408,14 @@ goog.string.caseInsensitiveStartsWith = function(a, b) {
398
408
  goog.string.caseInsensitiveEndsWith = function(a, b) {
399
409
  return 0 == goog.string.caseInsensitiveCompare(b, a.substr(a.length - b.length, b.length))
400
410
  };
411
+ goog.string.caseInsensitiveEquals = function(a, b) {
412
+ return a.toLowerCase() == b.toLowerCase()
413
+ };
401
414
  goog.string.subs = function(a, b) {
402
- for(var c = 1;c < arguments.length;c++) {
403
- var d = String(arguments[c]).replace(/\$/g, "$$$$");
404
- a = a.replace(/\%s/, d)
415
+ for(var c = a.split("%s"), d = "", e = Array.prototype.slice.call(arguments, 1);e.length && 1 < c.length;) {
416
+ d += c.shift() + e.shift()
405
417
  }
406
- return a
418
+ return d + c.join("%s")
407
419
  };
408
420
  goog.string.collapseWhitespace = function(a) {
409
421
  return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "")
@@ -696,6 +708,12 @@ goog.string.toNumber = function(a) {
696
708
  var b = Number(a);
697
709
  return 0 == b && goog.string.isEmpty(a) ? NaN : b
698
710
  };
711
+ goog.string.isLowerCamelCase = function(a) {
712
+ return/^[a-z]+([A-Z][a-z]*)*$/.test(a)
713
+ };
714
+ goog.string.isUpperCamelCase = function(a) {
715
+ return/^([A-Z][a-z]*)+$/.test(a)
716
+ };
699
717
  goog.string.toCamelCase = function(a) {
700
718
  return String(a).replace(/\-([a-z])/g, function(a, c) {
701
719
  return c.toUpperCase()
@@ -714,6 +732,14 @@ goog.string.parseInt = function(a) {
714
732
  isFinite(a) && (a = String(a));
715
733
  return goog.isString(a) ? /^\s*-?0x/i.test(a) ? parseInt(a, 16) : parseInt(a, 10) : NaN
716
734
  };
735
+ goog.string.splitLimit = function(a, b, c) {
736
+ a = a.split(b);
737
+ for(var d = [];0 < c && a.length;) {
738
+ d.push(a.shift()), c--
739
+ }
740
+ a.length && d.push(a.join(b));
741
+ return d
742
+ };
717
743
  goog.asserts = {};
718
744
  goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
719
745
  goog.asserts.AssertionError = function(a, b) {
@@ -767,11 +793,11 @@ goog.asserts.assertBoolean = function(a, b, c) {
767
793
  return a
768
794
  };
769
795
  goog.asserts.assertInstanceof = function(a, b, c, d) {
770
- goog.asserts.ENABLE_ASSERTS && !(a instanceof b) && goog.asserts.doAssertFailure_("instanceof check failed.", null, c, Array.prototype.slice.call(arguments, 3));
796
+ !goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_("instanceof check failed.", null, c, Array.prototype.slice.call(arguments, 3));
771
797
  return a
772
798
  };
773
799
  goog.array = {};
774
- goog.NATIVE_ARRAY_PROTOTYPES = !0;
800
+ goog.NATIVE_ARRAY_PROTOTYPES = goog.TRUSTED_SITE;
775
801
  goog.array.peek = function(a) {
776
802
  return a[a.length - 1]
777
803
  };
@@ -782,7 +808,7 @@ goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_
782
808
  } : function(a, b, c) {
783
809
  c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
784
810
  if(goog.isString(a)) {
785
- return!goog.isString(b) || 1 != b.length ? -1 : a.indexOf(b, c)
811
+ return goog.isString(b) && 1 == b.length ? a.indexOf(b, c) : -1
786
812
  }
787
813
  for(;c < a.length;c++) {
788
814
  if(c in a && a[c] === b) {
@@ -798,7 +824,7 @@ goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOT
798
824
  c = null == c ? a.length - 1 : c;
799
825
  0 > c && (c = Math.max(0, a.length + c));
800
826
  if(goog.isString(a)) {
801
- return!goog.isString(b) || 1 != b.length ? -1 : a.lastIndexOf(b, c)
827
+ return goog.isString(b) && 1 == b.length ? a.lastIndexOf(b, c) : -1
802
828
  }
803
829
  for(;0 <= c;c--) {
804
830
  if(c in a && a[c] === b) {
@@ -883,6 +909,13 @@ goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.e
883
909
  }
884
910
  return!0
885
911
  };
912
+ goog.array.count = function(a, b, c) {
913
+ var d = 0;
914
+ goog.array.forEach(a, function(a, f, g) {
915
+ b.call(c, a, f, g) && ++d
916
+ }, c);
917
+ return d
918
+ };
886
919
  goog.array.find = function(a, b, c) {
887
920
  b = goog.array.findIndex(a, b, c);
888
921
  return 0 > b ? null : goog.isString(a) ? a.charAt(b) : a[b]
@@ -964,7 +997,7 @@ goog.array.clone = goog.array.toArray;
964
997
  goog.array.extend = function(a, b) {
965
998
  for(var c = 1;c < arguments.length;c++) {
966
999
  var d = arguments[c], e;
967
- if(goog.isArray(d) || (e = goog.isArrayLike(d)) && d.hasOwnProperty("callee")) {
1000
+ if(goog.isArray(d) || (e = goog.isArrayLike(d)) && Object.prototype.hasOwnProperty.call(d, "callee")) {
968
1001
  a.push.apply(a, d)
969
1002
  }else {
970
1003
  if(e) {
@@ -1078,12 +1111,12 @@ goog.array.binaryRemove = function(a, b, c) {
1078
1111
  b = goog.array.binarySearch(a, b, c);
1079
1112
  return 0 <= b ? goog.array.removeAt(a, b) : !1
1080
1113
  };
1081
- goog.array.bucket = function(a, b) {
1082
- for(var c = {}, d = 0;d < a.length;d++) {
1083
- var e = a[d], f = b(e, d, a);
1084
- goog.isDef(f) && (c[f] || (c[f] = [])).push(e)
1114
+ goog.array.bucket = function(a, b, c) {
1115
+ for(var d = {}, e = 0;e < a.length;e++) {
1116
+ var f = a[e], g = b.call(c, f, e, a);
1117
+ goog.isDef(g) && (d[g] || (d[g] = [])).push(f)
1085
1118
  }
1086
- return c
1119
+ return d
1087
1120
  };
1088
1121
  goog.array.toObject = function(a, b, c) {
1089
1122
  var d = {};
@@ -1092,6 +1125,24 @@ goog.array.toObject = function(a, b, c) {
1092
1125
  });
1093
1126
  return d
1094
1127
  };
1128
+ goog.array.range = function(a, b, c) {
1129
+ var d = [], e = 0, f = a;
1130
+ c = c || 1;
1131
+ void 0 !== b && (e = a, f = b);
1132
+ if(0 > c * (f - e)) {
1133
+ return[]
1134
+ }
1135
+ if(0 < c) {
1136
+ for(a = e;a < f;a += c) {
1137
+ d.push(a)
1138
+ }
1139
+ }else {
1140
+ for(a = e;a > f;a += c) {
1141
+ d.push(a)
1142
+ }
1143
+ }
1144
+ return d
1145
+ };
1095
1146
  goog.array.repeat = function(a, b) {
1096
1147
  for(var c = [], d = 0;d < b;d++) {
1097
1148
  c[d] = a
@@ -1203,7 +1254,7 @@ goog.object.getKeys = function(a) {
1203
1254
  return b
1204
1255
  };
1205
1256
  goog.object.getValueByKeys = function(a, b) {
1206
- for(var c = goog.isArrayLike(b), d = c ? b : arguments, c = c ? 0 : 1;c < d.length && !(a = a[d[c]], !goog.isDef(a));c++) {
1257
+ for(var c = goog.isArrayLike(b), d = c ? b : arguments, c = c ? 0 : 1;c < d.length && (a = a[d[c]], goog.isDef(a));c++) {
1207
1258
  }
1208
1259
  return a
1209
1260
  };
@@ -1401,8 +1452,7 @@ goog.structs.filter = function(a, b, c) {
1401
1452
  b.call(c, f[h], e[h], a) && (d[e[h]] = f[h])
1402
1453
  }
1403
1454
  }else {
1404
- d = [];
1405
- for(h = 0;h < g;h++) {
1455
+ for(d = [], h = 0;h < g;h++) {
1406
1456
  b.call(c, f[h], void 0, a) && d.push(f[h])
1407
1457
  }
1408
1458
  }
@@ -1422,8 +1472,7 @@ goog.structs.map = function(a, b, c) {
1422
1472
  d[e[h]] = b.call(c, f[h], e[h], a)
1423
1473
  }
1424
1474
  }else {
1425
- d = [];
1426
- for(h = 0;h < g;h++) {
1475
+ for(d = [], h = 0;h < g;h++) {
1427
1476
  d[h] = b.call(c, f[h], void 0, a)
1428
1477
  }
1429
1478
  }
@@ -1944,18 +1993,28 @@ goog.userAgent.ASSUME_MAC = !1;
1944
1993
  goog.userAgent.ASSUME_WINDOWS = !1;
1945
1994
  goog.userAgent.ASSUME_LINUX = !1;
1946
1995
  goog.userAgent.ASSUME_X11 = !1;
1947
- goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11;
1996
+ goog.userAgent.ASSUME_ANDROID = !1;
1997
+ goog.userAgent.ASSUME_IPHONE = !1;
1998
+ goog.userAgent.ASSUME_IPAD = !1;
1999
+ goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11 || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD;
1948
2000
  goog.userAgent.initPlatform_ = function() {
1949
2001
  goog.userAgent.detectedMac_ = goog.string.contains(goog.userAgent.PLATFORM, "Mac");
1950
2002
  goog.userAgent.detectedWindows_ = goog.string.contains(goog.userAgent.PLATFORM, "Win");
1951
2003
  goog.userAgent.detectedLinux_ = goog.string.contains(goog.userAgent.PLATFORM, "Linux");
1952
- goog.userAgent.detectedX11_ = !!goog.userAgent.getNavigator() && goog.string.contains(goog.userAgent.getNavigator().appVersion || "", "X11")
2004
+ goog.userAgent.detectedX11_ = !!goog.userAgent.getNavigator() && goog.string.contains(goog.userAgent.getNavigator().appVersion || "", "X11");
2005
+ var a = goog.userAgent.getUserAgentString();
2006
+ goog.userAgent.detectedAndroid_ = !!a && 0 <= a.indexOf("Android");
2007
+ goog.userAgent.detectedIPhone_ = !!a && 0 <= a.indexOf("iPhone");
2008
+ goog.userAgent.detectedIPad_ = !!a && 0 <= a.indexOf("iPad")
1953
2009
  };
1954
2010
  goog.userAgent.PLATFORM_KNOWN_ || goog.userAgent.initPlatform_();
1955
2011
  goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.userAgent.detectedMac_;
1956
2012
  goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.userAgent.detectedWindows_;
1957
2013
  goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.detectedLinux_;
1958
2014
  goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.detectedX11_;
2015
+ goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.userAgent.detectedAndroid_;
2016
+ goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.userAgent.detectedIPhone_;
2017
+ goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.userAgent.detectedIPad_;
1959
2018
  goog.userAgent.determineVersion_ = function() {
1960
2019
  var a = "", b;
1961
2020
  goog.userAgent.OPERA && goog.global.opera ? (a = goog.global.opera.version, a = "function" == typeof a ? a() : a) : (goog.userAgent.GECKO ? b = /rv\:([^\);]+)(\)|;)/ : goog.userAgent.IE ? b = /MSIE\s+([^\);]+)(\)|;)/ : goog.userAgent.WEBKIT && (b = /WebKit\/(\S+)/), b && (a = (a = b.exec(goog.userAgent.getUserAgentString())) ? a[1] : ""));
@@ -1969,16 +2028,18 @@ goog.userAgent.VERSION = goog.userAgent.determineVersion_();
1969
2028
  goog.userAgent.compare = function(a, b) {
1970
2029
  return goog.string.compareVersions(a, b)
1971
2030
  };
1972
- goog.userAgent.isVersionCache_ = {};
1973
- goog.userAgent.isVersion = function(a) {
1974
- return goog.userAgent.ASSUME_ANY_VERSION || goog.userAgent.isVersionCache_[a] || (goog.userAgent.isVersionCache_[a] = 0 <= goog.string.compareVersions(goog.userAgent.VERSION, a))
2031
+ goog.userAgent.isVersionOrHigherCache_ = {};
2032
+ goog.userAgent.isVersionOrHigher = function(a) {
2033
+ return goog.userAgent.ASSUME_ANY_VERSION || goog.userAgent.isVersionOrHigherCache_[a] || (goog.userAgent.isVersionOrHigherCache_[a] = 0 <= goog.string.compareVersions(goog.userAgent.VERSION, a))
1975
2034
  };
1976
- goog.userAgent.isDocumentMode = function(a) {
2035
+ goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher;
2036
+ goog.userAgent.isDocumentModeOrHigher = function(a) {
1977
2037
  return goog.userAgent.IE && goog.userAgent.DOCUMENT_MODE >= a
1978
2038
  };
2039
+ goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher;
1979
2040
  goog.userAgent.DOCUMENT_MODE = function() {
1980
2041
  var a = goog.global.document;
1981
- return!a || !goog.userAgent.IE ? void 0 : goog.userAgent.getDocumentMode_() || ("CSS1Compat" == a.compatMode ? parseInt(goog.userAgent.VERSION, 10) : 5)
2042
+ return a && goog.userAgent.IE ? goog.userAgent.getDocumentMode_() || ("CSS1Compat" == a.compatMode ? parseInt(goog.userAgent.VERSION, 10) : 5) : void 0
1982
2043
  }();
1983
2044
  goog.uri = {};
1984
2045
  goog.uri.utils = {};
@@ -1992,11 +2053,25 @@ goog.uri.utils.buildFromEncodedParts = function(a, b, c, d, e, f, g) {
1992
2053
  g && (h += "#" + g);
1993
2054
  return h
1994
2055
  };
1995
- goog.uri.utils.splitRe_ = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
2056
+ goog.uri.utils.splitRe_ = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
1996
2057
  goog.uri.utils.ComponentIndex = {SCHEME:1, USER_INFO:2, DOMAIN:3, PORT:4, PATH:5, QUERY_DATA:6, FRAGMENT:7};
1997
2058
  goog.uri.utils.split = function(a) {
2059
+ goog.uri.utils.phishingProtection_();
1998
2060
  return a.match(goog.uri.utils.splitRe_)
1999
2061
  };
2062
+ goog.uri.utils.needsPhishingProtection_ = goog.userAgent.WEBKIT;
2063
+ goog.uri.utils.phishingProtection_ = function() {
2064
+ if(goog.uri.utils.needsPhishingProtection_) {
2065
+ goog.uri.utils.needsPhishingProtection_ = !1;
2066
+ var a = goog.global.location;
2067
+ if(a) {
2068
+ var b = a.href;
2069
+ if(b && (b = goog.uri.utils.getDomain(b)) && b != a.hostname) {
2070
+ throw goog.uri.utils.needsPhishingProtection_ = !0, Error();
2071
+ }
2072
+ }
2073
+ }
2074
+ };
2000
2075
  goog.uri.utils.decodeIfPossible_ = function(a) {
2001
2076
  return a && decodeURIComponent(a)
2002
2077
  };
@@ -2115,7 +2190,9 @@ goog.uri.utils.appendParamsFromMap = function(a, b) {
2115
2190
  return goog.uri.utils.appendQueryData_(goog.uri.utils.buildQueryDataBufferFromMap_([a], b))
2116
2191
  };
2117
2192
  goog.uri.utils.appendParam = function(a, b, c) {
2118
- return goog.uri.utils.appendQueryData_([a, "&", b, "=", goog.string.urlEncode(c)])
2193
+ a = [a, "&", b];
2194
+ goog.isDefAndNotNull(c) && a.push("=", goog.string.urlEncode(c));
2195
+ return goog.uri.utils.appendQueryData_(a)
2119
2196
  };
2120
2197
  goog.uri.utils.findParam_ = function(a, b, c, d) {
2121
2198
  for(var e = c.length;0 <= (b = a.indexOf(c, b)) && b < d;) {
@@ -2411,16 +2488,16 @@ goog.Uri.removeDotSegments = function(a) {
2411
2488
  if(".." == a || "." == a) {
2412
2489
  return""
2413
2490
  }
2414
- if(!goog.string.contains(a, "./") && !goog.string.contains(a, "/.")) {
2415
- return a
2416
- }
2417
- var b = goog.string.startsWith(a, "/");
2418
- a = a.split("/");
2419
- for(var c = [], d = 0;d < a.length;) {
2420
- var e = a[d++];
2421
- "." == e ? b && d == a.length && c.push("") : ".." == e ? ((1 < c.length || 1 == c.length && "" != c[0]) && c.pop(), b && d == a.length && c.push("")) : (c.push(e), b = !0)
2491
+ if(goog.string.contains(a, "./") || goog.string.contains(a, "/.")) {
2492
+ var b = goog.string.startsWith(a, "/");
2493
+ a = a.split("/");
2494
+ for(var c = [], d = 0;d < a.length;) {
2495
+ var e = a[d++];
2496
+ "." == e ? b && d == a.length && c.push("") : ".." == e ? ((1 < c.length || 1 == c.length && "" != c[0]) && c.pop(), b && d == a.length && c.push("")) : (c.push(e), b = !0)
2497
+ }
2498
+ return c.join("/")
2422
2499
  }
2423
- return c.join("/")
2500
+ return a
2424
2501
  };
2425
2502
  goog.Uri.decodeOrEmpty_ = function(a) {
2426
2503
  return a ? decodeURIComponent(a) : ""
@@ -2694,6 +2771,7 @@ goog.debug.HtmlFormatter.prototype.formatRecord = function(a) {
2694
2771
  this.showAbsoluteTime && c.push("[", goog.debug.Formatter.getDateTimeStamp_(a), "] ");
2695
2772
  this.showRelativeTime && c.push("[", goog.string.whitespaceEscape(goog.debug.Formatter.getRelativeTime_(a, this.startTimeProvider_.get())), "s] ");
2696
2773
  this.showLoggerName && c.push("[", goog.string.htmlEscape(a.getLoggerName()), "] ");
2774
+ this.showSeverityLevel && c.push("[", goog.string.htmlEscape(a.getLevel().name), "] ");
2697
2775
  c.push('<span class="', b, '">', goog.string.newLineToBr(goog.string.whitespaceEscape(goog.string.htmlEscape(a.getMessage()))));
2698
2776
  this.showExceptionText && a.getException() && c.push("<br>", goog.string.newLineToBr(goog.string.whitespaceEscape(a.getExceptionText() || "")));
2699
2777
  c.push("</span><br>");
@@ -2793,10 +2871,11 @@ goog.structs.Set.prototype.isSubsetOf = function(a) {
2793
2871
  goog.structs.Set.prototype.__iterator__ = function(a) {
2794
2872
  return this.map_.__iterator__(!1)
2795
2873
  };
2874
+ goog.debug.LOGGING_ENABLED = goog.DEBUG;
2796
2875
  goog.debug.catchErrors = function(a, b, c) {
2797
2876
  c = c || goog.global;
2798
2877
  var d = c.onerror, e = !!b;
2799
- goog.userAgent.WEBKIT && !goog.userAgent.isVersion("535.3") && (e = !e);
2878
+ goog.userAgent.WEBKIT && !goog.userAgent.isVersionOrHigher("535.3") && (e = !e);
2800
2879
  c.onerror = function(b, c, h) {
2801
2880
  d && d(b, c, h);
2802
2881
  a({message:b, fileName:c, line:h});
@@ -2893,11 +2972,11 @@ goog.debug.normalizeErrorObject = function(a) {
2893
2972
  c = "Not available", e = !0
2894
2973
  }
2895
2974
  try {
2896
- d = a.fileName || a.filename || a.sourceURL || b
2975
+ d = a.fileName || a.filename || a.sourceURL || goog.global.$googDebugFname || b
2897
2976
  }catch(g) {
2898
2977
  d = "Not available", e = !0
2899
2978
  }
2900
- return e || !a.lineNumber || !a.fileName || !a.stack ? {message:a.message, name:a.name, lineNumber:c, fileName:d, stack:a.stack || "Not available"} : a
2979
+ return!e && a.lineNumber && a.fileName && a.stack ? a : {message:a.message, name:a.name, lineNumber:c, fileName:d, stack:a.stack || "Not available"}
2901
2980
  };
2902
2981
  goog.debug.enhanceError = function(a, b) {
2903
2982
  var c = "string" == typeof a ? Error(a) : a;
@@ -3152,11 +3231,14 @@ goog.debug.Logger.prototype.getName = function() {
3152
3231
  return this.name_
3153
3232
  };
3154
3233
  goog.debug.Logger.prototype.addHandler = function(a) {
3155
- goog.debug.Logger.ENABLE_HIERARCHY ? (this.handlers_ || (this.handlers_ = []), this.handlers_.push(a)) : (goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootHandlers_.push(a))
3234
+ goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? (this.handlers_ || (this.handlers_ = []), this.handlers_.push(a)) : (goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootHandlers_.push(a)))
3156
3235
  };
3157
3236
  goog.debug.Logger.prototype.removeHandler = function(a) {
3158
- var b = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
3159
- return!!b && goog.array.remove(b, a)
3237
+ if(goog.debug.LOGGING_ENABLED) {
3238
+ var b = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
3239
+ return!!b && goog.array.remove(b, a)
3240
+ }
3241
+ return!1
3160
3242
  };
3161
3243
  goog.debug.Logger.prototype.getParent = function() {
3162
3244
  return this.parent_
@@ -3166,12 +3248,15 @@ goog.debug.Logger.prototype.getChildren = function() {
3166
3248
  return this.children_
3167
3249
  };
3168
3250
  goog.debug.Logger.prototype.setLevel = function(a) {
3169
- goog.debug.Logger.ENABLE_HIERARCHY ? this.level_ = a : (goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootLevel_ = a)
3251
+ goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? this.level_ = a : (goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootLevel_ = a))
3170
3252
  };
3171
3253
  goog.debug.Logger.prototype.getLevel = function() {
3172
- return this.level_
3254
+ return goog.debug.LOGGING_ENABLED ? this.level_ : goog.debug.Logger.Level.OFF
3173
3255
  };
3174
3256
  goog.debug.Logger.prototype.getEffectiveLevel = function() {
3257
+ if(!goog.debug.LOGGING_ENABLED) {
3258
+ return goog.debug.Logger.Level.OFF
3259
+ }
3175
3260
  if(!goog.debug.Logger.ENABLE_HIERARCHY) {
3176
3261
  return goog.debug.Logger.rootLevel_
3177
3262
  }
@@ -3185,10 +3270,10 @@ goog.debug.Logger.prototype.getEffectiveLevel = function() {
3185
3270
  return null
3186
3271
  };
3187
3272
  goog.debug.Logger.prototype.isLoggable = function(a) {
3188
- return a.value >= this.getEffectiveLevel().value
3273
+ return goog.debug.LOGGING_ENABLED && a.value >= this.getEffectiveLevel().value
3189
3274
  };
3190
3275
  goog.debug.Logger.prototype.log = function(a, b, c) {
3191
- this.isLoggable(a) && this.doLogRecord_(this.getLogRecord(a, b, c))
3276
+ goog.debug.LOGGING_ENABLED && this.isLoggable(a) && this.doLogRecord_(this.getLogRecord(a, b, c))
3192
3277
  };
3193
3278
  goog.debug.Logger.prototype.getLogRecord = function(a, b, c) {
3194
3279
  var d = goog.debug.LogBuffer.isBufferingEnabled() ? goog.debug.LogBuffer.getInstance().addRecord(a, b, this.name_) : new goog.debug.LogRecord(a, String(b), this.name_);
@@ -3196,31 +3281,31 @@ goog.debug.Logger.prototype.getLogRecord = function(a, b, c) {
3196
3281
  return d
3197
3282
  };
3198
3283
  goog.debug.Logger.prototype.shout = function(a, b) {
3199
- this.log(goog.debug.Logger.Level.SHOUT, a, b)
3284
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SHOUT, a, b)
3200
3285
  };
3201
3286
  goog.debug.Logger.prototype.severe = function(a, b) {
3202
- this.log(goog.debug.Logger.Level.SEVERE, a, b)
3287
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SEVERE, a, b)
3203
3288
  };
3204
3289
  goog.debug.Logger.prototype.warning = function(a, b) {
3205
- this.log(goog.debug.Logger.Level.WARNING, a, b)
3290
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.WARNING, a, b)
3206
3291
  };
3207
3292
  goog.debug.Logger.prototype.info = function(a, b) {
3208
- this.log(goog.debug.Logger.Level.INFO, a, b)
3293
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.INFO, a, b)
3209
3294
  };
3210
3295
  goog.debug.Logger.prototype.config = function(a, b) {
3211
- this.log(goog.debug.Logger.Level.CONFIG, a, b)
3296
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.CONFIG, a, b)
3212
3297
  };
3213
3298
  goog.debug.Logger.prototype.fine = function(a, b) {
3214
- this.log(goog.debug.Logger.Level.FINE, a, b)
3299
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINE, a, b)
3215
3300
  };
3216
3301
  goog.debug.Logger.prototype.finer = function(a, b) {
3217
- this.log(goog.debug.Logger.Level.FINER, a, b)
3302
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINER, a, b)
3218
3303
  };
3219
3304
  goog.debug.Logger.prototype.finest = function(a, b) {
3220
- this.log(goog.debug.Logger.Level.FINEST, a, b)
3305
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINEST, a, b)
3221
3306
  };
3222
3307
  goog.debug.Logger.prototype.logRecord = function(a) {
3223
- this.isLoggable(a.getLevel()) && this.doLogRecord_(a)
3308
+ goog.debug.LOGGING_ENABLED && this.isLoggable(a.getLevel()) && this.doLogRecord_(a)
3224
3309
  };
3225
3310
  goog.debug.Logger.prototype.doLogRecord_ = function(a) {
3226
3311
  goog.debug.Logger.logToProfilers("log:" + a.getMessage());
@@ -3279,7 +3364,8 @@ goog.debug.LogManager.createLogger_ = function(a) {
3279
3364
  return goog.debug.LogManager.loggers_[a] = b
3280
3365
  };
3281
3366
  goog.dom = {};
3282
- goog.dom.BrowserFeature = {CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE || goog.userAgent.isDocumentMode(9), CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentMode(9) || goog.userAgent.GECKO && goog.userAgent.isVersion("1.9.1"), CAN_USE_INNER_TEXT:goog.userAgent.IE && !goog.userAgent.isVersion("9"), CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT, INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE};
3367
+ goog.dom.BrowserFeature = {CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9), CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(9) || goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9.1"), CAN_USE_INNER_TEXT:goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"), CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT,
3368
+ INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE};
3283
3369
  goog.dom.TagName = {A:"A", ABBR:"ABBR", ACRONYM:"ACRONYM", ADDRESS:"ADDRESS", APPLET:"APPLET", AREA:"AREA", ARTICLE:"ARTICLE", ASIDE:"ASIDE", AUDIO:"AUDIO", B:"B", BASE:"BASE", BASEFONT:"BASEFONT", BDI:"BDI", BDO:"BDO", BIG:"BIG", BLOCKQUOTE:"BLOCKQUOTE", BODY:"BODY", BR:"BR", BUTTON:"BUTTON", CANVAS:"CANVAS", CAPTION:"CAPTION", CENTER:"CENTER", CITE:"CITE", CODE:"CODE", COL:"COL", COLGROUP:"COLGROUP", COMMAND:"COMMAND", DATA:"DATA", DATALIST:"DATALIST", DD:"DD", DEL:"DEL", DETAILS:"DETAILS", DFN:"DFN",
3284
3370
  DIALOG:"DIALOG", DIR:"DIR", DIV:"DIV", DL:"DL", DT:"DT", EM:"EM", EMBED:"EMBED", FIELDSET:"FIELDSET", FIGCAPTION:"FIGCAPTION", FIGURE:"FIGURE", FONT:"FONT", FOOTER:"FOOTER", FORM:"FORM", FRAME:"FRAME", FRAMESET:"FRAMESET", H1:"H1", H2:"H2", H3:"H3", H4:"H4", H5:"H5", H6:"H6", HEAD:"HEAD", HEADER:"HEADER", HGROUP:"HGROUP", HR:"HR", HTML:"HTML", I:"I", IFRAME:"IFRAME", IMG:"IMG", INPUT:"INPUT", INS:"INS", ISINDEX:"ISINDEX", KBD:"KBD", KEYGEN:"KEYGEN", LABEL:"LABEL", LEGEND:"LEGEND", LI:"LI", LINK:"LINK",
3285
3371
  MAP:"MAP", MARK:"MARK", MATH:"MATH", MENU:"MENU", META:"META", METER:"METER", NAV:"NAV", NOFRAMES:"NOFRAMES", NOSCRIPT:"NOSCRIPT", OBJECT:"OBJECT", OL:"OL", OPTGROUP:"OPTGROUP", OPTION:"OPTION", OUTPUT:"OUTPUT", P:"P", PARAM:"PARAM", PRE:"PRE", PROGRESS:"PROGRESS", Q:"Q", RP:"RP", RT:"RT", RUBY:"RUBY", S:"S", SAMP:"SAMP", SCRIPT:"SCRIPT", SECTION:"SECTION", SELECT:"SELECT", SMALL:"SMALL", SOURCE:"SOURCE", SPAN:"SPAN", STRIKE:"STRIKE", STRONG:"STRONG", STYLE:"STYLE", SUB:"SUB", SUMMARY:"SUMMARY",
@@ -3295,12 +3381,12 @@ goog.dom.classes.get = function(a) {
3295
3381
  goog.dom.classes.add = function(a, b) {
3296
3382
  var c = goog.dom.classes.get(a), d = goog.array.slice(arguments, 1), e = c.length + d.length;
3297
3383
  goog.dom.classes.add_(c, d);
3298
- a.className = c.join(" ");
3384
+ goog.dom.classes.set(a, c.join(" "));
3299
3385
  return c.length == e
3300
3386
  };
3301
3387
  goog.dom.classes.remove = function(a, b) {
3302
3388
  var c = goog.dom.classes.get(a), d = goog.array.slice(arguments, 1), e = goog.dom.classes.getDifference_(c, d);
3303
- a.className = e.join(" ");
3389
+ goog.dom.classes.set(a, e.join(" "));
3304
3390
  return e.length == c.length - d.length
3305
3391
  };
3306
3392
  goog.dom.classes.add_ = function(a, b) {
@@ -3317,14 +3403,14 @@ goog.dom.classes.swap = function(a, b, c) {
3317
3403
  for(var d = goog.dom.classes.get(a), e = !1, f = 0;f < d.length;f++) {
3318
3404
  d[f] == b && (goog.array.splice(d, f--, 1), e = !0)
3319
3405
  }
3320
- e && (d.push(c), a.className = d.join(" "));
3406
+ e && (d.push(c), goog.dom.classes.set(a, d.join(" ")));
3321
3407
  return e
3322
3408
  };
3323
3409
  goog.dom.classes.addRemove = function(a, b, c) {
3324
3410
  var d = goog.dom.classes.get(a);
3325
3411
  goog.isString(b) ? goog.array.remove(d, b) : goog.isArray(b) && (d = goog.dom.classes.getDifference_(d, b));
3326
3412
  goog.isString(c) && !goog.array.contains(d, c) ? d.push(c) : goog.isArray(c) && goog.dom.classes.add_(d, c);
3327
- a.className = d.join(" ")
3413
+ goog.dom.classes.set(a, d.join(" "))
3328
3414
  };
3329
3415
  goog.dom.classes.has = function(a, b) {
3330
3416
  return goog.array.contains(goog.dom.classes.get(a), b)
@@ -3397,7 +3483,7 @@ goog.math.longestCommonSubsequence = function(a, b, c, d) {
3397
3483
  g[0][k] = 0
3398
3484
  }
3399
3485
  for(h = 1;h <= e;h++) {
3400
- for(k = 1;k <= e;k++) {
3486
+ for(k = 1;k <= f;k++) {
3401
3487
  c(a[h - 1], b[k - 1]) ? g[h][k] = g[h - 1][k - 1] + 1 : g[h][k] = Math.max(g[h - 1][k], g[h][k - 1])
3402
3488
  }
3403
3489
  }
@@ -3430,6 +3516,14 @@ goog.math.isInt = function(a) {
3430
3516
  goog.math.isFiniteNumber = function(a) {
3431
3517
  return isFinite(a) && !isNaN(a)
3432
3518
  };
3519
+ goog.math.safeFloor = function(a, b) {
3520
+ goog.asserts.assert(!goog.isDef(b) || 0 < b);
3521
+ return Math.floor(a + (b || 2E-15))
3522
+ };
3523
+ goog.math.safeCeil = function(a, b) {
3524
+ goog.asserts.assert(!goog.isDef(b) || 0 < b);
3525
+ return Math.ceil(a - (b || 2E-15))
3526
+ };
3433
3527
  goog.math.Coordinate = function(a, b) {
3434
3528
  this.x = goog.isDef(a) ? a : 0;
3435
3529
  this.y = goog.isDef(b) ? b : 0
@@ -3441,7 +3535,7 @@ goog.DEBUG && (goog.math.Coordinate.prototype.toString = function() {
3441
3535
  return"(" + this.x + ", " + this.y + ")"
3442
3536
  });
3443
3537
  goog.math.Coordinate.equals = function(a, b) {
3444
- return a == b ? !0 : !a || !b ? !1 : a.x == b.x && a.y == b.y
3538
+ return a == b ? !0 : a && b ? a.x == b.x && a.y == b.y : !1
3445
3539
  };
3446
3540
  goog.math.Coordinate.distance = function(a, b) {
3447
3541
  var c = a.x - b.x, d = a.y - b.y;
@@ -3463,12 +3557,37 @@ goog.math.Coordinate.difference = function(a, b) {
3463
3557
  goog.math.Coordinate.sum = function(a, b) {
3464
3558
  return new goog.math.Coordinate(a.x + b.x, a.y + b.y)
3465
3559
  };
3560
+ goog.math.Coordinate.prototype.ceil = function() {
3561
+ this.x = Math.ceil(this.x);
3562
+ this.y = Math.ceil(this.y);
3563
+ return this
3564
+ };
3565
+ goog.math.Coordinate.prototype.floor = function() {
3566
+ this.x = Math.floor(this.x);
3567
+ this.y = Math.floor(this.y);
3568
+ return this
3569
+ };
3570
+ goog.math.Coordinate.prototype.round = function() {
3571
+ this.x = Math.round(this.x);
3572
+ this.y = Math.round(this.y);
3573
+ return this
3574
+ };
3575
+ goog.math.Coordinate.prototype.translate = function(a, b) {
3576
+ a instanceof goog.math.Coordinate ? (this.x += a.x, this.y += a.y) : (this.x += a, goog.isNumber(b) && (this.y += b));
3577
+ return this
3578
+ };
3579
+ goog.math.Coordinate.prototype.scale = function(a, b) {
3580
+ var c = goog.isNumber(b) ? b : a;
3581
+ this.x *= a;
3582
+ this.y *= c;
3583
+ return this
3584
+ };
3466
3585
  goog.math.Size = function(a, b) {
3467
3586
  this.width = a;
3468
3587
  this.height = b
3469
3588
  };
3470
3589
  goog.math.Size.equals = function(a, b) {
3471
- return a == b ? !0 : !a || !b ? !1 : a.width == b.width && a.height == b.height
3590
+ return a == b ? !0 : a && b ? a.width == b.width && a.height == b.height : !1
3472
3591
  };
3473
3592
  goog.math.Size.prototype.clone = function() {
3474
3593
  return new goog.math.Size(this.width, this.height)
@@ -3512,9 +3631,10 @@ goog.math.Size.prototype.round = function() {
3512
3631
  this.height = Math.round(this.height);
3513
3632
  return this
3514
3633
  };
3515
- goog.math.Size.prototype.scale = function(a) {
3634
+ goog.math.Size.prototype.scale = function(a, b) {
3635
+ var c = goog.isNumber(b) ? b : a;
3516
3636
  this.width *= a;
3517
- this.height *= a;
3637
+ this.height *= c;
3518
3638
  return this
3519
3639
  };
3520
3640
  goog.math.Size.prototype.scaleToFit = function(a) {
@@ -3620,7 +3740,7 @@ goog.dom.getDocumentScroll = function() {
3620
3740
  goog.dom.getDocumentScroll_ = function(a) {
3621
3741
  var b = goog.dom.getDocumentScrollElement_(a);
3622
3742
  a = goog.dom.getWindow_(a);
3623
- return new goog.math.Coordinate(a.pageXOffset || b.scrollLeft, a.pageYOffset || b.scrollTop)
3743
+ return goog.userAgent.IE && goog.userAgent.isVersionOrHigher("10") && a.pageYOffset != b.scrollTop ? new goog.math.Coordinate(b.scrollLeft, b.scrollTop) : new goog.math.Coordinate(a.pageXOffset || b.scrollLeft, a.pageYOffset || b.scrollTop)
3624
3744
  };
3625
3745
  goog.dom.getDocumentScrollElement = function() {
3626
3746
  return goog.dom.getDocumentScrollElement_(document)
@@ -3671,7 +3791,7 @@ goog.dom.createElement = function(a) {
3671
3791
  return document.createElement(a)
3672
3792
  };
3673
3793
  goog.dom.createTextNode = function(a) {
3674
- return document.createTextNode(a)
3794
+ return document.createTextNode(String(a))
3675
3795
  };
3676
3796
  goog.dom.createTable = function(a, b, c) {
3677
3797
  return goog.dom.createTable_(document, a, b, !!c)
@@ -3868,7 +3988,7 @@ goog.dom.isWindow = function(a) {
3868
3988
  return goog.isObject(a) && a.window == a
3869
3989
  };
3870
3990
  goog.dom.getParentElement = function(a) {
3871
- if(goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY) {
3991
+ if(goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY && !(goog.userAgent.IE && goog.userAgent.isVersionOrHigher("9") && !goog.userAgent.isVersionOrHigher("10") && goog.global.SVGElement && a instanceof goog.global.SVGElement)) {
3872
3992
  return a.parentElement
3873
3993
  }
3874
3994
  a = a.parentNode;
@@ -3893,7 +4013,7 @@ goog.dom.compareNodeOrder = function(a, b) {
3893
4013
  if(a.compareDocumentPosition) {
3894
4014
  return a.compareDocumentPosition(b) & 2 ? 1 : -1
3895
4015
  }
3896
- if(goog.userAgent.IE && !goog.userAgent.isDocumentMode(9)) {
4016
+ if(goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)) {
3897
4017
  if(a.nodeType == goog.dom.NodeType.DOCUMENT) {
3898
4018
  return-1
3899
4019
  }
@@ -3938,13 +4058,12 @@ goog.dom.compareSiblingOrder_ = function(a, b) {
3938
4058
  };
3939
4059
  goog.dom.findCommonAncestor = function(a) {
3940
4060
  var b, c = arguments.length;
3941
- if(c) {
3942
- if(1 == c) {
3943
- return arguments[0]
3944
- }
3945
- }else {
4061
+ if(!c) {
3946
4062
  return null
3947
4063
  }
4064
+ if(1 == c) {
4065
+ return arguments[0]
4066
+ }
3948
4067
  var d = [], e = Infinity;
3949
4068
  for(b = 0;b < c;b++) {
3950
4069
  for(var f = [], g = arguments[b];g;) {
@@ -3985,7 +4104,7 @@ goog.dom.setTextContent = function(a, b) {
3985
4104
  }else {
3986
4105
  goog.dom.removeChildren(a);
3987
4106
  var c = goog.dom.getOwnerDocument(a);
3988
- a.appendChild(c.createTextNode(b))
4107
+ a.appendChild(c.createTextNode(String(b)))
3989
4108
  }
3990
4109
  }
3991
4110
  };
@@ -4074,7 +4193,7 @@ goog.dom.getNodeTextOffset = function(a, b) {
4074
4193
  };
4075
4194
  goog.dom.getNodeAtOffset = function(a, b, c) {
4076
4195
  a = [a];
4077
- for(var d = 0, e;0 < a.length && d < b;) {
4196
+ for(var d = 0, e = null;0 < a.length && d < b;) {
4078
4197
  if(e = a.pop(), !(e.nodeName in goog.dom.TAGS_TO_IGNORE_)) {
4079
4198
  if(e.nodeType == goog.dom.NodeType.TEXT) {
4080
4199
  var f = e.nodeValue.replace(/(\r\n|\r|\n)/g, "").replace(/ +/g, " "), d = d + f.length
@@ -4173,7 +4292,7 @@ goog.dom.DomHelper.prototype.createElement = function(a) {
4173
4292
  return this.document_.createElement(a)
4174
4293
  };
4175
4294
  goog.dom.DomHelper.prototype.createTextNode = function(a) {
4176
- return this.document_.createTextNode(a)
4295
+ return this.document_.createTextNode(String(a))
4177
4296
  };
4178
4297
  goog.dom.DomHelper.prototype.createTable = function(a, b, c) {
4179
4298
  return goog.dom.createTable_(this.document_, a, b, !!c)
@@ -4240,6 +4359,13 @@ goog.dom.DomHelper.prototype.isNodeList = goog.dom.isNodeList;
4240
4359
  goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass = goog.dom.getAncestorByTagNameAndClass;
4241
4360
  goog.dom.DomHelper.prototype.getAncestorByClass = goog.dom.getAncestorByClass;
4242
4361
  goog.dom.DomHelper.prototype.getAncestor = goog.dom.getAncestor;
4362
+ goog.dom.vendor = {};
4363
+ goog.dom.vendor.getVendorJsPrefix = function() {
4364
+ return goog.userAgent.WEBKIT ? "Webkit" : goog.userAgent.GECKO ? "Moz" : goog.userAgent.IE ? "ms" : goog.userAgent.OPERA ? "O" : null
4365
+ };
4366
+ goog.dom.vendor.getVendorPrefix = function() {
4367
+ return goog.userAgent.WEBKIT ? "-webkit" : goog.userAgent.GECKO ? "-moz" : goog.userAgent.IE ? "-ms" : goog.userAgent.OPERA ? "-o" : null
4368
+ };
4243
4369
  goog.math.Box = function(a, b, c, d) {
4244
4370
  this.top = a;
4245
4371
  this.right = b;
@@ -4276,10 +4402,10 @@ goog.math.Box.prototype.expandToInclude = function(a) {
4276
4402
  this.bottom = Math.max(this.bottom, a.bottom)
4277
4403
  };
4278
4404
  goog.math.Box.equals = function(a, b) {
4279
- return a == b ? !0 : !a || !b ? !1 : a.top == b.top && a.right == b.right && a.bottom == b.bottom && a.left == b.left
4405
+ return a == b ? !0 : a && b ? a.top == b.top && a.right == b.right && a.bottom == b.bottom && a.left == b.left : !1
4280
4406
  };
4281
4407
  goog.math.Box.contains = function(a, b) {
4282
- return!a || !b ? !1 : b instanceof goog.math.Box ? b.left >= a.left && b.right <= a.right && b.top >= a.top && b.bottom <= a.bottom : b.x >= a.left && b.x <= a.right && b.y >= a.top && b.y <= a.bottom
4408
+ return a && b ? b instanceof goog.math.Box ? b.left >= a.left && b.right <= a.right && b.top >= a.top && b.bottom <= a.bottom : b.x >= a.left && b.x <= a.right && b.y >= a.top && b.y <= a.bottom : !1
4283
4409
  };
4284
4410
  goog.math.Box.relativePositionX = function(a, b) {
4285
4411
  return b.x < a.left ? b.x - a.left : b.x > a.right ? b.x - a.right : 0
@@ -4297,6 +4423,39 @@ goog.math.Box.intersects = function(a, b) {
4297
4423
  goog.math.Box.intersectsWithPadding = function(a, b, c) {
4298
4424
  return a.left <= b.right + c && b.left <= a.right + c && a.top <= b.bottom + c && b.top <= a.bottom + c
4299
4425
  };
4426
+ goog.math.Box.prototype.ceil = function() {
4427
+ this.top = Math.ceil(this.top);
4428
+ this.right = Math.ceil(this.right);
4429
+ this.bottom = Math.ceil(this.bottom);
4430
+ this.left = Math.ceil(this.left);
4431
+ return this
4432
+ };
4433
+ goog.math.Box.prototype.floor = function() {
4434
+ this.top = Math.floor(this.top);
4435
+ this.right = Math.floor(this.right);
4436
+ this.bottom = Math.floor(this.bottom);
4437
+ this.left = Math.floor(this.left);
4438
+ return this
4439
+ };
4440
+ goog.math.Box.prototype.round = function() {
4441
+ this.top = Math.round(this.top);
4442
+ this.right = Math.round(this.right);
4443
+ this.bottom = Math.round(this.bottom);
4444
+ this.left = Math.round(this.left);
4445
+ return this
4446
+ };
4447
+ goog.math.Box.prototype.translate = function(a, b) {
4448
+ a instanceof goog.math.Coordinate ? (this.left += a.x, this.right += a.x, this.top += a.y, this.bottom += a.y) : (this.left += a, this.right += a, goog.isNumber(b) && (this.top += b, this.bottom += b));
4449
+ return this
4450
+ };
4451
+ goog.math.Box.prototype.scale = function(a, b) {
4452
+ var c = goog.isNumber(b) ? b : a;
4453
+ this.left *= a;
4454
+ this.right *= a;
4455
+ this.top *= c;
4456
+ this.bottom *= c;
4457
+ return this
4458
+ };
4300
4459
  goog.math.Rect = function(a, b, c, d) {
4301
4460
  this.left = a;
4302
4461
  this.top = b;
@@ -4316,7 +4475,7 @@ goog.DEBUG && (goog.math.Rect.prototype.toString = function() {
4316
4475
  return"(" + this.left + ", " + this.top + " - " + this.width + "w x " + this.height + "h)"
4317
4476
  });
4318
4477
  goog.math.Rect.equals = function(a, b) {
4319
- return a == b ? !0 : !a || !b ? !1 : a.left == b.left && a.width == b.width && a.top == b.top && a.height == b.height
4478
+ return a == b ? !0 : a && b ? a.left == b.left && a.width == b.width && a.top == b.top && a.height == b.height : !1
4320
4479
  };
4321
4480
  goog.math.Rect.prototype.intersection = function(a) {
4322
4481
  var b = Math.max(this.left, a.left), c = Math.min(this.left + this.width, a.left + a.width);
@@ -4378,18 +4537,84 @@ goog.math.Rect.boundingRect = function(a, b) {
4378
4537
  goog.math.Rect.prototype.contains = function(a) {
4379
4538
  return a instanceof goog.math.Rect ? this.left <= a.left && this.left + this.width >= a.left + a.width && this.top <= a.top && this.top + this.height >= a.top + a.height : a.x >= this.left && a.x <= this.left + this.width && a.y >= this.top && a.y <= this.top + this.height
4380
4539
  };
4540
+ goog.math.Rect.prototype.squaredDistance = function(a) {
4541
+ var b = a.x < this.left ? this.left - a.x : Math.max(a.x - (this.left + this.width), 0);
4542
+ a = a.y < this.top ? this.top - a.y : Math.max(a.y - (this.top + this.height), 0);
4543
+ return b * b + a * a
4544
+ };
4545
+ goog.math.Rect.prototype.distance = function(a) {
4546
+ return Math.sqrt(this.squaredDistance(a))
4547
+ };
4381
4548
  goog.math.Rect.prototype.getSize = function() {
4382
4549
  return new goog.math.Size(this.width, this.height)
4383
4550
  };
4551
+ goog.math.Rect.prototype.getTopLeft = function() {
4552
+ return new goog.math.Coordinate(this.left, this.top)
4553
+ };
4554
+ goog.math.Rect.prototype.getCenter = function() {
4555
+ return new goog.math.Coordinate(this.left + this.width / 2, this.top + this.height / 2)
4556
+ };
4557
+ goog.math.Rect.prototype.getBottomRight = function() {
4558
+ return new goog.math.Coordinate(this.left + this.width, this.top + this.height)
4559
+ };
4560
+ goog.math.Rect.prototype.ceil = function() {
4561
+ this.left = Math.ceil(this.left);
4562
+ this.top = Math.ceil(this.top);
4563
+ this.width = Math.ceil(this.width);
4564
+ this.height = Math.ceil(this.height);
4565
+ return this
4566
+ };
4567
+ goog.math.Rect.prototype.floor = function() {
4568
+ this.left = Math.floor(this.left);
4569
+ this.top = Math.floor(this.top);
4570
+ this.width = Math.floor(this.width);
4571
+ this.height = Math.floor(this.height);
4572
+ return this
4573
+ };
4574
+ goog.math.Rect.prototype.round = function() {
4575
+ this.left = Math.round(this.left);
4576
+ this.top = Math.round(this.top);
4577
+ this.width = Math.round(this.width);
4578
+ this.height = Math.round(this.height);
4579
+ return this
4580
+ };
4581
+ goog.math.Rect.prototype.translate = function(a, b) {
4582
+ a instanceof goog.math.Coordinate ? (this.left += a.x, this.top += a.y) : (this.left += a, goog.isNumber(b) && (this.top += b));
4583
+ return this
4584
+ };
4585
+ goog.math.Rect.prototype.scale = function(a, b) {
4586
+ var c = goog.isNumber(b) ? b : a;
4587
+ this.left *= a;
4588
+ this.width *= a;
4589
+ this.top *= c;
4590
+ this.height *= c;
4591
+ return this
4592
+ };
4384
4593
  goog.style = {};
4594
+ goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS = !1;
4385
4595
  goog.style.setStyle = function(a, b, c) {
4386
4596
  goog.isString(b) ? goog.style.setStyle_(a, c, b) : goog.object.forEach(b, goog.partial(goog.style.setStyle_, a))
4387
4597
  };
4388
4598
  goog.style.setStyle_ = function(a, b, c) {
4389
- a.style[goog.string.toCamelCase(c)] = b
4599
+ (c = goog.style.getVendorJsStyleName_(a, c)) && (a.style[c] = b)
4600
+ };
4601
+ goog.style.getVendorJsStyleName_ = function(a, b) {
4602
+ var c = goog.string.toCamelCase(b);
4603
+ if(void 0 === a.style[c]) {
4604
+ var d = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(b);
4605
+ if(void 0 !== a.style[d]) {
4606
+ return d
4607
+ }
4608
+ }
4609
+ return c
4610
+ };
4611
+ goog.style.getVendorStyleName_ = function(a, b) {
4612
+ var c = goog.string.toCamelCase(b);
4613
+ return void 0 === a.style[c] && (c = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(b), void 0 !== a.style[c]) ? goog.dom.vendor.getVendorPrefix() + "-" + b : b
4390
4614
  };
4391
4615
  goog.style.getStyle = function(a, b) {
4392
- return a.style[goog.string.toCamelCase(b)] || ""
4616
+ var c = a.style[goog.string.toCamelCase(b)];
4617
+ return"undefined" !== typeof c ? c : a.style[goog.style.getVendorJsStyleName_(a, b)] || ""
4393
4618
  };
4394
4619
  goog.style.getComputedStyle = function(a, b) {
4395
4620
  var c = goog.dom.getOwnerDocument(a);
@@ -4423,7 +4648,7 @@ goog.style.getComputedCursor = function(a) {
4423
4648
  return goog.style.getStyle_(a, "cursor")
4424
4649
  };
4425
4650
  goog.style.setPosition = function(a, b, c) {
4426
- var d, e = goog.userAgent.GECKO && (goog.userAgent.MAC || goog.userAgent.X11) && goog.userAgent.isVersion("1.9");
4651
+ var d, e = goog.userAgent.GECKO && (goog.userAgent.MAC || goog.userAgent.X11) && goog.userAgent.isVersionOrHigher("1.9");
4427
4652
  b instanceof goog.math.Coordinate ? (d = b.x, b = b.y) : (d = b, b = c);
4428
4653
  a.style.left = goog.style.getPixelStyleValue_(d, e);
4429
4654
  a.style.top = goog.style.getPixelStyleValue_(b, e)
@@ -4433,7 +4658,7 @@ goog.style.getPosition = function(a) {
4433
4658
  };
4434
4659
  goog.style.getClientViewportElement = function(a) {
4435
4660
  a = a ? goog.dom.getOwnerDocument(a) : goog.dom.getDocument();
4436
- return goog.userAgent.IE && !goog.userAgent.isDocumentMode(9) && !goog.dom.getDomHelper(a).isCss1CompatMode() ? a.body : a.documentElement
4661
+ return!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9) || goog.dom.getDomHelper(a).isCss1CompatMode() ? a.documentElement : a.body
4437
4662
  };
4438
4663
  goog.style.getViewportPageOffset = function(a) {
4439
4664
  var b = a.body;
@@ -4441,12 +4666,17 @@ goog.style.getViewportPageOffset = function(a) {
4441
4666
  return new goog.math.Coordinate(b.scrollLeft || a.scrollLeft, b.scrollTop || a.scrollTop)
4442
4667
  };
4443
4668
  goog.style.getBoundingClientRect_ = function(a) {
4444
- var b = a.getBoundingClientRect();
4669
+ var b;
4670
+ try {
4671
+ b = a.getBoundingClientRect()
4672
+ }catch(c) {
4673
+ return{left:0, top:0, right:0, bottom:0}
4674
+ }
4445
4675
  goog.userAgent.IE && (a = a.ownerDocument, b.left -= a.documentElement.clientLeft + a.body.clientLeft, b.top -= a.documentElement.clientTop + a.body.clientTop);
4446
4676
  return b
4447
4677
  };
4448
4678
  goog.style.getOffsetParent = function(a) {
4449
- if(goog.userAgent.IE && !goog.userAgent.isDocumentMode(8)) {
4679
+ if(goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(8)) {
4450
4680
  return a.offsetParent
4451
4681
  }
4452
4682
  var b = goog.dom.getOwnerDocument(a), c = goog.style.getStyle_(a, "position"), d = "fixed" == c || "absolute" == c;
@@ -4459,7 +4689,7 @@ goog.style.getOffsetParent = function(a) {
4459
4689
  };
4460
4690
  goog.style.getVisibleRectForElement = function(a) {
4461
4691
  for(var b = new goog.math.Box(0, Infinity, Infinity, 0), c = goog.dom.getDomHelper(a), d = c.getDocument().body, e = c.getDocument().documentElement, f = c.getDocumentScrollElement();a = goog.style.getOffsetParent(a);) {
4462
- if((!goog.userAgent.IE || 0 != a.clientWidth) && (!goog.userAgent.WEBKIT || 0 != a.clientHeight || a != d) && a != d && a != e && "visible" != goog.style.getStyle_(a, "overflow")) {
4692
+ if(!(goog.userAgent.IE && 0 == a.clientWidth || goog.userAgent.WEBKIT && 0 == a.clientHeight && a == d || a == d || a == e || "visible" == goog.style.getStyle_(a, "overflow"))) {
4463
4693
  var g = goog.style.getPageOffset(a), h = goog.style.getClientLeftTop(a);
4464
4694
  g.x += h.x;
4465
4695
  g.y += h.y;
@@ -4492,7 +4722,7 @@ goog.style.scrollIntoContainerView = function(a, b, c) {
4492
4722
  b.scrollTop = a.y
4493
4723
  };
4494
4724
  goog.style.getClientLeftTop = function(a) {
4495
- if(goog.userAgent.GECKO && !goog.userAgent.isVersion("1.9")) {
4725
+ if(goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher("1.9")) {
4496
4726
  var b = parseFloat(goog.style.getComputedStyle(a, "borderLeftWidth"));
4497
4727
  if(goog.style.isRightToLeft(a)) {
4498
4728
  var c = a.offsetWidth - a.clientWidth - b - parseFloat(goog.style.getComputedStyle(a, "borderRightWidth")), b = b + c
@@ -4504,11 +4734,11 @@ goog.style.getClientLeftTop = function(a) {
4504
4734
  goog.style.getPageOffset = function(a) {
4505
4735
  var b, c = goog.dom.getOwnerDocument(a), d = goog.style.getStyle_(a, "position");
4506
4736
  goog.asserts.assertObject(a, "Parameter is required");
4507
- var e = goog.userAgent.GECKO && c.getBoxObjectFor && !a.getBoundingClientRect && "absolute" == d && (b = c.getBoxObjectFor(a)) && (0 > b.screenX || 0 > b.screenY), f = new goog.math.Coordinate(0, 0), g = goog.style.getClientViewportElement(c);
4737
+ var e = !goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS && goog.userAgent.GECKO && c.getBoxObjectFor && !a.getBoundingClientRect && "absolute" == d && (b = c.getBoxObjectFor(a)) && (0 > b.screenX || 0 > b.screenY), f = new goog.math.Coordinate(0, 0), g = goog.style.getClientViewportElement(c);
4508
4738
  if(a == g) {
4509
4739
  return f
4510
4740
  }
4511
- if(a.getBoundingClientRect) {
4741
+ if(goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS || a.getBoundingClientRect) {
4512
4742
  b = goog.style.getBoundingClientRect_(a), a = goog.dom.getDomHelper(c).getDocumentScroll(), f.x = b.left + a.x, f.y = b.top + a.y
4513
4743
  }else {
4514
4744
  if(c.getBoxObjectFor && !e) {
@@ -4530,9 +4760,7 @@ goog.style.getPageOffset = function(a) {
4530
4760
  f.y -= c.body.offsetTop
4531
4761
  }
4532
4762
  for(b = a;(b = goog.style.getOffsetParent(b)) && b != c.body && b != g;) {
4533
- if(f.x -= b.scrollLeft, !goog.userAgent.OPERA || "TR" != b.tagName) {
4534
- f.y -= b.scrollTop
4535
- }
4763
+ f.x -= b.scrollLeft, goog.userAgent.OPERA && "TR" == b.tagName || (f.y -= b.scrollTop)
4536
4764
  }
4537
4765
  }
4538
4766
  }
@@ -4547,7 +4775,7 @@ goog.style.getPageOffsetTop = function(a) {
4547
4775
  goog.style.getFramedPageOffset = function(a, b) {
4548
4776
  var c = new goog.math.Coordinate(0, 0), d = goog.dom.getWindow(goog.dom.getOwnerDocument(a)), e = a;
4549
4777
  do {
4550
- var f = d == b ? goog.style.getPageOffset(e) : goog.style.getClientPosition(e);
4778
+ var f = d == b ? goog.style.getPageOffset(e) : goog.style.getClientPositionForElement_(goog.asserts.assert(e));
4551
4779
  c.x += f.x;
4552
4780
  c.y += f.y
4553
4781
  }while(d && d != b && (e = d.frameElement) && (d = d.parent));
@@ -4567,23 +4795,25 @@ goog.style.getRelativePosition = function(a, b) {
4567
4795
  var c = goog.style.getClientPosition(a), d = goog.style.getClientPosition(b);
4568
4796
  return new goog.math.Coordinate(c.x - d.x, c.y - d.y)
4569
4797
  };
4798
+ goog.style.getClientPositionForElement_ = function(a) {
4799
+ var b;
4800
+ if(goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS || a.getBoundingClientRect) {
4801
+ b = goog.style.getBoundingClientRect_(a), b = new goog.math.Coordinate(b.left, b.top)
4802
+ }else {
4803
+ b = goog.dom.getDomHelper(a).getDocumentScroll();
4804
+ var c = goog.style.getPageOffset(a);
4805
+ b = new goog.math.Coordinate(c.x - b.x, c.y - b.y)
4806
+ }
4807
+ return goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher(12) ? goog.math.Coordinate.sum(b, goog.style.getCssTranslation(a)) : b
4808
+ };
4570
4809
  goog.style.getClientPosition = function(a) {
4571
- var b = new goog.math.Coordinate;
4810
+ goog.asserts.assert(a);
4572
4811
  if(a.nodeType == goog.dom.NodeType.ELEMENT) {
4573
- if(a.getBoundingClientRect) {
4574
- var c = goog.style.getBoundingClientRect_(a);
4575
- b.x = c.left;
4576
- b.y = c.top
4577
- }else {
4578
- var c = goog.dom.getDomHelper(a).getDocumentScroll(), d = goog.style.getPageOffset(a);
4579
- b.x = d.x - c.x;
4580
- b.y = d.y - c.y
4581
- }
4582
- goog.userAgent.GECKO && !goog.userAgent.isVersion(12) && (b = goog.math.Coordinate.sum(b, goog.style.getCssTranslation(a)))
4583
- }else {
4584
- c = goog.isFunction(a.getBrowserEvent), d = a, a.targetTouches ? d = a.targetTouches[0] : c && a.getBrowserEvent().targetTouches && (d = a.getBrowserEvent().targetTouches[0]), b.x = d.clientX, b.y = d.clientY
4812
+ return goog.style.getClientPositionForElement_(a)
4585
4813
  }
4586
- return b
4814
+ var b = goog.isFunction(a.getBrowserEvent), c = a;
4815
+ a.targetTouches ? c = a.targetTouches[0] : b && a.getBrowserEvent().targetTouches && (c = a.getBrowserEvent().targetTouches[0]);
4816
+ return new goog.math.Coordinate(c.clientX, c.clientY)
4587
4817
  };
4588
4818
  goog.style.setPageOffset = function(a, b, c) {
4589
4819
  var d = goog.style.getPageOffset(a);
@@ -4627,7 +4857,7 @@ goog.style.getSize = function(a) {
4627
4857
  };
4628
4858
  goog.style.getSizeWithDisplay_ = function(a) {
4629
4859
  var b = a.offsetWidth, c = a.offsetHeight, d = goog.userAgent.WEBKIT && !b && !c;
4630
- return(!goog.isDef(b) || d) && a.getBoundingClientRect ? (a = goog.style.getBoundingClientRect_(a), new goog.math.Size(a.right - a.left, a.bottom - a.top)) : new goog.math.Size(b, c)
4860
+ return goog.isDef(b) && !d || !a.getBoundingClientRect ? new goog.math.Size(b, c) : (a = goog.style.getBoundingClientRect_(a), new goog.math.Size(a.right - a.left, a.bottom - a.top))
4631
4861
  };
4632
4862
  goog.style.getBounds = function(a) {
4633
4863
  var b = goog.style.getPageOffset(a);
@@ -4652,13 +4882,16 @@ goog.style.setOpacity = function(a, b) {
4652
4882
  };
4653
4883
  goog.style.setTransparentBackgroundImage = function(a, b) {
4654
4884
  var c = a.style;
4655
- goog.userAgent.IE && !goog.userAgent.isVersion("8") ? c.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + b + '", sizingMethod="crop")' : (c.backgroundImage = "url(" + b + ")", c.backgroundPosition = "top left", c.backgroundRepeat = "no-repeat")
4885
+ goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? c.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + b + '", sizingMethod="crop")' : (c.backgroundImage = "url(" + b + ")", c.backgroundPosition = "top left", c.backgroundRepeat = "no-repeat")
4656
4886
  };
4657
4887
  goog.style.clearTransparentBackgroundImage = function(a) {
4658
4888
  a = a.style;
4659
4889
  "filter" in a ? a.filter = "" : a.backgroundImage = "none"
4660
4890
  };
4661
4891
  goog.style.showElement = function(a, b) {
4892
+ goog.style.setElementShown(a, b)
4893
+ };
4894
+ goog.style.setElementShown = function(a, b) {
4662
4895
  a.style.display = b ? "" : "none"
4663
4896
  };
4664
4897
  goog.style.isElementShown = function(a) {
@@ -4685,12 +4918,12 @@ goog.style.setStyles = function(a, b) {
4685
4918
  };
4686
4919
  goog.style.setPreWrap = function(a) {
4687
4920
  a = a.style;
4688
- goog.userAgent.IE && !goog.userAgent.isVersion("8") ? (a.whiteSpace = "pre", a.wordWrap = "break-word") : a.whiteSpace = goog.userAgent.GECKO ? "-moz-pre-wrap" : "pre-wrap"
4921
+ goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? (a.whiteSpace = "pre", a.wordWrap = "break-word") : a.whiteSpace = goog.userAgent.GECKO ? "-moz-pre-wrap" : "pre-wrap"
4689
4922
  };
4690
4923
  goog.style.setInlineBlock = function(a) {
4691
4924
  a = a.style;
4692
4925
  a.position = "relative";
4693
- goog.userAgent.IE && !goog.userAgent.isVersion("8") ? (a.zoom = "1", a.display = "inline") : a.display = goog.userAgent.GECKO ? goog.userAgent.isVersion("1.9a") ? "inline-block" : "-moz-inline-box" : "inline-block"
4926
+ goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? (a.zoom = "1", a.display = "inline") : a.display = goog.userAgent.GECKO ? goog.userAgent.isVersionOrHigher("1.9a") ? "inline-block" : "-moz-inline-box" : "inline-block"
4694
4927
  };
4695
4928
  goog.style.isRightToLeft = function(a) {
4696
4929
  return"rtl" == goog.style.getStyle_(a, "direction")
@@ -4700,7 +4933,7 @@ goog.style.isUnselectable = function(a) {
4700
4933
  return goog.style.unselectableStyle_ ? "none" == a.style[goog.style.unselectableStyle_].toLowerCase() : goog.userAgent.IE || goog.userAgent.OPERA ? "on" == a.getAttribute("unselectable") : !1
4701
4934
  };
4702
4935
  goog.style.setUnselectable = function(a, b, c) {
4703
- c = !c ? a.getElementsByTagName("*") : null;
4936
+ c = c ? null : a.getElementsByTagName("*");
4704
4937
  var d = goog.style.unselectableStyle_;
4705
4938
  if(d) {
4706
4939
  if(b = b ? "none" : "", a.style[d] = b, c) {
@@ -4724,7 +4957,9 @@ goog.style.getBorderBoxSize = function(a) {
4724
4957
  };
4725
4958
  goog.style.setBorderBoxSize = function(a, b) {
4726
4959
  var c = goog.dom.getOwnerDocument(a), d = goog.dom.getDomHelper(c).isCss1CompatMode();
4727
- if(goog.userAgent.IE && (!d || !goog.userAgent.isVersion("8"))) {
4960
+ if(!goog.userAgent.IE || d && goog.userAgent.isVersionOrHigher("8")) {
4961
+ goog.style.setBoxSizingSize_(a, b, "border-box")
4962
+ }else {
4728
4963
  if(c = a.style, d) {
4729
4964
  var d = goog.style.getPaddingBox(a), e = goog.style.getBorderBox(a);
4730
4965
  c.pixelWidth = b.width - e.left - d.left - d.right - e.right;
@@ -4732,8 +4967,6 @@ goog.style.setBorderBoxSize = function(a, b) {
4732
4967
  }else {
4733
4968
  c.pixelWidth = b.width, c.pixelHeight = b.height
4734
4969
  }
4735
- }else {
4736
- goog.style.setBoxSizingSize_(a, b, "border-box")
4737
4970
  }
4738
4971
  };
4739
4972
  goog.style.getContentBoxSize = function(a) {
@@ -4748,7 +4981,9 @@ goog.style.getContentBoxSize = function(a) {
4748
4981
  };
4749
4982
  goog.style.setContentBoxSize = function(a, b) {
4750
4983
  var c = goog.dom.getOwnerDocument(a), d = goog.dom.getDomHelper(c).isCss1CompatMode();
4751
- if(goog.userAgent.IE && (!d || !goog.userAgent.isVersion("8"))) {
4984
+ if(!goog.userAgent.IE || d && goog.userAgent.isVersionOrHigher("8")) {
4985
+ goog.style.setBoxSizingSize_(a, b, "content-box")
4986
+ }else {
4752
4987
  if(c = a.style, d) {
4753
4988
  c.pixelWidth = b.width, c.pixelHeight = b.height
4754
4989
  }else {
@@ -4756,8 +4991,6 @@ goog.style.setContentBoxSize = function(a, b) {
4756
4991
  c.pixelWidth = b.width + e.left + d.left + d.right + e.right;
4757
4992
  c.pixelHeight = b.height + e.top + d.top + d.bottom + e.bottom
4758
4993
  }
4759
- }else {
4760
- goog.style.setBoxSizingSize_(a, b, "content-box")
4761
4994
  }
4762
4995
  };
4763
4996
  goog.style.setBoxSizingSize_ = function(a, b, c) {
@@ -4779,7 +5012,8 @@ goog.style.getIePixelValue_ = function(a, b, c, d) {
4779
5012
  return b
4780
5013
  };
4781
5014
  goog.style.getIePixelDistance_ = function(a, b) {
4782
- return goog.style.getIePixelValue_(a, goog.style.getCascadedStyle(a, b), "left", "pixelLeft")
5015
+ var c = goog.style.getCascadedStyle(a, b);
5016
+ return c ? goog.style.getIePixelValue_(a, c, "left", "pixelLeft") : 0
4783
5017
  };
4784
5018
  goog.style.getBox_ = function(a, b) {
4785
5019
  if(goog.userAgent.IE) {
@@ -4899,11 +5133,7 @@ goog.style.getCssTranslation = function(a) {
4899
5133
  var c;
4900
5134
  b && (c = goog.style.getStyle_(a, b));
4901
5135
  c || (c = goog.style.getStyle_(a, "transform"));
4902
- if(!c) {
4903
- return new goog.math.Coordinate(0, 0)
4904
- }
4905
- a = c.match(goog.style.MATRIX_TRANSLATION_REGEX_);
4906
- return!a ? new goog.math.Coordinate(0, 0) : new goog.math.Coordinate(parseFloat(a[1]), parseFloat(a[2]))
5136
+ return c ? (a = c.match(goog.style.MATRIX_TRANSLATION_REGEX_)) ? new goog.math.Coordinate(parseFloat(a[1]), parseFloat(a[2])) : new goog.math.Coordinate(0, 0) : new goog.math.Coordinate(0, 0)
4907
5137
  };
4908
5138
  goog.debug.DivConsole = function(a) {
4909
5139
  this.publishHandler_ = goog.bind(this.addLogRecord, this);
@@ -5016,7 +5246,7 @@ goog.userAgent.product.isVersion = function(a) {
5016
5246
  };
5017
5247
  var bot = {userAgent:{}};
5018
5248
  bot.userAgent.isEngineVersion = function(a) {
5019
- return bot.userAgent.FIREFOX_EXTENSION ? bot.userAgent.FIREFOX_EXTENSION_IS_ENGINE_VERSION_(a) : goog.userAgent.IE ? 0 <= goog.string.compareVersions(goog.userAgent.DOCUMENT_MODE, a) : goog.userAgent.isVersion(a)
5249
+ return bot.userAgent.FIREFOX_EXTENSION ? bot.userAgent.FIREFOX_EXTENSION_IS_ENGINE_VERSION_(a) : goog.userAgent.IE ? 0 <= goog.string.compareVersions(goog.userAgent.DOCUMENT_MODE, a) : goog.userAgent.isVersionOrHigher(a)
5020
5250
  };
5021
5251
  bot.userAgent.isProductVersion = function(a) {
5022
5252
  return bot.userAgent.FIREFOX_EXTENSION ? bot.userAgent.FIREFOX_EXTENSION_IS_PRODUCT_VERSION_(a) : goog.userAgent.product.ANDROID ? 0 <= goog.string.compareVersions(bot.userAgent.ANDROID_VERSION_, a) : goog.userAgent.product.isVersion(a)
@@ -5054,11 +5284,11 @@ bot.userAgent.ANDROID_VERSION_ = function() {
5054
5284
  }
5055
5285
  return"0"
5056
5286
  }();
5057
- bot.userAgent.IE_DOC_PRE8 = goog.userAgent.IE && !goog.userAgent.isDocumentMode(8);
5058
- bot.userAgent.IE_DOC_9 = goog.userAgent.isDocumentMode(9);
5059
- bot.userAgent.IE_DOC_PRE9 = goog.userAgent.IE && !goog.userAgent.isDocumentMode(9);
5060
- bot.userAgent.IE_DOC_10 = goog.userAgent.isDocumentMode(10);
5061
- bot.userAgent.IE_DOC_PRE10 = goog.userAgent.IE && !goog.userAgent.isDocumentMode(10);
5287
+ bot.userAgent.IE_DOC_PRE8 = goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(8);
5288
+ bot.userAgent.IE_DOC_9 = goog.userAgent.isDocumentModeOrHigher(9);
5289
+ bot.userAgent.IE_DOC_PRE9 = goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9);
5290
+ bot.userAgent.IE_DOC_10 = goog.userAgent.isDocumentModeOrHigher(10);
5291
+ bot.userAgent.IE_DOC_PRE10 = goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(10);
5062
5292
  bot.userAgent.ANDROID_PRE_GINGERBREAD = goog.userAgent.product.ANDROID && !bot.userAgent.isProductVersion(2.3);
5063
5293
  goog.json = {};
5064
5294
  goog.json.isValid_ = function(a) {
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.33.0
5
+ version: 2.34.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jari Bakken
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-05-27 00:00:00 +02:00
13
+ date: 2013-08-06 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -175,6 +175,7 @@ files:
175
175
  - lib/selenium/webdriver/common/driver_extensions/has_browser_connection.rb
176
176
  - lib/selenium/webdriver/common/driver_extensions/has_input_devices.rb
177
177
  - lib/selenium/webdriver/common/driver_extensions/has_location.rb
178
+ - lib/selenium/webdriver/common/driver_extensions/has_remote_status.rb
178
179
  - lib/selenium/webdriver/common/driver_extensions/has_session_id.rb
179
180
  - lib/selenium/webdriver/common/driver_extensions/has_touch_screen.rb
180
181
  - lib/selenium/webdriver/common/driver_extensions/has_web_storage.rb