| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 return m_listItemCount; | 283 return m_listItemCount; |
| 284 } | 284 } |
| 285 | 285 |
| 286 LayoutUnit RenderListBox::listHeight() const | 286 LayoutUnit RenderListBox::listHeight() const |
| 287 { | 287 { |
| 288 return itemHeight() * numItems() - rowSpacing; | 288 return itemHeight() * numItems() - rowSpacing; |
| 289 } | 289 } |
| 290 | 290 |
| 291 void RenderListBox::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, Logi
calExtentComputedValues& computedValues) const | 291 void RenderListBox::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, Logi
calExtentComputedValues& computedValues) const |
| 292 { | 292 { |
| 293 LayoutUnit height = itemHeight() * size() - rowSpacing + borderAndPaddingHei
ght(); | 293 LayoutUnit height = itemHeight() * size() - rowSpacing; |
| 294 // FIXME: The item height should have been added before updateLogicalHeight
was called to avoid this hack. |
| 295 updateIntrinsicContentLogicalHeight(height); |
| 296 |
| 297 height += borderAndPaddingHeight(); |
| 298 |
| 294 RenderBox::computeLogicalHeight(height, logicalTop, computedValues); | 299 RenderBox::computeLogicalHeight(height, logicalTop, computedValues); |
| 295 } | 300 } |
| 296 | 301 |
| 297 int RenderListBox::baselinePosition(FontBaseline baselineType, bool firstLine, L
ineDirectionMode lineDirection, LinePositionMode linePositionMode) const | 302 int RenderListBox::baselinePosition(FontBaseline baselineType, bool firstLine, L
ineDirectionMode lineDirection, LinePositionMode linePositionMode) const |
| 298 { | 303 { |
| 299 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l
inePositionMode) - baselineAdjustment; | 304 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l
inePositionMode) - baselineAdjustment; |
| 300 } | 305 } |
| 301 | 306 |
| 302 LayoutRect RenderListBox::itemBoundingBoxRectInternal(const LayoutPoint& additio
nalOffset, int index) const | 307 LayoutRect RenderListBox::itemBoundingBoxRectInternal(const LayoutPoint& additio
nalOffset, int index) const |
| 303 { | 308 { |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 { | 1021 { |
| 1017 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde
x)); | 1022 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde
x)); |
| 1018 } | 1023 } |
| 1019 | 1024 |
| 1020 bool RenderListBox::scrollToRevealElementAtListIndex(int index) | 1025 bool RenderListBox::scrollToRevealElementAtListIndex(int index) |
| 1021 { | 1026 { |
| 1022 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde
x(index)); | 1027 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde
x(index)); |
| 1023 } | 1028 } |
| 1024 | 1029 |
| 1025 } // namespace WebCore | 1030 } // namespace WebCore |
| OLD | NEW |