+ },\r
+\r
+ /**\r
+ * Marks the first visible item or the one whose `aria-selected` attribute is set to `true`.\r
+ * The latter has priority over the former.\r
+ *\r
+ * @private\r
+ * @param beforeMark function to be executed just before marking.\r
+ * Used in cases when any preparatory cleanup (like unmarking all items) would simultaneously\r
+ * destroy the information that is needed to determine the focused item.\r
+ */\r
+ markFirstDisplayed: function( beforeMark ) {\r
+ var notDisplayed = function( element ) {\r
+ return element.type == CKEDITOR.NODE_ELEMENT && element.getStyle( 'display' ) == 'none';\r
+ },\r
+ links = this._.getItems(),\r
+ item, focused;\r
+\r
+ for ( var i = links.count() - 1; i >= 0; i-- ) {\r
+ item = links.getItem( i );\r
+\r
+ if ( !item.getAscendant( notDisplayed ) ) {\r
+ focused = item;\r
+ this._.focusIndex = i;\r
+ }\r
+\r
+ if ( item.getAttribute( 'aria-selected' ) == 'true' ) {\r
+ focused = item;\r
+ this._.focusIndex = i;\r
+ break;\r
+ }\r
+ }\r
+\r
+ if ( !focused ) {\r
+ return;\r
+ }\r
+\r
+ if ( beforeMark ) {\r
+ beforeMark();\r
+ }\r
+\r
+ if ( CKEDITOR.env.webkit )\r
+ focused.getDocument().getWindow().focus();\r
+ focused.focus();\r
+\r
+ this.onMark && this.onMark( focused );\r
+ },\r
+\r
+ /**\r
+ * Returns a `CKEDITOR.dom.nodeList` of block items.\r
+ *\r
+ * @returns {*|CKEDITOR.dom.nodeList}\r
+ */\r
+ getItems: function() {\r
+ return this.element.getElementsByTag( 'a' );\r