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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "HTMLNames.h" | 31 #include "HTMLNames.h" |
32 #include "bindings/v8/ExceptionState.h" | 32 #include "bindings/v8/ExceptionState.h" |
33 #include "bindings/v8/ExceptionStatePlaceholder.h" | 33 #include "bindings/v8/ExceptionStatePlaceholder.h" |
34 #include "core/accessibility/AXObjectCache.h" | 34 #include "core/accessibility/AXObjectCache.h" |
35 #include "core/dom/Attribute.h" | 35 #include "core/dom/Attribute.h" |
36 #include "core/dom/ElementTraversal.h" | 36 #include "core/dom/ElementTraversal.h" |
37 #include "core/dom/EventNames.h" | 37 #include "core/dom/EventNames.h" |
38 #include "core/dom/KeyboardEvent.h" | 38 #include "core/dom/KeyboardEvent.h" |
39 #include "core/dom/MouseEvent.h" | 39 #include "core/dom/MouseEvent.h" |
40 #include "core/dom/NodeRenderingContext.h" | |
41 #include "core/dom/NodeTraversal.h" | 40 #include "core/dom/NodeTraversal.h" |
42 #include "core/html/FormController.h" | 41 #include "core/html/FormController.h" |
43 #include "core/html/FormDataList.h" | 42 #include "core/html/FormDataList.h" |
44 #include "core/html/HTMLFormElement.h" | 43 #include "core/html/HTMLFormElement.h" |
45 #include "core/html/HTMLOptGroupElement.h" | 44 #include "core/html/HTMLOptGroupElement.h" |
46 #include "core/html/HTMLOptionElement.h" | 45 #include "core/html/HTMLOptionElement.h" |
47 #include "core/html/HTMLOptionsCollection.h" | 46 #include "core/html/HTMLOptionsCollection.h" |
48 #include "core/page/EventHandler.h" | 47 #include "core/page/EventHandler.h" |
49 #include "core/page/Frame.h" | 48 #include "core/page/Frame.h" |
50 #include "core/page/Page.h" | 49 #include "core/page/Page.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 return !usesMenuList(); | 327 return !usesMenuList(); |
329 } | 328 } |
330 | 329 |
331 RenderObject* HTMLSelectElement::createRenderer(RenderStyle*) | 330 RenderObject* HTMLSelectElement::createRenderer(RenderStyle*) |
332 { | 331 { |
333 if (usesMenuList()) | 332 if (usesMenuList()) |
334 return new RenderMenuList(this); | 333 return new RenderMenuList(this); |
335 return new RenderListBox(this); | 334 return new RenderListBox(this); |
336 } | 335 } |
337 | 336 |
338 bool HTMLSelectElement::childShouldCreateRenderer(const NodeRenderingContext& ch
ildContext) const | 337 bool HTMLSelectElement::childShouldCreateRenderer(const Node& child) const |
339 { | 338 { |
340 if (!HTMLFormControlElementWithState::childShouldCreateRenderer(childContext
)) | 339 if (!HTMLFormControlElementWithState::childShouldCreateRenderer(child)) |
341 return false; | 340 return false; |
342 if (!usesMenuList()) | 341 if (!usesMenuList()) |
343 return childContext.node()->hasTagName(HTMLNames::optionTag) || isHTMLOp
tGroupElement(childContext.node()); | 342 return child.hasTagName(HTMLNames::optionTag) || isHTMLOptGroupElement(&
child); |
344 return false; | 343 return false; |
345 } | 344 } |
346 | 345 |
347 PassRefPtr<HTMLCollection> HTMLSelectElement::selectedOptions() | 346 PassRefPtr<HTMLCollection> HTMLSelectElement::selectedOptions() |
348 { | 347 { |
349 updateListItemSelectedStates(); | 348 updateListItemSelectedStates(); |
350 return ensureCachedHTMLCollection(SelectedOptions); | 349 return ensureCachedHTMLCollection(SelectedOptions); |
351 } | 350 } |
352 | 351 |
353 PassRefPtr<HTMLOptionsCollection> HTMLSelectElement::options() | 352 PassRefPtr<HTMLOptionsCollection> HTMLSelectElement::options() |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1573 return true; | 1572 return true; |
1574 } | 1573 } |
1575 | 1574 |
1576 bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionSt
ate& es) | 1575 bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionSt
ate& es) |
1577 { | 1576 { |
1578 remove(index); | 1577 remove(index); |
1579 return true; | 1578 return true; |
1580 } | 1579 } |
1581 | 1580 |
1582 } // namespace | 1581 } // namespace |
OLD | NEW |