{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/webdriver/pulls/comments/26320579","id":26320579,"diff_hunk":"@@ -23,55 +23,74 @@\n           </tr>\n           <tr>\n             <td>GET</td>\n-            <td id='get-id-displayed'>/session/{sessionId}/element/{ELEMENT}/displayed</td>\n+            <td id='get-id-displayed'>/session/{sessionId}/element/{element}/displayed</td>\n             <td></td>\n           </tr>\n         </table>\n-          <h2 id='determining-if-displayed'>Determining if an element is displayed</h2>\n-            <p>The following steps MUST be used to determine if an element is displayed to a user.</p>\n-            <ul>\n-              <li>The BODY element MUST be displayed irrespective of any CSS style. This is due to the <a href='http://dev.w3.org/csswg/css-backgrounds/#special-backgrounds'>backgrounds of special elements</a> showing through from the document canvas.</li>\n-              <li>Any INPUT elements of \"type=hidden\" MUST NOT be displayed.</li>\n-              <li>Any NOSCRIPT elements MUST NOT be displayed.</li>\n-              <li>OPTIONs and OPTGROUP elements MUST be displayed if and only if the enclosing select element is displayed.</li>\n-              <li>MAP elements are displayed if and only if the image it uses is displayed. Areas within\n-                a map are displayed if the enclosing MAP is displayed.</li>\n-              <li>If element is a [[!DOM4]] <a href=\"http://www.w3.org/TR/2012/WD-dom-20120105/#interface-text\">\n-                text node</a> then it MUST be displayed.</li>\n-              <li>The element MUST NOT be displayed if there is a [[!css3-2d-transforms]] or [[!css3-3d-transforms]]\n-                property that gives a negative x or y to the canvas. The User Agent MUST NOT allow negative scrolling.</li>\n-              <li>The element MUST NOT be displayed if that element, or any of its ancestors,\n-                has a <a href='http://www.w3.org/TR/html5/editing.html#the-hidden-attribute'>hidden attribute</a>\n-                or has <code>display:none</code> in its computed CSS style.</li>\n-              <li>If element or at least one of its descendents have both\n-                <a href='http://dev.w3.org/fxtf/geometry/Overview.html#dom-domrect-domrect'>DOMRect</a>\n-                height and a <a href='http://dev.w3.org/fxtf/geometry/Overview.html#dom-domrect-domrect'>DOMRect</a>\n-                width greater than 0px, as returned by <code>element.<a href='http://dev.w3.org/csswg/cssom-view/#dom-element-getboundingclientrect'>getBoundingClientRect()</a>\n-                </code>then it MUST be displayed.</li>\n-              <li>The element MUST NOT be displayed if any ancestor of the element  has a fixed size, and has the CSS style with one of the following <code>overflow:hidden</code>, <code>overflow-x:hidden</code> or <code>overflow-y:hidden</code>, and the element's location as determined by <code><a href=\"http://www.w3.org/TR/cssom-view/#dom-range-getclientrects\">getClientRects</a></code> is not within the fixed size of the parent.</li>\n-            </ul>\n \n-          <p class=\"note\">\n-            Essentially, this attempts to model whether or not a user of the browser could possibly find a way to view the <code>WebElement</code> without resizing the browser window.\n-          </p>\n-          <div class=\"note\">\n-            <p>\n-            The common usage pattern for <code>isDisplayed</code> is typically something similar to (in python):</p>\n-            <pre>\n-              element = driver.find_element(by = TAG_NAME, value= = \"button\")\n-              if element.is_displayed():\n-                  element.click()\n-              else\n-                  # So other deep magic of the unseen ages.\n-            </pre>\n-        </div>\n-        <p>If <code>isDisplayed</code> returns true, then the element MUST also be\n-        <a href=\"#interactable-elements\">interactable</a> should it meet the other criteria for being interactable. If any part of the BODY can be brought into the current viewport, this MUST return true.\n-        <div class=\"note\">\n-          <p>This implies that <code>isDisplayed</code> MUST return true if the centre of the element could be brought into the viewport. The exception to this would be the BODY element, which is generally assumed to always be displayed by users of the WebDriver spec. It is possible to interact with elements which may not have the centre point brought into the viewport by using the <a href=\"#low-level-commands\">low level commands</a>. This means that if any part of the element could be brought into the viewport by user action and its position could be used by low-level commands then a WebDriver implementation MAY return true.</p>\n-        </div>\n-        <p>If the <code><a href='widl-WebElement-ELEMENT'>ELEMENT</a></code> does not represent a <a href='http://w3c.github.io/dom/#element'>Document <code>element</code></a>, or it represents a <a href='http://w3c.github.io/dom/#element'>Document <code>element</code></a> that is no longer attached to the document's <a href='http://w3c.github.io/dom/#concept-node-tree'>node tree</a>, then the WebDriver implementation MUST immediately abort the command and return a <code title=\"stale-element-reference\"><a href=\"#status-stale-element-reference\">stale element reference</a></code> error. If the <a href='http://www.w3.org/TR/html5/browsers.html#top-level-browsing-context'>top level browsing context</a> currently receiving commands is no longer open a <code><a href=\"#no-such-window\">no such window</a></code> error MUST be raised.\n+        <p>The command is used to determine the <a>element\n+         visibility</a> of the <a\n+         href=http://w3c.github.io/dom/#element>Document element</a>\n+         connected with the <a>web element</a> reference given by\n+         the <code>element</code> fragment in the path.\n+\n+        <p>The response is composed using the following algorithm:</p>\n+\n+        <ol>\n+         <li>Let <var>response</var> be an initially empty\n+          <a>response</a>.\n+\n+         <li>Let <var>visible</var> be a boolean initially set to\n+          false.\n+\n+         <li>Let <var>element</var> be an initially undefined <a\n+          href=\"http://w3c.github.io/dom/#element\">Document\n+          element</a>.\n+\n+         <li>Let <var>element reference</var> be a string with the\n+          value of the <code>element</code> fragment from the path.\n+\n+         <li>If <var>element reference</var> is null or has a\n+          length equal to 0, set <var>response</var>'s <a\n+          href=#response-status>status</a> to the <a>invalid\n+          argument</a> status and return <var>response</var>.\n+\n+         <li>If the <a>default content</a>'s <a\n+          href=http.//www.w3.org/TR/html5/browser.html#top-level-browsing-context>top\n+          level browsing context</a> is no longer open, set\n+          <var>response</var>'s <a href=#response-status>status</a>\n+          to the <a>no such window</a> status</a> and return\n+          <var>response</var>.\n+\n+         <li>Set <var>element</var> be the <a\n+          href=http://w3c.github.io/dom/#element>Document element</a>\n+          found after applying the <a>web element lookup</a> algorithm\n+          to the <a>element reference map</a>.  <li>If <var>element</var>\n+          is null or <var>element</var> does not represent a <a\n+          href=http://w3c.github.io/dom/#element>Document\n+          element</a>, set <var>response</var>'s <a\n+          href=#response-status>status</a> to the <a>no such\n+          element</a> status and return <var>response</var>.\n+\n+         <li>If <var>element</var> represents <a\n+          href=http://w3c.github.io/dom/#element>Document element</a>\n+          that is no longer attached to the document's node tree,\n+          set <var>response</var>'s <a href=#response-status>status</a>\n+          to the <a>stale element reference</a> status and return\n+          <var>response</var>.\n+\n+         <li>Apply the <a>element visibility</a> algorithm to","path":"10_element_state.html","position":113,"original_position":113,"commit_id":"4754511b7a50052988a433060adacee18f94963f","original_commit_id":"4754511b7a50052988a433060adacee18f94963f","user":{"login":"abotalov","id":1497867,"avatar_url":"https://avatars.githubusercontent.com/u/1497867?v=3","gravatar_id":"","url":"https://api.github.com/users/abotalov","html_url":"https://github.com/abotalov","followers_url":"https://api.github.com/users/abotalov/followers","following_url":"https://api.github.com/users/abotalov/following{/other_user}","gists_url":"https://api.github.com/users/abotalov/gists{/gist_id}","starred_url":"https://api.github.com/users/abotalov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abotalov/subscriptions","organizations_url":"https://api.github.com/users/abotalov/orgs","repos_url":"https://api.github.com/users/abotalov/repos","events_url":"https://api.github.com/users/abotalov/events{/privacy}","received_events_url":"https://api.github.com/users/abotalov/received_events","type":"User","site_admin":false},"body":"Should the algorithm be also called \"displayness\" here and in other places?","created_at":"2015-03-12T16:50:51Z","updated_at":"2015-03-12T16:50:51Z","html_url":"https://github.com/w3c/webdriver/pull/4#discussion_r26320579","pull_request_url":"https://api.github.com/repos/w3c/webdriver/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/w3c/webdriver/pulls/comments/26320579"},"html":{"href":"https://github.com/w3c/webdriver/pull/4#discussion_r26320579"},"pull_request":{"href":"https://api.github.com/repos/w3c/webdriver/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/w3c/webdriver/pulls/4","id":23658892,"html_url":"https://github.com/w3c/webdriver/pull/4","diff_url":"https://github.com/w3c/webdriver/pull/4.diff","patch_url":"https://github.com/w3c/webdriver/pull/4.patch","issue_url":"https://api.github.com/repos/w3c/webdriver/issues/4","number":4,"state":"open","locked":false,"title":"Rewrite element displayed algorithm","user":{"login":"andreastt","id":399120,"avatar_url":"https://avatars.githubusercontent.com/u/399120?v=3","gravatar_id":"","url":"https://api.github.com/users/andreastt","html_url":"https://github.com/andreastt","followers_url":"https://api.github.com/users/andreastt/followers","following_url":"https://api.github.com/users/andreastt/following{/other_user}","gists_url":"https://api.github.com/users/andreastt/gists{/gist_id}","starred_url":"https://api.github.com/users/andreastt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreastt/subscriptions","organizations_url":"https://api.github.com/users/andreastt/orgs","repos_url":"https://api.github.com/users/andreastt/repos","events_url":"https://api.github.com/users/andreastt/events{/privacy}","received_events_url":"https://api.github.com/users/andreastt/received_events","type":"User","site_admin":false},"body":"Fixes bug 26304.","created_at":"2014-10-31T06:39:20Z","updated_at":"2015-03-12T16:50:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"badfd9ae33b2a8955024b4273bb6cfd0dbade934","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/w3c/webdriver/pulls/4/commits","review_comments_url":"https://api.github.com/repos/w3c/webdriver/pulls/4/comments","review_comment_url":"https://api.github.com/repos/w3c/webdriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/w3c/webdriver/issues/4/comments","statuses_url":"https://api.github.com/repos/w3c/webdriver/statuses/4754511b7a50052988a433060adacee18f94963f","head":{"label":"andreastt:ato/bug-26304","ref":"ato/bug-26304","sha":"4754511b7a50052988a433060adacee18f94963f","user":{"login":"andreastt","id":399120,"avatar_url":"https://avatars.githubusercontent.com/u/399120?v=3","gravatar_id":"","url":"https://api.github.com/users/andreastt","html_url":"https://github.com/andreastt","followers_url":"https://api.github.com/users/andreastt/followers","following_url":"https://api.github.com/users/andreastt/following{/other_user}","gists_url":"https://api.github.com/users/andreastt/gists{/gist_id}","starred_url":"https://api.github.com/users/andreastt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreastt/subscriptions","organizations_url":"https://api.github.com/users/andreastt/orgs","repos_url":"https://api.github.com/users/andreastt/repos","events_url":"https://api.github.com/users/andreastt/events{/privacy}","received_events_url":"https://api.github.com/users/andreastt/received_events","type":"User","site_admin":false},"repo":{"id":26004079,"name":"webdriver","full_name":"andreastt/webdriver","owner":{"login":"andreastt","id":399120,"avatar_url":"https://avatars.githubusercontent.com/u/399120?v=3","gravatar_id":"","url":"https://api.github.com/users/andreastt","html_url":"https://github.com/andreastt","followers_url":"https://api.github.com/users/andreastt/followers","following_url":"https://api.github.com/users/andreastt/following{/other_user}","gists_url":"https://api.github.com/users/andreastt/gists{/gist_id}","starred_url":"https://api.github.com/users/andreastt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreastt/subscriptions","organizations_url":"https://api.github.com/users/andreastt/orgs","repos_url":"https://api.github.com/users/andreastt/repos","events_url":"https://api.github.com/users/andreastt/events{/privacy}","received_events_url":"https://api.github.com/users/andreastt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreastt/webdriver","description":"The WebDriver API and wire protocol","fork":true,"url":"https://api.github.com/repos/andreastt/webdriver","forks_url":"https://api.github.com/repos/andreastt/webdriver/forks","keys_url":"https://api.github.com/repos/andreastt/webdriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreastt/webdriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreastt/webdriver/teams","hooks_url":"https://api.github.com/repos/andreastt/webdriver/hooks","issue_events_url":"https://api.github.com/repos/andreastt/webdriver/issues/events{/number}","events_url":"https://api.github.com/repos/andreastt/webdriver/events","assignees_url":"https://api.github.com/repos/andreastt/webdriver/assignees{/user}","branches_url":"https://api.github.com/repos/andreastt/webdriver/branches{/branch}","tags_url":"https://api.github.com/repos/andreastt/webdriver/tags","blobs_url":"https://api.github.com/repos/andreastt/webdriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreastt/webdriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreastt/webdriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreastt/webdriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreastt/webdriver/statuses/{sha}","languages_url":"https://api.github.com/repos/andreastt/webdriver/languages","stargazers_url":"https://api.github.com/repos/andreastt/webdriver/stargazers","contributors_url":"https://api.github.com/repos/andreastt/webdriver/contributors","subscribers_url":"https://api.github.com/repos/andreastt/webdriver/subscribers","subscription_url":"https://api.github.com/repos/andreastt/webdriver/subscription","commits_url":"https://api.github.com/repos/andreastt/webdriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreastt/webdriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreastt/webdriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreastt/webdriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreastt/webdriver/contents/{+path}","compare_url":"https://api.github.com/repos/andreastt/webdriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreastt/webdriver/merges","archive_url":"https://api.github.com/repos/andreastt/webdriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreastt/webdriver/downloads","issues_url":"https://api.github.com/repos/andreastt/webdriver/issues{/number}","pulls_url":"https://api.github.com/repos/andreastt/webdriver/pulls{/number}","milestones_url":"https://api.github.com/repos/andreastt/webdriver/milestones{/number}","notifications_url":"https://api.github.com/repos/andreastt/webdriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreastt/webdriver/labels{/name}","releases_url":"https://api.github.com/repos/andreastt/webdriver/releases{/id}","created_at":"2014-10-31T05:58:16Z","updated_at":"2014-10-31T06:15:57Z","pushed_at":"2015-03-02T12:55:45Z","git_url":"git://github.com/andreastt/webdriver.git","ssh_url":"git@github.com:andreastt/webdriver.git","clone_url":"https://github.com/andreastt/webdriver.git","svn_url":"https://github.com/andreastt/webdriver","homepage":null,"size":1393,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"w3c:master","ref":"master","sha":"f324f93d588311b185812f755212593089cb1032","user":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":25993378,"name":"webdriver","full_name":"w3c/webdriver","owner":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/webdriver","description":"The WebDriver API and wire protocol","fork":false,"url":"https://api.github.com/repos/w3c/webdriver","forks_url":"https://api.github.com/repos/w3c/webdriver/forks","keys_url":"https://api.github.com/repos/w3c/webdriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/webdriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/webdriver/teams","hooks_url":"https://api.github.com/repos/w3c/webdriver/hooks","issue_events_url":"https://api.github.com/repos/w3c/webdriver/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/webdriver/events","assignees_url":"https://api.github.com/repos/w3c/webdriver/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/webdriver/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/webdriver/tags","blobs_url":"https://api.github.com/repos/w3c/webdriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/webdriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/webdriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/webdriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/webdriver/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/webdriver/languages","stargazers_url":"https://api.github.com/repos/w3c/webdriver/stargazers","contributors_url":"https://api.github.com/repos/w3c/webdriver/contributors","subscribers_url":"https://api.github.com/repos/w3c/webdriver/subscribers","subscription_url":"https://api.github.com/repos/w3c/webdriver/subscription","commits_url":"https://api.github.com/repos/w3c/webdriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/webdriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/webdriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/webdriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/webdriver/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/webdriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/webdriver/merges","archive_url":"https://api.github.com/repos/w3c/webdriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/webdriver/downloads","issues_url":"https://api.github.com/repos/w3c/webdriver/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/webdriver/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/webdriver/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/webdriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/webdriver/labels{/name}","releases_url":"https://api.github.com/repos/w3c/webdriver/releases{/id}","created_at":"2014-10-30T23:05:22Z","updated_at":"2015-03-11T23:52:53Z","pushed_at":"2015-02-27T23:12:53Z","git_url":"git://github.com/w3c/webdriver.git","ssh_url":"git@github.com:w3c/webdriver.git","clone_url":"https://github.com/w3c/webdriver.git","svn_url":"https://github.com/w3c/webdriver","homepage":null,"size":1746,"stargazers_count":35,"watchers_count":35,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/webdriver/pulls/4"},"html":{"href":"https://github.com/w3c/webdriver/pull/4"},"issue":{"href":"https://api.github.com/repos/w3c/webdriver/issues/4"},"comments":{"href":"https://api.github.com/repos/w3c/webdriver/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/webdriver/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/w3c/webdriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/w3c/webdriver/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/webdriver/statuses/4754511b7a50052988a433060adacee18f94963f"}}}}