New issue
Advanced search Search tips

Issue 620408 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

SELECT field with selected OPTION triggers animation

Reported by justin.v...@gmail.com, Jun 15 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Create a select field with multiple options, setting one of the options to "selected."
2. Specify an external stylesheet with a style that shifts that select field away from its default position.
3. Open page in Chrome, refreshing page if necessary.

See the attached files for working and non-working example.

What is the expected behavior?
Using the attached without_selected.htm page the expected behavior is shown: The select field is loaded with a 200px margin-left.

What went wrong?
Opening the with_selected.htm page shows the bad behavior: The select field first loads to the default position and is then shifted to the left.

It appears as though when a select field that accepts multiple options contains a selected option, that field triggers a redraw of the element.  This same behavior can also be observed on a standard, single-select-only select element, with or without a selected option.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 51.0.2704.84  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 21.0 r0
 
with_selected.htm
386 bytes View Download
without_selected.htm
377 bytes View Download
styles.css
137 bytes View Download
Components: -Blink Blink>Forms>Select

Comment 2 by tkent@chromium.org, Jun 17 2016

Labels: Hotlist-Interop OS-Mac
Status: Available (was: Unconfirmed)
Summary: SELECT field with selected OPTION triggers animation (was: Select field with selection option triggers redraw)
Confirmed.

Comment 3 by phistuck@gmail.com, Jun 17 2016

Instead of downloading and viewing, go to this for the non working test case (selected) -
http://plnkr.co/edit/VaTYdU2KW1lCEZhaR3gi?p=preview
And go to this for the working test case (no selected) -
http://plnkr.co/edit/0iUR28gCU55ayZmjIalh?p=preview
Would it be worth creating two more examples that show this also happens with non-multiple selects, regardless of whether or not an option is selected?

Comment 5 by tkent@chromium.org, Jun 19 2016

#4, yes please.  We need to make sure all of related issues is resolved when we fix this issue.

Here are two more scenarios that for the non-working test case
Single select, no options selected: http://plnkr.co/edit/ATQzpH4WQKdSm3TvACDN?p=preview
Single select, one option selected: http://plnkr.co/edit/gn0v9OMkwke7w5741KJu?p=preview
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 20 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by tkent@chromium.org, Jun 22 2017

Owner: tkent@chromium.org
Status: Assigned (was: Untriaged)

Comment 9 by tkent@chromium.org, Jun 22 2017

Labels: -Hotlist-Recharge-Cold

Comment 10 by phistuck@gmail.com, Jun 22 2017

Related to issue 709718?

Comment 11 by tkent@chromium.org, Jun 22 2017

> Related to issue 709718?

Yes.  Both of Issue 709718 and this are caused by force layout before finishing external stylesheet loading.  The reasons of force layout are vary.



Comment 12 by tkent@chromium.org, Jun 27 2017

Status: Started (was: Assigned)
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 28 2017

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

commit 6eddce943df5153b5d4d0294b3b13bb35e492afe
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Jun 28 00:05:56 2017

Listbox SELECT: Do not force layout on OPTION element selection. 

Adjust scroll position in PaintLayerScrollableArea::UpdateAfterLayout(), instead of
Document::UpdateStyleAndLayoutIgnorePendingStylesheets() followed by scrolling.

Bug: 556801, 620408
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I2bd014b2f7950f1a51dbfa5067638013736d62dc
Reviewed-on: https://chromium-review.googlesource.com/542059
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482803}
[add] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/html/HTMLSelectElement.h
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/6eddce943df5153b5d4d0294b3b13bb35e492afe/third_party/WebKit/Source/core/testing/Internals.idl

Comment 14 by tkent@chromium.org, Jun 28 2017

Labels: M-61
Status: Fixed (was: Started)
Project Member

Comment 15 by bugdroid1@chromium.org, Oct 4 2017

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

commit ac6dc703d2e56a2cef302ddb4140ba65bf893444
Author: Emil A Eklund <eae@chromium.org>
Date: Wed Oct 04 22:16:51 2017

Revert "Listbox SELECT: Do not force layout on OPTION element selection."

This reverts r482803 (commit 6eddce943df5153b5d4d0294b3b13bb35e492afe).
Broke option hit testing when combining a select and flexbox sometimes.

Bug:  771216 

Original change's description:
> Listbox SELECT: Do not force layout on OPTION element selection. 
> 
> Adjust scroll position in PaintLayerScrollableArea::UpdateAfterLayout(), instead of
> Document::UpdateStyleAndLayoutIgnorePendingStylesheets() followed by scrolling.
> 
> Bug: 556801, 620408
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I2bd014b2f7950f1a51dbfa5067638013736d62dc
> Reviewed-on: https://chromium-review.googlesource.com/542059
> Reviewed-by: Steve Kobes <skobes@chromium.org>
> Commit-Queue: Kent Tamura <tkent@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#482803}

TBR=skobes@chromium.org,tkent@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 556801, 620408
Change-Id: I6861c3ea1ab3aa4e7ee8365bc21e444a477608ca
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/699594
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506539}
[delete] https://crrev.com/95dd6223d1225dfeb444df6dcdeb16c29b7aaaa0/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/html/HTMLSelectElement.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/ac6dc703d2e56a2cef302ddb4140ba65bf893444/third_party/WebKit/Source/core/testing/Internals.idl

Labels: -M-61
Owner: ----
Status: Available (was: Fixed)
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 10 2017

Labels: merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95dd931e19fc229aad1d96eb583984def7cd0f9c

commit 95dd931e19fc229aad1d96eb583984def7cd0f9c
Author: Emil A Eklund <eae@chromium.org>
Date: Tue Oct 10 21:43:44 2017

Revert "Listbox SELECT: Do not force layout on OPTION element selection."

This reverts r482803 (commit 6eddce943df5153b5d4d0294b3b13bb35e492afe).
Broke option hit testing when combining a select and flexbox sometimes.

Bug:  771216 

Original change's description:
> Listbox SELECT: Do not force layout on OPTION element selection.
>
> Adjust scroll position in PaintLayerScrollableArea::UpdateAfterLayout(), instead of
> Document::UpdateStyleAndLayoutIgnorePendingStylesheets() followed by scrolling.
>
> Bug: 556801, 620408
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I2bd014b2f7950f1a51dbfa5067638013736d62dc
> Reviewed-on: https://chromium-review.googlesource.com/542059
> Reviewed-by: Steve Kobes <skobes@chromium.org>
> Commit-Queue: Kent Tamura <tkent@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#482803}

TBR=eae@chromium.org, skobes@chromium.org, tkent@chromium.org

(cherry picked from commit ac6dc703d2e56a2cef302ddb4140ba65bf893444)

Bug: 556801, 620408
Change-Id: I6861c3ea1ab3aa4e7ee8365bc21e444a477608ca
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/699594
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#506539}
Reviewed-on: https://chromium-review.googlesource.com/710517
Cr-Commit-Position: refs/branch-heads/3202@{#647}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[delete] https://crrev.com/a0e2577b53b4fe4ab31a9463820c7e4f4ea0f274/third_party/WebKit/LayoutTests/fast/forms/select/listbox-no-force-layout.html
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/fast/forms/select/select-initial-position.html
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.png
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/select-initial-position-expected.txt
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/html/HTMLSelectElement.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/95dd931e19fc229aad1d96eb583984def7cd0f9c/third_party/WebKit/Source/core/testing/Internals.idl

Project Member

Comment 18 by sheriffbot@chromium.org, Oct 11

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Looks similar/duplicate of issue 332189.

Sign in to add a comment