Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: Source/core/layout/LayoutListBox.cpp

Issue 1200853003: HTMLSelectElement size type changed to unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/layout/LayoutListBox.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutListBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698