patch.diff 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. diff --git a/javascript/atoms/dom.js b/javascript/atoms/dom.js
  2. index d4a9aae978..ccf4f8c452 100644
  3. --- a/javascript/atoms/dom.js
  4. +++ b/javascript/atoms/dom.js
  5. @@ -587,14 +587,8 @@ bot.dom.isShown = function(elem, opt_ignoreOpacity) {
  6. var parent = bot.dom.getParentNodeInComposedDom(e);
  7. if (bot.dom.IS_SHADOW_DOM_ENABLED && (parent instanceof ShadowRoot)) {
  8. - if (parent.host.shadowRoot !== parent) {
  9. - // There is a younger shadow root, which will take precedence over
  10. - // the shadow this element is in, thus this element won't be
  11. - // displayed.
  12. - return false;
  13. - } else {
  14. - parent = parent.host;
  15. - }
  16. + // For backward compatibility, treat all shadow roots as shown.
  17. + return true;
  18. }
  19. if (parent && (parent.nodeType == goog.dom.NodeType.DOCUMENT ||
  20. @@ -1272,13 +1266,6 @@ bot.dom.getOpacityNonIE_ = function(elem) {
  21. bot.dom.getParentNodeInComposedDom = function(node) {
  22. var /**@type {Node}*/ parent = node.parentNode;
  23. - // Shadow DOM v1
  24. - if (parent && parent.shadowRoot && node.assignedSlot !== undefined) {
  25. - // Can be null on purpose, meaning it has no parent as
  26. - // it hasn't yet been slotted
  27. - return node.assignedSlot ? node.assignedSlot.parentNode : null;
  28. - }
  29. -
  30. // Shadow DOM V0 (deprecated)
  31. if (node.getDestinationInsertionPoints) {
  32. var destinations = node.getDestinationInsertionPoints();
  33. @@ -1287,6 +1274,13 @@ bot.dom.getParentNodeInComposedDom = function(node) {
  34. }
  35. }
  36. + // Shadow DOM v1
  37. + if (parent && parent.shadowRoot && node.assignedSlot !== undefined) {
  38. + // Can be null on purpose, meaning it has no parent as
  39. + // it hasn't yet been slotted
  40. + return node.assignedSlot ? node.assignedSlot.parentNode : null;
  41. + }
  42. +
  43. return parent;
  44. };
  45. diff --git a/javascript/atoms/mouse.js b/javascript/atoms/mouse.js
  46. index cdf195cf18..321c983220 100644
  47. --- a/javascript/atoms/mouse.js
  48. +++ b/javascript/atoms/mouse.js
  49. @@ -143,7 +143,7 @@ bot.Mouse.NO_BUTTON_VALUE_INDEX_ = 3;
  50. * click/ mouseup/ mouseout/ mousemove contextmenu
  51. * dblclick mousedown mouseover
  52. * IE_DOC_PRE9 0 0 0 X 1 4 2 X 0 0 0 0 1 4 2 0 X X 0 X
  53. - * WEBKIT/IE9 0 1 2 X 0 1 2 X 0 1 2 0 0 1 2 0 X X 2 X
  54. + * WEBKIT/IE9 0 1 2 X 0 1 2 X 0 1 2 4 0 1 2 4 X X 2 X
  55. * GECKO 0 1 2 X 0 1 2 X 0 0 0 0 0 0 0 0 X X 2 X
  56. * </pre>
  57. * @private {!Object.<bot.events.EventType, !Array.<?number>>}
  58. @@ -163,8 +163,8 @@ bot.Mouse.MOUSE_BUTTON_VALUE_MAP_ = (function () {
  59. buttonValueMap[bot.events.EventType.CLICK] = [0, 1, 2, null];
  60. buttonValueMap[bot.events.EventType.CONTEXTMENU] = [null, null, 2, null];
  61. buttonValueMap[bot.events.EventType.MOUSEUP] = [0, 1, 2, null];
  62. - buttonValueMap[bot.events.EventType.MOUSEOUT] = [0, 1, 2, 0];
  63. - buttonValueMap[bot.events.EventType.MOUSEMOVE] = [0, 1, 2, 0];
  64. + buttonValueMap[bot.events.EventType.MOUSEOUT] = [0, 1, 2, 4];
  65. + buttonValueMap[bot.events.EventType.MOUSEMOVE] = [0, 1, 2, 4];
  66. } else {
  67. buttonValueMap[bot.events.EventType.CLICK] = [0, 1, 2, null];
  68. buttonValueMap[bot.events.EventType.CONTEXTMENU] = [null, null, 2, null];
  69. diff --git a/javascript/chrome-driver/atoms.js b/javascript/chrome-driver/atoms.js
  70. index 5185e010fb..3febbeba5c 100644
  71. --- a/javascript/chrome-driver/atoms.js
  72. +++ b/javascript/chrome-driver/atoms.js
  73. @@ -211,7 +211,7 @@ webdriver.chrome.getFirstClientRect = function(elem) {
  74. * at the given location. Useful for debugging test clicking issues.
  75. *
  76. * @param {!Element} elem The element to use.
  77. - * @param {!goog.math.Coordinate} coord The coordinate to use.
  78. + * @param {!Object} coord The coordinate to use.
  79. * @return {{clickable:boolean, message: (string|undefined)}} Object containing
  80. * a boolean "clickable" property, as to whether it can be clicked, and an
  81. * optional "message" string property, which contains any warning/error