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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 LayoutListBox::~LayoutListBox() | 80 LayoutListBox::~LayoutListBox() |
81 { | 81 { |
82 } | 82 } |
83 | 83 |
84 inline HTMLSelectElement* LayoutListBox::selectElement() const | 84 inline HTMLSelectElement* LayoutListBox::selectElement() const |
85 { | 85 { |
86 return toHTMLSelectElement(node()); | 86 return toHTMLSelectElement(node()); |
87 } | 87 } |
88 | 88 |
89 int LayoutListBox::size() const | 89 unsigned LayoutListBox::size() const |
90 { | 90 { |
91 int specifiedSize = selectElement()->size(); | 91 unsigned specifiedSize = selectElement()->size(); |
92 if (specifiedSize >= 1) | 92 if (specifiedSize >= 1) |
93 return specifiedSize; | 93 return specifiedSize; |
94 | 94 |
95 return defaultSize; | 95 return defaultSize; |
96 } | 96 } |
97 | 97 |
98 LayoutUnit LayoutListBox::defaultItemHeight() const | 98 LayoutUnit LayoutListBox::defaultItemHeight() const |
99 { | 99 { |
100 return style()->fontMetrics().height() + defaultPaddingBottom; | 100 return style()->fontMetrics().height() + defaultPaddingBottom; |
101 } | 101 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 void LayoutListBox::scrollToRect(const LayoutRect& rect) | 147 void LayoutListBox::scrollToRect(const LayoutRect& rect) |
148 { | 148 { |
149 if (hasOverflowClip()) { | 149 if (hasOverflowClip()) { |
150 ASSERT(layer()); | 150 ASSERT(layer()); |
151 ASSERT(layer()->scrollableArea()); | 151 ASSERT(layer()->scrollableArea()); |
152 layer()->scrollableArea()->scrollIntoView(rect, ScrollAlignment::alignTo
EdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); | 152 layer()->scrollableArea()->scrollIntoView(rect, ScrollAlignment::alignTo
EdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded); |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 } // namespace blink | 156 } // namespace blink |
OLD | NEW |