New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 616187 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

'size' attribute of select element sizes window based on style of first option only

Project Member Reported by szager@chromium.org, May 31 2016

Issue description

According to mozilla doc:

"If the control is presented as a scrolled list box, this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0."

In chromium, the size of the select box is determined by checking the size of the first option and multiplying it by the 'size' attribute:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutListBox.cpp?rcl=0&l=97

That fails when the first option is smaller than the rest:

http://jsbin.com/lutaxiyuqe/edit?html,output
 

Comment 1 by szager@chromium.org, May 31 2016

FWIW, firefox sizes the box as (size * (height of the tallest option))

Comment 2 by e...@chromium.org, Jun 1 2016

Status: Available (was: Untriaged)
Labels: Hotlist-GoodFirstBug

Comment 4 by glebl@chromium.org, Jun 10 2016

Owner: glebl@chromium.org
Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e676eabb8a1e897bbc31a228fe5e49dab06d53e3

commit e676eabb8a1e897bbc31a228fe5e49dab06d53e3
Author: glebl <glebl@chromium.org>
Date: Wed Jun 22 02:17:46 2016

Set LayoutListBox's height as 'size' attribute * (height of the tallest option).

This will change the current behaviour where we set the size of HTML select element based on the height of first option.
The new behaviour is consistent with other browsers, e.g. Firefox sizes the box as (size * (height of the tallest option)).

BUG= 616187 

Review-Url: https://codereview.chromium.org/2060493002
Cr-Commit-Position: refs/heads/master@{#401166}

[modify] https://crrev.com/e676eabb8a1e897bbc31a228fe5e49dab06d53e3/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/e676eabb8a1e897bbc31a228fe5e49dab06d53e3/third_party/WebKit/Source/core/layout/LayoutListBox.cpp

Comment 6 by glebl@chromium.org, Jun 22 2016

Status: Fixed (was: Started)
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9b20158a92757302b99a88c30b04e9ebc7754c91

commit 9b20158a92757302b99a88c30b04e9ebc7754c91
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Wed Jun 22 07:30:11 2016

Auto-rebaseline for r401166

https://chromium.googlesource.com/chromium/src/+/e676eabb8

BUG= 616187 
TBR=glebl@chromium.org

Review URL: https://codereview.chromium.org/2089573004 .

Cr-Commit-Position: refs/heads/master@{#401222}

[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/android/fast/forms/select/listbox-appearance-basic-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/listbox-appearance-basic-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/listbox-appearance-basic-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/listbox-appearance-basic-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/listbox-appearance-basic-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/drawBidiText-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/drawBidiText-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/listbox-appearance-basic-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/listbox-appearance-basic-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/drawBidiText-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/drawBidiText-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac/fast/text/drawBidiText-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/mac/fast/text/drawBidiText-expected.txt
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/listbox-appearance-basic-expected.png
[modify] https://crrev.com/9b20158a92757302b99a88c30b04e9ebc7754c91/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/listbox-appearance-basic-expected.txt

Sign in to add a comment