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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 void RenderMenuList::listBoxSelectItem(int listIndex, bool allowMultiplySelectio
ns, bool shift, bool fireOnChangeNow) | 380 void RenderMenuList::listBoxSelectItem(int listIndex, bool allowMultiplySelectio
ns, bool shift, bool fireOnChangeNow) |
381 { | 381 { |
382 selectElement()->listBoxSelectItem(listIndex, allowMultiplySelections, shift
, fireOnChangeNow); | 382 selectElement()->listBoxSelectItem(listIndex, allowMultiplySelections, shift
, fireOnChangeNow); |
383 } | 383 } |
384 | 384 |
385 bool RenderMenuList::multiple() const | 385 bool RenderMenuList::multiple() const |
386 { | 386 { |
387 return selectElement()->multiple(); | 387 return selectElement()->multiple(); |
388 } | 388 } |
389 | 389 |
| 390 IntRect RenderMenuList::elementRectRelativeToRootView() const |
| 391 { |
| 392 return selectElement()->document().view()->contentsToRootView(pixelSnappedIn
tRect(absoluteBoundingBoxRect())); |
| 393 } |
| 394 |
| 395 Element& RenderMenuList::ownerElement() const |
| 396 { |
| 397 return *selectElement(); |
| 398 } |
| 399 |
| 400 RenderStyle* RenderMenuList::renderStyleForItem(HTMLElement& element) const |
| 401 { |
| 402 return element.renderStyle() ? element.renderStyle() : element.computedStyle
(); |
| 403 } |
| 404 |
390 void RenderMenuList::didSetSelectedIndex(int listIndex) | 405 void RenderMenuList::didSetSelectedIndex(int listIndex) |
391 { | 406 { |
392 didUpdateActiveOption(selectElement()->listToOptionIndex(listIndex)); | 407 didUpdateActiveOption(selectElement()->listToOptionIndex(listIndex)); |
393 } | 408 } |
394 | 409 |
395 void RenderMenuList::didUpdateActiveOption(int optionIndex) | 410 void RenderMenuList::didUpdateActiveOption(int optionIndex) |
396 { | 411 { |
397 if (!document().existingAXObjectCache()) | 412 if (!document().existingAXObjectCache()) |
398 return; | 413 return; |
399 | 414 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 HTMLElement* element = listItems[listIndex]; | 600 HTMLElement* element = listItems[listIndex]; |
586 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); | 601 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); |
587 } | 602 } |
588 | 603 |
589 void RenderMenuList::setTextFromItem(unsigned listIndex) | 604 void RenderMenuList::setTextFromItem(unsigned listIndex) |
590 { | 605 { |
591 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); | 606 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); |
592 } | 607 } |
593 | 608 |
594 } // namespace blink | 609 } // namespace blink |
OLD | NEW |