OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the select element renderer in WebCore. | 2 * This file is part of the select element renderer in WebCore. |
3 * | 3 * |
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 void RenderMenuList::listBoxSelectItem(int listIndex, bool allowMultiplySelectio
ns, bool shift, bool fireOnChangeNow) | 379 void RenderMenuList::listBoxSelectItem(int listIndex, bool allowMultiplySelectio
ns, bool shift, bool fireOnChangeNow) |
380 { | 380 { |
381 selectElement()->listBoxSelectItem(listIndex, allowMultiplySelections, shift
, fireOnChangeNow); | 381 selectElement()->listBoxSelectItem(listIndex, allowMultiplySelections, shift
, fireOnChangeNow); |
382 } | 382 } |
383 | 383 |
384 bool RenderMenuList::multiple() const | 384 bool RenderMenuList::multiple() const |
385 { | 385 { |
386 return selectElement()->multiple(); | 386 return selectElement()->multiple(); |
387 } | 387 } |
388 | 388 |
| 389 IntRect RenderMenuList::elementRectRelativeToRootView() const |
| 390 { |
| 391 return selectElement()->document().view()->contentsToRootView(pixelSnappedIn
tRect(absoluteBoundingBoxRect())); |
| 392 } |
| 393 |
| 394 Element& RenderMenuList::ownerElement() const |
| 395 { |
| 396 return *selectElement(); |
| 397 } |
| 398 |
| 399 RenderStyle* RenderMenuList::renderStyleForItem(Element& element) const |
| 400 { |
| 401 return element.renderStyle() ? element.renderStyle() : element.computedStyle
(); |
| 402 } |
| 403 |
389 void RenderMenuList::didSetSelectedIndex(int listIndex) | 404 void RenderMenuList::didSetSelectedIndex(int listIndex) |
390 { | 405 { |
391 didUpdateActiveOption(selectElement()->listToOptionIndex(listIndex)); | 406 didUpdateActiveOption(selectElement()->listToOptionIndex(listIndex)); |
392 } | 407 } |
393 | 408 |
394 void RenderMenuList::didUpdateActiveOption(int optionIndex) | 409 void RenderMenuList::didUpdateActiveOption(int optionIndex) |
395 { | 410 { |
396 if (!document().existingAXObjectCache()) | 411 if (!document().existingAXObjectCache()) |
397 return; | 412 return; |
398 | 413 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 HTMLElement* element = listItems[listIndex]; | 599 HTMLElement* element = listItems[listIndex]; |
585 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); | 600 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); |
586 } | 601 } |
587 | 602 |
588 void RenderMenuList::setTextFromItem(unsigned listIndex) | 603 void RenderMenuList::setTextFromItem(unsigned listIndex) |
589 { | 604 { |
590 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); | 605 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); |
591 } | 606 } |
592 | 607 |
593 } // namespace blink | 608 } // namespace blink |
OLD | NEW |