| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 { | 289 { |
| 290 LayoutUnit height = itemHeight() * size() - rowSpacing; | 290 LayoutUnit height = itemHeight() * size() - rowSpacing; |
| 291 // FIXME: The item height should have been added before updateLogicalHeight
was called to avoid this hack. | 291 // FIXME: The item height should have been added before updateLogicalHeight
was called to avoid this hack. |
| 292 updateIntrinsicContentLogicalHeight(height); | 292 updateIntrinsicContentLogicalHeight(height); |
| 293 | 293 |
| 294 height += borderAndPaddingHeight(); | 294 height += borderAndPaddingHeight(); |
| 295 | 295 |
| 296 RenderBox::computeLogicalHeight(height, logicalTop, computedValues); | 296 RenderBox::computeLogicalHeight(height, logicalTop, computedValues); |
| 297 } | 297 } |
| 298 | 298 |
| 299 int RenderListBox::baselinePosition(FontBaseline baselineType, bool firstLine, L
ineDirectionMode lineDirection, LinePositionMode linePositionMode) const | 299 int RenderListBox::baselinePosition(FontBaseline baselineType, OwnOrFirstLineSty
le firstLine, LineDirectionMode lineDirection, LinePositionMode linePositionMode
) const |
| 300 { | 300 { |
| 301 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l
inePositionMode) - baselineAdjustment; | 301 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l
inePositionMode) - baselineAdjustment; |
| 302 } | 302 } |
| 303 | 303 |
| 304 LayoutRect RenderListBox::itemBoundingBoxRectInternal(const LayoutPoint& additio
nalOffset, int index) const | 304 LayoutRect RenderListBox::itemBoundingBoxRectInternal(const LayoutPoint& additio
nalOffset, int index) const |
| 305 { | 305 { |
| 306 // For RTL, items start after the left-side vertical scrollbar. | 306 // For RTL, items start after the left-side vertical scrollbar. |
| 307 int scrollbarOffset = style()->shouldPlaceBlockDirectionScrollbarOnLogicalLe
ft() ? verticalScrollbarWidth() : 0; | 307 int scrollbarOffset = style()->shouldPlaceBlockDirectionScrollbarOnLogicalLe
ft() ? verticalScrollbarWidth() : 0; |
| 308 return LayoutRect(additionalOffset.x() + borderLeft() + paddingLeft() + scro
llbarOffset, | 308 return LayoutRect(additionalOffset.x() + borderLeft() + paddingLeft() + scro
llbarOffset, |
| 309 additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (inde
x - m_indexOffset), | 309 additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (inde
x - m_indexOffset), |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 { | 1018 { |
| 1019 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde
x)); | 1019 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde
x)); |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 bool RenderListBox::scrollToRevealElementAtListIndex(int index) | 1022 bool RenderListBox::scrollToRevealElementAtListIndex(int index) |
| 1023 { | 1023 { |
| 1024 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde
x(index)); | 1024 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde
x(index)); |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 } // namespace WebCore | 1027 } // namespace WebCore |
| OLD | NEW |