Skip to content

Commit

Permalink
Revert "Listbox SELECT: Do not force layout on OPTION element selecti…
Browse files Browse the repository at this point in the history
…on."

This reverts r482803 (commit 6eddce9).
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}
  • Loading branch information
eaenet authored and Commit Bot committed Oct 4, 2017
1 parent 95dd622 commit ac6dc70
Show file tree
Hide file tree
Showing 25 changed files with 355 additions and 661 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,6 @@
sel.appendChild(opt);
</script>

<p>Display 'none' to 'inline-block'</p>
<select style="display:none;" id="select-none" size="4">
<option>option1</option>
<option>option2</option>
<option>option3</option>
<option>option4</option>
<option>option5</option>
<option>option6</option>
<option selected>This should be selected and visible.</option>
</select>
<script>
// Force layout with display:none.
document.body.offsetHeight;
if (window.testRunner)
testRunner.waitUntilDone();
requestAnimationFrame(() => {
document.querySelector('#select-none').style.display = 'inline-block';
testRunner.notifyDone();
});
</script>

</body>

</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,52 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow (anonymous) at (0,0) size 784x393
LayoutText {#text} at (0,0) size 93x19
text run at (0,0) width 93: "initial selected:"
LayoutBR {BR} at (93,15) size 0x0
LayoutText {#text} at (155,71) size 4x19
text run at (155,71) width 4: " "
LayoutBR {BR} at (159,86) size 0x0
LayoutText {#text} at (0,91) size 161x19
text run at (0,91) width 161: "dynamic selected change:"
LayoutBR {BR} at (161,106) size 0x0
LayoutText {#text} at (155,162) size 4x19
text run at (155,162) width 4: " "
LayoutBR {BR} at (159,177) size 0x0
LayoutText {#text} at (0,182) size 211x19
text run at (0,182) width 211: "dynamic insert of selected option:"
LayoutBR {BR} at (211,197) size 0x0
LayoutText {#text} at (155,253) size 4x19
text run at (155,253) width 4: " "
LayoutBR {BR} at (159,268) size 0x0
LayoutText {#text} at (0,273) size 93x19
text run at (0,273) width 93: "initial selected:"
LayoutBR {BR} at (93,288) size 0x0
LayoutMenuList {SELECT} at (0,293) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 154x18
LayoutText (anonymous) at (4,1) size 134x16
text run at (4,1) width 134: "this should be selected"
LayoutText {#text} at (156,293) size 4x19
text run at (156,293) width 4: " "
LayoutBR {BR} at (160,308) size 0x0
LayoutText {#text} at (0,313) size 161x19
text run at (0,313) width 161: "dynamic selected change:"
LayoutBR {BR} at (161,328) size 0x0
LayoutMenuList {SELECT} at (0,333) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 154x18
LayoutText (anonymous) at (4,1) size 134x16
text run at (4,1) width 134: "this should be selected"
LayoutText {#text} at (156,333) size 4x19
text run at (156,333) width 4: " "
LayoutBR {BR} at (160,348) size 0x0
LayoutText {#text} at (0,353) size 211x19
text run at (0,353) width 211: "dynamic insert of selected option:"
LayoutBR {BR} at (211,368) size 0x0
LayoutMenuList {SELECT} at (0,373) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 154x18
LayoutText (anonymous) at (4,1) size 134x16
text run at (4,1) width 134: "this should be selected"
LayoutText {#text} at (0,0) size 0x0
LayoutBlockFlow {P} at (0,409) size 784x20
LayoutText {#text} at (0,0) size 191x19
text run at (0,0) width 191: "Display 'none' to 'inline-block'"
LayoutBlockFlow (anonymous) at (0,445) size 784x70
LayoutText {#text} at (0,0) size 0x0
LayoutText {#text} at (0,0) size 93x19
text run at (0,0) width 93: "initial selected:"
LayoutBR {BR} at (93,15) size 0x0
LayoutText {#text} at (155,71) size 4x19
text run at (155,71) width 4: " "
LayoutBR {BR} at (159,86) size 0x0
LayoutText {#text} at (0,91) size 161x19
text run at (0,91) width 161: "dynamic selected change:"
LayoutBR {BR} at (161,106) size 0x0
LayoutText {#text} at (155,162) size 4x19
text run at (155,162) width 4: " "
LayoutBR {BR} at (159,177) size 0x0
LayoutText {#text} at (0,182) size 211x19
text run at (0,182) width 211: "dynamic insert of selected option:"
LayoutBR {BR} at (211,197) size 0x0
LayoutText {#text} at (155,253) size 4x19
text run at (155,253) width 4: " "
LayoutBR {BR} at (159,268) size 0x0
LayoutText {#text} at (0,273) size 93x19
text run at (0,273) width 93: "initial selected:"
LayoutBR {BR} at (93,288) size 0x0
LayoutMenuList {SELECT} at (0,293) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 154x18
LayoutText (anonymous) at (4,1) size 134x16
text run at (4,1) width 134: "this should be selected"
LayoutText {#text} at (156,293) size 4x19
text run at (156,293) width 4: " "
LayoutBR {BR} at (160,308) size 0x0
LayoutText {#text} at (0,313) size 161x19
text run at (0,313) width 161: "dynamic selected change:"
LayoutBR {BR} at (161,328) size 0x0
LayoutMenuList {SELECT} at (0,333) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 154x18
LayoutText (anonymous) at (4,1) size 134x16
text run at (4,1) width 134: "this should be selected"
LayoutText {#text} at (156,333) size 4x19
text run at (156,333) width 4: " "
LayoutBR {BR} at (160,348) size 0x0
LayoutText {#text} at (0,353) size 211x19
text run at (0,353) width 211: "dynamic insert of selected option:"
LayoutBR {BR} at (211,368) size 0x0
LayoutMenuList {SELECT} at (0,373) size 156x20 [bgcolor=#C0C0C0] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 154x18
LayoutText (anonymous) at (4,1) size 134x16
text run at (4,1) width 134: "this should be selected"
LayoutText {#text} at (0,0) size 0x0
layer at (8,28) size 155x70 clip at (9,29) size 138x68 scrollY 119.00 scrollHeight 238
LayoutListBox {SELECT} at (0,20) size 155x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
LayoutBlockFlow {OPTION} at (1,1) size 138x17
Expand Down Expand Up @@ -169,26 +163,3 @@ layer at (8,210) size 155x70 clip at (9,211) size 138x68 scrollY 51.00 scrollHei
LayoutBlockFlow {OPTION} at (1,120) size 138x17
LayoutText {#text} at (2,0) size 18x16
text run at (2,0) width 18: "opt"
layer at (8,453) size 229x70 clip at (9,454) size 212x68 scrollY 51.00 scrollHeight 119
LayoutListBox {SELECT} at (0,0) size 229x70 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
LayoutBlockFlow {OPTION} at (1,1) size 212x17
LayoutText {#text} at (2,0) size 42x16
text run at (2,0) width 42: "option1"
LayoutBlockFlow {OPTION} at (1,18) size 212x17
LayoutText {#text} at (2,0) size 42x16
text run at (2,0) width 42: "option2"
LayoutBlockFlow {OPTION} at (1,35) size 212x17
LayoutText {#text} at (2,0) size 42x16
text run at (2,0) width 42: "option3"
LayoutBlockFlow {OPTION} at (1,52) size 212x17
LayoutText {#text} at (2,0) size 42x16
text run at (2,0) width 42: "option4"
LayoutBlockFlow {OPTION} at (1,69) size 212x17
LayoutText {#text} at (2,0) size 42x16
text run at (2,0) width 42: "option5"
LayoutBlockFlow {OPTION} at (1,86) size 212x17
LayoutText {#text} at (2,0) size 42x16
text run at (2,0) width 42: "option6"
LayoutBlockFlow {OPTION} at (1,103) size 212x17 [color=#FFFFFF] [bgcolor=#999999]
LayoutText {#text} at (2,0) size 208x16
text run at (2,0) width 208: "This should be selected and visible."
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,52 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow (anonymous) at (0,0) size 784x340.25
LayoutText {#text} at (0,0) size 98x18
text run at (0,0) width 98: "initial selected:"
LayoutBR {BR} at (97,14) size 1x0
LayoutText {#text} at (132,58) size 5x19
text run at (132,58) width 5: " "
LayoutBR {BR} at (136,72) size 1x1
LayoutText {#text} at (0,76) size 165x19
text run at (0,76) width 165: "dynamic selected change:"
LayoutBR {BR} at (164,90) size 1x1
LayoutText {#text} at (132,135) size 5x19
text run at (132,135) width 5: " "
LayoutBR {BR} at (136,149) size 1x1
LayoutText {#text} at (0,153) size 217x19
text run at (0,153) width 217: "dynamic insert of selected option:"
LayoutBR {BR} at (216,167) size 1x1
LayoutText {#text} at (132,212) size 5x19
text run at (132,212) width 5: " "
LayoutBR {BR} at (136,226) size 1x1
LayoutText {#text} at (0,230) size 98x19
text run at (0,230) width 98: "initial selected:"
LayoutBR {BR} at (97,244) size 1x1
LayoutMenuList {SELECT} at (0,249.25) size 147x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 147x18
LayoutText (anonymous) at (8,2) size 116x13
text run at (8,2) width 116: "this should be selected"
LayoutText {#text} at (147,248) size 4x19
text run at (147,248) width 4: " "
LayoutBR {BR} at (151,262) size 0x1
LayoutText {#text} at (0,267) size 165x19
text run at (0,267) width 165: "dynamic selected change:"
LayoutBR {BR} at (164,281) size 1x1
LayoutMenuList {SELECT} at (0,286.25) size 147x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 147x18
LayoutText (anonymous) at (8,2) size 116x13
text run at (8,2) width 116: "this should be selected"
LayoutText {#text} at (147,285) size 4x19
text run at (147,285) width 4: " "
LayoutBR {BR} at (151,299) size 0x1
LayoutText {#text} at (0,304) size 217x19
text run at (0,304) width 217: "dynamic insert of selected option:"
LayoutBR {BR} at (216,318) size 1x1
LayoutMenuList {SELECT} at (0,322.25) size 147x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 147x18
LayoutText (anonymous) at (8,2) size 116x13
text run at (8,2) width 116: "this should be selected"
LayoutText {#text} at (0,0) size 0x0
LayoutBlockFlow {P} at (0,356.25) size 784x18
LayoutText {#text} at (0,0) size 195x18
text run at (0,0) width 195: "Display 'none' to 'inline-block'"
LayoutBlockFlow (anonymous) at (0,390.25) size 784x58.75
LayoutText {#text} at (0,0) size 0x0
LayoutText {#text} at (0,0) size 98x18
text run at (0,0) width 98: "initial selected:"
LayoutBR {BR} at (97,14) size 1x0
LayoutText {#text} at (132,58) size 5x19
text run at (132,58) width 5: " "
LayoutBR {BR} at (136,72) size 1x1
LayoutText {#text} at (0,76) size 165x19
text run at (0,76) width 165: "dynamic selected change:"
LayoutBR {BR} at (164,90) size 1x1
LayoutText {#text} at (132,135) size 5x19
text run at (132,135) width 5: " "
LayoutBR {BR} at (136,149) size 1x1
LayoutText {#text} at (0,153) size 217x19
text run at (0,153) width 217: "dynamic insert of selected option:"
LayoutBR {BR} at (216,167) size 1x1
LayoutText {#text} at (132,212) size 5x19
text run at (132,212) width 5: " "
LayoutBR {BR} at (136,226) size 1x1
LayoutText {#text} at (0,230) size 98x19
text run at (0,230) width 98: "initial selected:"
LayoutBR {BR} at (97,244) size 1x1
LayoutMenuList {SELECT} at (0,249.25) size 147x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 147x18
LayoutText (anonymous) at (8,2) size 116x13
text run at (8,2) width 116: "this should be selected"
LayoutText {#text} at (147,248) size 4x19
text run at (147,248) width 4: " "
LayoutBR {BR} at (151,262) size 0x1
LayoutText {#text} at (0,267) size 165x19
text run at (0,267) width 165: "dynamic selected change:"
LayoutBR {BR} at (164,281) size 1x1
LayoutMenuList {SELECT} at (0,286.25) size 147x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 147x18
LayoutText (anonymous) at (8,2) size 116x13
text run at (8,2) width 116: "this should be selected"
LayoutText {#text} at (147,285) size 4x19
text run at (147,285) width 4: " "
LayoutBR {BR} at (151,299) size 0x1
LayoutText {#text} at (0,304) size 217x19
text run at (0,304) width 217: "dynamic insert of selected option:"
LayoutBR {BR} at (216,318) size 1x1
LayoutMenuList {SELECT} at (0,322.25) size 147x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 147x18
LayoutText (anonymous) at (8,2) size 116x13
text run at (8,2) width 116: "this should be selected"
LayoutText {#text} at (0,0) size 0x0
layer at (8,26) size 133x59 clip at (9,27) size 120x57 scrollY 99.00 scrollHeight 199
LayoutListBox {SELECT} at (0,18) size 132.55x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)]
LayoutBlockFlow {OPTION} at (1,1) size 119.55x14.19
Expand Down Expand Up @@ -143,7 +137,7 @@ layer at (8,103) size 133x59 clip at (9,104) size 120x57 scrollY 99.00 scrollHei
LayoutBlockFlow {OPTION} at (1,185.44) size 119.55x14.19
LayoutText {#text} at (2,0) size 17x13
text run at (2,0) width 17: "opt"
layer at (8,180) size 133x58 clip at (9,181) size 120x56 scrollY 42.00 scrollHeight 113
layer at (8,180) size 133x58 clip at (9,181) size 120x56 scrollY 43.00 scrollHeight 113
LayoutListBox {SELECT} at (0,171.50) size 132.55x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)]
LayoutBlockFlow {OPTION} at (1,1) size 119.55x14.19
LayoutText {#text} at (2,0) size 17x13
Expand All @@ -169,26 +163,3 @@ layer at (8,180) size 133x58 clip at (9,181) size 120x56 scrollY 42.00 scrollHei
LayoutBlockFlow {OPTION} at (1,100.31) size 119.55x14.19
LayoutText {#text} at (2,0) size 17x13
text run at (2,0) width 17: "opt"
layer at (8,398) size 195x59 clip at (9,399) size 182x57 scrollY 42.00 scrollHeight 99
LayoutListBox {SELECT} at (0,0) size 194.88x58.75 [bgcolor=#FFFFFF] [border: (1px solid #999999)]
LayoutBlockFlow {OPTION} at (1,1) size 181.88x14.19
LayoutText {#text} at (2,0) size 38x13
text run at (2,0) width 38: "option1"
LayoutBlockFlow {OPTION} at (1,15.19) size 181.88x14.19
LayoutText {#text} at (2,0) size 38x13
text run at (2,0) width 38: "option2"
LayoutBlockFlow {OPTION} at (1,29.38) size 181.88x14.19
LayoutText {#text} at (2,0) size 38x13
text run at (2,0) width 38: "option3"
LayoutBlockFlow {OPTION} at (1,43.56) size 181.88x14.19
LayoutText {#text} at (2,0) size 38x13
text run at (2,0) width 38: "option4"
LayoutBlockFlow {OPTION} at (1,57.75) size 181.88x14.19
LayoutText {#text} at (2,0) size 38x13
text run at (2,0) width 38: "option5"
LayoutBlockFlow {OPTION} at (1,71.94) size 181.88x14.19
LayoutText {#text} at (2,0) size 38x13
text run at (2,0) width 38: "option6"
LayoutBlockFlow {OPTION} at (1,86.13) size 181.88x14.19 [bgcolor=#D4D4D4]
LayoutText {#text} at (2,0) size 178x13
text run at (2,0) width 178: "This should be selected and visible."
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ac6dc70

Please sign in to comment.