diff --git a/javascript/atoms/dom.js b/javascript/atoms/dom.js
index d4a9aae978..ccf4f8c452 100644
--- a/javascript/atoms/dom.js
+++ b/javascript/atoms/dom.js
@@ -587,14 +587,8 @@ bot.dom.isShown = function(elem, opt_ignoreOpacity) {
var parent = bot.dom.getParentNodeInComposedDom(e);
if (bot.dom.IS_SHADOW_DOM_ENABLED && (parent instanceof ShadowRoot)) {
- if (parent.host.shadowRoot && parent.host.shadowRoot !== parent) {
- // There is a younger shadow root, which will take precedence over
- // the shadow this element is in, thus this element won't be
- // displayed.
- return false;
- } else {
- parent = parent.host;
- }
+ // For backward compatibility, treat all shadow roots as shown.
+ return true;
}
if (parent && (parent.nodeType == goog.dom.NodeType.DOCUMENT ||
@@ -1272,13 +1266,6 @@ bot.dom.getOpacityNonIE_ = function(elem) {
bot.dom.getParentNodeInComposedDom = function(node) {
var /**@type {Node}*/ parent = node.parentNode;
- // Shadow DOM v1
- if (parent && parent.shadowRoot && node.assignedSlot !== undefined) {
- // Can be null on purpose, meaning it has no parent as
- // it hasn't yet been slotted
- return node.assignedSlot ? node.assignedSlot.parentNode : null;
- }
-
// Shadow DOM V0 (deprecated)
if (node.getDestinationInsertionPoints) {
var destinations = node.getDestinationInsertionPoints();
@@ -1287,6 +1274,13 @@ bot.dom.getParentNodeInComposedDom = function(node) {
}
}
+ // Shadow DOM v1
+ if (parent && parent.shadowRoot && node.assignedSlot !== undefined) {
+ // Can be null on purpose, meaning it has no parent as
+ // it hasn't yet been slotted
+ return node.assignedSlot ? node.assignedSlot.parentNode : null;
+ }
+
return parent;
};
diff --git a/javascript/atoms/mouse.js b/javascript/atoms/mouse.js
index cdf195cf18..321c983220 100644
--- a/javascript/atoms/mouse.js
+++ b/javascript/atoms/mouse.js
@@ -143,7 +143,7 @@ bot.Mouse.NO_BUTTON_VALUE_INDEX_ = 3;
* click/ mouseup/ mouseout/ mousemove contextmenu
* dblclick mousedown mouseover
* IE_DOC_PRE9 0 0 0 X 1 4 2 X 0 0 0 0 1 4 2 0 X X 0 X
- * WEBKIT/IE9 0 1 2 X 0 1 2 X 0 1 2 0 0 1 2 0 X X 2 X
+ * WEBKIT/IE9 0 1 2 X 0 1 2 X 0 1 2 4 0 1 2 4 X X 2 X
* GECKO 0 1 2 X 0 1 2 X 0 0 0 0 0 0 0 0 X X 2 X
* </pre>
* @private {!Object.<bot.events.EventType, !Array.<?number>>}
@@ -163,8 +163,8 @@ bot.Mouse.MOUSE_BUTTON_VALUE_MAP_ = (function () {
buttonValueMap[bot.events.EventType.CLICK] = [0, 1, 2, null];
buttonValueMap[bot.events.EventType.CONTEXTMENU] = [null, null, 2, null];
buttonValueMap[bot.events.EventType.MOUSEUP] = [0, 1, 2, null];
- buttonValueMap[bot.events.EventType.MOUSEOUT] = [0, 1, 2, 0];
- buttonValueMap[bot.events.EventType.MOUSEMOVE] = [0, 1, 2, 0];
+ buttonValueMap[bot.events.EventType.MOUSEOUT] = [0, 1, 2, 4];
+ buttonValueMap[bot.events.EventType.MOUSEMOVE] = [0, 1, 2, 4];
} else {
buttonValueMap[bot.events.EventType.CLICK] = [0, 1, 2, null];
buttonValueMap[bot.events.EventType.CONTEXTMENU] = [null, null, 2, null];
diff --git a/javascript/chrome-driver/atoms.js b/javascript/chrome-driver/atoms.js
index 5185e010fb..3febbeba5c 100644
--- a/javascript/chrome-driver/atoms.js
+++ b/javascript/chrome-driver/atoms.js
@@ -211,7 +211,7 @@ webdriver.chrome.getFirstClientRect = function(elem) {
* at the given location. Useful for debugging test clicking issues.
*
* @param {!Element} elem The element to use.
- * @param {!goog.math.Coordinate} coord The coordinate to use.
+ * @param {!Object} coord The coordinate to use.
* @return {{clickable:boolean, message: (string|undefined)}} Object containing
* a boolean "clickable" property, as to whether it can be clicked, and an
* optional "message" string property, which contains any warning/error