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 "bindings/core/v8/UnionTypesCore.h" | 34 #include "bindings/core/v8/UnionTypesCore.h" |
35 #include "core/HTMLNames.h" | 35 #include "core/HTMLNames.h" |
36 #include "core/dom/AXObjectCache.h" | 36 #include "core/dom/AXObjectCache.h" |
37 #include "core/dom/Attribute.h" | 37 #include "core/dom/Attribute.h" |
38 #include "core/dom/ElementTraversal.h" | 38 #include "core/dom/ElementTraversal.h" |
39 #include "core/dom/NodeLayoutStyle.h" | 39 #include "core/dom/NodeComputedStyle.h" |
40 #include "core/dom/NodeListsNodeData.h" | 40 #include "core/dom/NodeListsNodeData.h" |
41 #include "core/dom/NodeTraversal.h" | 41 #include "core/dom/NodeTraversal.h" |
42 #include "core/events/GestureEvent.h" | 42 #include "core/events/GestureEvent.h" |
43 #include "core/events/KeyboardEvent.h" | 43 #include "core/events/KeyboardEvent.h" |
44 #include "core/events/MouseEvent.h" | 44 #include "core/events/MouseEvent.h" |
45 #include "core/frame/FrameView.h" | 45 #include "core/frame/FrameView.h" |
46 #include "core/frame/LocalFrame.h" | 46 #include "core/frame/LocalFrame.h" |
47 #include "core/html/FormDataList.h" | 47 #include "core/html/FormDataList.h" |
48 #include "core/html/HTMLFormElement.h" | 48 #include "core/html/HTMLFormElement.h" |
49 #include "core/html/HTMLOptGroupElement.h" | 49 #include "core/html/HTMLOptGroupElement.h" |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 bool HTMLSelectElement::shouldShowFocusRingOnMouseFocus() const | 371 bool HTMLSelectElement::shouldShowFocusRingOnMouseFocus() const |
372 { | 372 { |
373 return true; | 373 return true; |
374 } | 374 } |
375 | 375 |
376 bool HTMLSelectElement::canSelectAll() const | 376 bool HTMLSelectElement::canSelectAll() const |
377 { | 377 { |
378 return !usesMenuList(); | 378 return !usesMenuList(); |
379 } | 379 } |
380 | 380 |
381 LayoutObject* HTMLSelectElement::createLayoutObject(const LayoutStyle&) | 381 LayoutObject* HTMLSelectElement::createLayoutObject(const ComputedStyle&) |
382 { | 382 { |
383 if (usesMenuList()) | 383 if (usesMenuList()) |
384 return new LayoutMenuList(this); | 384 return new LayoutMenuList(this); |
385 return new LayoutListBox(this); | 385 return new LayoutListBox(this); |
386 } | 386 } |
387 | 387 |
388 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLSelectElement::selectedOptions() | 388 PassRefPtrWillBeRawPtr<HTMLCollection> HTMLSelectElement::selectedOptions() |
389 { | 389 { |
390 updateListItemSelectedStates(); | 390 updateListItemSelectedStates(); |
391 return ensureCachedCollection<HTMLCollection>(SelectedOptions); | 391 return ensureCachedCollection<HTMLCollection>(SelectedOptions); |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 int focusedIndex = activeSelectionEndListIndex(); | 1768 int focusedIndex = activeSelectionEndListIndex(); |
1769 if (focusedIndex < 0) | 1769 if (focusedIndex < 0) |
1770 focusedIndex = firstSelectableListIndex(); | 1770 focusedIndex = firstSelectableListIndex(); |
1771 if (focusedIndex < 0) | 1771 if (focusedIndex < 0) |
1772 return nullptr; | 1772 return nullptr; |
1773 HTMLElement* focused = listItems()[focusedIndex]; | 1773 HTMLElement* focused = listItems()[focusedIndex]; |
1774 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr
; | 1774 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr
; |
1775 } | 1775 } |
1776 | 1776 |
1777 } // namespace | 1777 } // namespace |
OLD | NEW |