OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 4 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
10 * | 10 * |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "core/html/HTMLSelectElement.h" | 29 #include "core/html/HTMLSelectElement.h" |
30 | 30 |
31 #include "bindings/core/v8/ExceptionMessages.h" | 31 #include "bindings/core/v8/ExceptionMessages.h" |
32 #include "bindings/core/v8/ExceptionState.h" | 32 #include "bindings/core/v8/ExceptionState.h" |
33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 33 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
34 #include "core/HTMLNames.h" | 34 #include "core/HTMLNames.h" |
35 #include "core/accessibility/AXObjectCache.h" | 35 #include "core/accessibility/AXObjectCache.h" |
36 #include "core/dom/Attribute.h" | 36 #include "core/dom/Attribute.h" |
37 #include "core/dom/ElementTraversal.h" | 37 #include "core/dom/ElementTraversal.h" |
38 #include "core/dom/NodeListsNodeData.h" | 38 #include "core/dom/NodeListsNodeData.h" |
| 39 #include "core/dom/NodeRenderStyle.h" |
39 #include "core/dom/NodeTraversal.h" | 40 #include "core/dom/NodeTraversal.h" |
40 #include "core/events/GestureEvent.h" | 41 #include "core/events/GestureEvent.h" |
41 #include "core/events/KeyboardEvent.h" | 42 #include "core/events/KeyboardEvent.h" |
42 #include "core/events/MouseEvent.h" | 43 #include "core/events/MouseEvent.h" |
43 #include "core/frame/FrameView.h" | 44 #include "core/frame/FrameView.h" |
44 #include "core/frame/LocalFrame.h" | 45 #include "core/frame/LocalFrame.h" |
45 #include "core/html/FormDataList.h" | 46 #include "core/html/FormDataList.h" |
46 #include "core/html/HTMLFormElement.h" | 47 #include "core/html/HTMLFormElement.h" |
47 #include "core/html/HTMLOptGroupElement.h" | 48 #include "core/html/HTMLOptGroupElement.h" |
48 #include "core/html/HTMLOptionElement.h" | 49 #include "core/html/HTMLOptionElement.h" |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 { | 530 { |
530 ASSERT(direction == -1 || direction == 1); | 531 ASSERT(direction == -1 || direction == 1); |
531 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& listItems = this->
listItems(); | 532 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& listItems = this->
listItems(); |
532 int lastGoodIndex = listIndex; | 533 int lastGoodIndex = listIndex; |
533 int size = listItems.size(); | 534 int size = listItems.size(); |
534 for (listIndex += direction; listIndex >= 0 && listIndex < size; listIndex +
= direction) { | 535 for (listIndex += direction; listIndex >= 0 && listIndex < size; listIndex +
= direction) { |
535 --skip; | 536 --skip; |
536 HTMLElement* element = listItems[listIndex]; | 537 HTMLElement* element = listItems[listIndex]; |
537 if (!isHTMLOptionElement(*element)) | 538 if (!isHTMLOptionElement(*element)) |
538 continue; | 539 continue; |
| 540 if (toHTMLOptionElement(*element).isDisplayNone()) |
| 541 continue; |
539 if (element->isDisabledFormControl()) | 542 if (element->isDisabledFormControl()) |
540 continue; | 543 continue; |
541 if (!usesMenuList() && !element->renderer()) | 544 if (!usesMenuList() && !element->renderer()) |
542 continue; | 545 continue; |
543 lastGoodIndex = listIndex; | 546 lastGoodIndex = listIndex; |
544 if (skip <= 0) | 547 if (skip <= 0) |
545 break; | 548 break; |
546 } | 549 } |
547 return lastGoodIndex; | 550 return lastGoodIndex; |
548 } | 551 } |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 int focusedIndex = activeSelectionEndListIndex(); | 1738 int focusedIndex = activeSelectionEndListIndex(); |
1736 if (focusedIndex < 0) | 1739 if (focusedIndex < 0) |
1737 focusedIndex = firstSelectableListIndex(); | 1740 focusedIndex = firstSelectableListIndex(); |
1738 if (focusedIndex < 0) | 1741 if (focusedIndex < 0) |
1739 return nullptr; | 1742 return nullptr; |
1740 HTMLElement* focused = listItems()[focusedIndex]; | 1743 HTMLElement* focused = listItems()[focusedIndex]; |
1741 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr
; | 1744 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr
; |
1742 } | 1745 } |
1743 | 1746 |
1744 } // namespace | 1747 } // namespace |
OLD | NEW |