Skip to content

Commit

Permalink
Remove trailling whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
philc committed Feb 20, 2020
1 parent d670020 commit e9bc905
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions content_scripts/link_hints.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ class LinkHintsMode
# <select>: latest Chrome refuses `mousedown` event, and we can only
# focus it to let user press space to activate the popup menu
# <object> & <embed>: for Flash games which have their own key event handlers
# since we have been able to blur them by pressing `Escape`
# since we have been able to blur them by pressing `Escape`
if clickEl.nodeName.toLowerCase() in ["input", "select", "object", "embed"]
clickEl.focus()
linkActivator clickEl
Expand Down Expand Up @@ -743,22 +743,22 @@ LocalHints =

#
# Returns element at a given (x,y) with an optional root element.
# If the returned element is a shadow root, call the function use that recursively
# If the returned element is a shadow root, call the function use that recursively
# until we hit an actual element.
#
getElementFromPoint: (x, y, root = document, stack = []) ->
element = if root.elementsFromPoint then root.elementsFromPoint(x, y)[0] else root.elementFromPoint(x, y)

if stack.indexOf(element) != -1
return element

stack.push(element)
if element and element.shadowRoot

if element and element.shadowRoot
return LocalHints.getElementFromPoint(x, y, element.shadowRoot, stack)

return element

#
# Returns all clickable elements that are not hidden and are in the current viewport, along with rectangles
# at which (parts of) the elements are displayed.
Expand Down
10 changes: 5 additions & 5 deletions test_harnesses/visibility_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
'description': 'Is visible and displayed',
'test': function(element) {
var computedStyle = window.getComputedStyle(element, null);
if (computedStyle.getPropertyValue('visibility') != 'visible' ||
if (computedStyle.getPropertyValue('visibility') != 'visible' ||
computedStyle.getPropertyValue('display') == 'none')
return false;
return true;
Expand Down Expand Up @@ -99,7 +99,7 @@
td.innerHTML = text;
return td;
}

function checkDivsForVisibility() {
var table = document.getElementById("resultsDisplay");
var tr = document.getElementsByTagName("tr")[0];
Expand Down Expand Up @@ -142,7 +142,7 @@

<div id='testContainer' style='position: absolute; top: 0; left:0'>
<span class='testElement' data-expectedresult=1 data-comment="default">test</span>

<span class='testElement' data-expectedresult=0 style="visibility:hidden" data-comment="visibility: hidden">test</span>

<div style="visibility:hidden">
Expand All @@ -163,10 +163,10 @@
<div class='testElement' data-expectedresult=1 data-comment="Contains only a floated span. We must recurse into the div to find it.">
<span style="float: left">test</span>
</div>
<svg>
<svg>
<a class='testElement' data-expectedresult=1 xlink:href='http://www.example.com/' data-comment="This link is contained within an SVG.">
<text x='0' y='68'>test</text>
</a>
</a>
</svg>
</div>
</html>

0 comments on commit e9bc905

Please sign in to comment.