Modified: trunk/Source/WebCore/accessibility/AccessibilityListBox.cpp (87351 => 87352)
--- trunk/Source/WebCore/accessibility/AccessibilityListBox.cpp 2011-05-26 02:31:38 UTC (rev 87351)
+++ trunk/Source/WebCore/accessibility/AccessibilityListBox.cpp 2011-05-26 03:13:31 UTC (rev 87352)
@@ -179,7 +179,7 @@
AccessibilityObject* listBoxOption = 0;
unsigned length = m_children.size();
for (unsigned i = 0; i < length; i++) {
- IntRect rect = toRenderListBox(m_renderer)->itemBoundingBoxRect(parentRect.x(), parentRect.y(), i);
+ IntRect rect = toRenderListBox(m_renderer)->itemBoundingBoxRect(parentRect.location(), i);
// The cast to HTMLElement below is safe because the only other possible listItem type
// would be a WMLElement, but WML builds don't use accessibility features at all.
if (rect.contains(point)) {
Modified: trunk/Source/WebCore/accessibility/AccessibilityListBoxOption.cpp (87351 => 87352)
--- trunk/Source/WebCore/accessibility/AccessibilityListBoxOption.cpp 2011-05-26 02:31:38 UTC (rev 87351)
+++ trunk/Source/WebCore/accessibility/AccessibilityListBoxOption.cpp 2011-05-26 03:13:31 UTC (rev 87352)
@@ -100,7 +100,7 @@
IntRect parentRect = listBoxRenderer->document()->axObjectCache()->getOrCreate(listBoxRenderer)->boundingBoxRect();
int index = listBoxOptionIndex();
if (index != -1)
- rect = toRenderListBox(listBoxRenderer)->itemBoundingBoxRect(parentRect.x(), parentRect.y(), index);
+ rect = toRenderListBox(listBoxRenderer)->itemBoundingBoxRect(parentRect.location(), index);
return rect;
}
Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (87351 => 87352)
--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2011-05-26 02:31:38 UTC (rev 87351)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp 2011-05-26 03:13:31 UTC (rev 87352)
@@ -249,10 +249,10 @@
return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, linePositionMode) - baselineAdjustment;
}
-IntRect RenderListBox::itemBoundingBoxRect(int tx, int ty, int index)
+IntRect RenderListBox::itemBoundingBoxRect(const IntPoint& additionalOffset, int index)
{
- return IntRect(tx + borderLeft() + paddingLeft(),
- ty + borderTop() + paddingTop() + itemHeight() * (index - m_indexOffset),
+ return IntRect(additionalOffset.x() + borderLeft() + paddingLeft(),
+ additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (index - m_indexOffset),
contentWidth(), itemHeight());
}
@@ -309,7 +309,7 @@
// Focus the last selected item.
int selectedItem = select->activeSelectionEndListIndex();
if (selectedItem >= 0) {
- rects.append(itemBoundingBoxRect(additionalOffset.x(), additionalOffset.y(), selectedItem));
+ rects.append(itemBoundingBoxRect(additionalOffset, selectedItem));
return;
}
@@ -319,7 +319,7 @@
for (int i = 0; i < size; ++i) {
OptionElement* optionElement = toOptionElement(listItems[i]);
if (optionElement && !optionElement->disabled()) {
- rects.append(itemBoundingBoxRect(additionalOffset.x(), additionalOffset.y(), i));
+ rects.append(itemBoundingBoxRect(additionalOffset, i));
return;
}
}
@@ -392,7 +392,7 @@
const UChar* string = itemText.characters();
TextRun textRun(string, length, false, 0, 0, TextRun::AllowTrailingExpansion, itemStyle->direction(), itemStyle->unicodeBidi() == Override);
Font itemFont = style()->font();
- IntRect r = itemBoundingBoxRect(tx, ty, listIndex);
+ IntRect r = itemBoundingBoxRect(IntPoint(tx, ty), listIndex);
r.move(itemOffsetForAlignment(textRun, itemStyle, itemFont, r));
if (isOptionGroupElement(element)) {
@@ -426,7 +426,7 @@
// Draw the background for this list box item
if (!element->renderStyle() || element->renderStyle()->visibility() != HIDDEN) {
ColorSpace colorSpace = element->renderStyle() ? element->renderStyle()->colorSpace() : style()->colorSpace();
- IntRect itemRect = itemBoundingBoxRect(tx, ty, listIndex);
+ IntRect itemRect = itemBoundingBoxRect(IntPoint(tx, ty), listIndex);
itemRect.intersect(controlClipRect(tx, ty));
paintInfo.context->fillRect(itemRect, backColor, colorSpace);
}
@@ -673,7 +673,7 @@
tx += this->x();
ty += this->y();
for (int i = 0; i < size; ++i) {
- if (itemBoundingBoxRect(tx, ty, i).contains(pointInContainer)) {
+ if (itemBoundingBoxRect(IntPoint(tx, ty), i).contains(pointInContainer)) {
if (Element* node = listItems[i]) {
result.setInnerNode(node);
if (!result.innerNonSharedNode())
Modified: trunk/Source/WebCore/rendering/RenderListBox.h (87351 => 87352)
--- trunk/Source/WebCore/rendering/RenderListBox.h 2011-05-26 02:31:38 UTC (rev 87351)
+++ trunk/Source/WebCore/rendering/RenderListBox.h 2011-05-26 03:13:31 UTC (rev 87352)
@@ -46,7 +46,7 @@
void setOptionsChanged(bool changed) { m_optionsChanged = changed; }
int listIndexAtOffset(int x, int y);
- IntRect itemBoundingBoxRect(int tx, int ty, int index);
+ IntRect itemBoundingBoxRect(const IntPoint&, int index);
bool scrollToRevealElementAtListIndex(int index);
bool listIndexIsVisible(int index);