Skip to content

Commit ad8a1a6

Browse files
mfreed7chromium-wpt-export-bot
authored andcommitted
Remove popup=hint functionality
Per the [1] resolution, we're going to wait to spec/implement popup=hint, until we have a chance to resolve some of the blocking issues. This CL removes all functionality for popup=hint. I thought about adding another flag to gate this functionality, but the logic is already complex, and I didn't want to complicate it further. When the time comes to put it back, this CL can be reverted. [1] openui/open-ui#617 (comment) Bug: 1307772 Change-Id: Ic9122d7e362eb1c57ef7ea8b6e080a866fca5724 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3957293 Commit-Queue: Aaron Leventhal Reviewed-by: Aaron Leventhal Auto-Submit: Mason Freed Reviewed-by: Joey Arhar Commit-Queue: Mason Freed Cr-Commit-Position: refs/heads/main@{#1063078}
1 parent c99c08d commit ad8a1a6

10 files changed

+41
-267
lines changed

html/semantics/popups/popup-appearance-ref.tentative.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55

66
<style>
77
.fake-pop-up {top: 100px; bottom: auto;}
8-
#blank {left: -400px;}
9-
#auto {left: -200px;}
10-
#hint {left: 0;}
11-
#manual {left: 200px;}
12-
#invalid {left: 400px;}
8+
#blank {left: -300px;}
9+
#auto {left: -100px;}
10+
#manual {left: 100px;}
11+
#invalid {left: 300px;}
1312
style>
1413

15-
<p>There should be five pop-ups with similar appearance.p>
14+
<p>There should be four pop-ups with similar appearance.p>
1615
<div class="fake-pop-up" id=blank>Blankdiv>
1716
<div class="fake-pop-up" id=auto>Autodiv>
18-
<div class="fake-pop-up" id=hint>Hintdiv>
1917
<div class="fake-pop-up" id=manual>Manualdiv>
2018
<div class="fake-pop-up" id=invalid>Invaliddiv>

html/semantics/popups/popup-appearance.tentative.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@
77

88
<style>
99
[popup] {top: 100px; bottom: auto;}
10-
[popup=""] {left: -400px}
11-
[popup=auto] {left: -200px; }
12-
[popup=hint] {left: 0; }
13-
[popup=manual] {left: 200px; }
14-
[popup=invalid] {left: 400px; }
10+
[popup=""] {left: -300px}
11+
[popup=auto] {left: -100px; }
12+
[popup=manual] {left: 100px; }
13+
[popup=invalid] {left: 300px; }
1514
style>
1615

17-
<p>There should be five pop-ups with similar appearance.p>
16+
<p>There should be four pop-ups with similar appearance.p>
1817
<div popup>Blank
1918
<div popup=auto>Autodiv>
2019
div>
21-
<div popup=hint>Hintdiv>
2220
<div popup=manual>Manualdiv>
2321
2422
<div popup=invalid>Invaliddiv>

html/semantics/popups/popup-attribute-basic.tentative.html

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<div popup id=boolean>Pop updiv>
1212
<div popup="">Pop updiv>
1313
<div popup=auto>Pop updiv>
14-
<div popup=hint>Pop updiv>
1514
<div popup=manual>Pop updiv>
1615
<article popup>Different element typearticle>
1716
<header popup>Different element typeheader>
@@ -116,20 +115,18 @@
116115
// Getting the `popUp` IDL value only retrieves valid values.
117116
const popUp = createPopUp(t);
118117
assert_equals(popUp.popUp,'auto');
119-
popUp.setAttribute('popup','hint');
120-
assert_equals(popUp.popUp,'hint');
121-
popUp.setAttribute('popup','HiNt');
122-
assert_equals(popUp.popUp,'hint','Case is normalized in IDL');
123-
assert_equals(popUp.getAttribute('popup'),'HiNt','Case is *not* normalized/changed in the content attribute');
124-
popUp.popUp='hInT';
125-
assert_equals(popUp.popUp,'hint','Case is normalized in IDL');
126-
assert_equals(popUp.getAttribute('popup'),'hInT','Value set from IDL is propagated exactly to the content attribute');
118+
popUp.setAttribute('popup','auto');
119+
assert_equals(popUp.popUp,'auto');
120+
popUp.setAttribute('popup','AuTo');
121+
assert_equals(popUp.popUp,'auto','Case is normalized in IDL');
122+
assert_equals(popUp.getAttribute('popup'),'AuTo','Case is *not* normalized/changed in the content attribute');
123+
popUp.popUp='aUtO';
124+
assert_equals(popUp.popUp,'auto','Case is normalized in IDL');
125+
assert_equals(popUp.getAttribute('popup'),'aUtO','Value set from IDL is propagated exactly to the content attribute');
127126
popUp.setAttribute('popup','invalid');
128127
assert_equals(popUp.popUp,'manual','Invalid values should reflect as "manual"');
129128
popUp.removeAttribute('popup');
130129
assert_equals(popUp.popUp,null,'No value should reflect as null');
131-
popUp.popUp='hint';
132-
assert_equals(popUp.getAttribute('popup'),'hint');
133130
popUp.popUp='auto';
134131
assert_equals(popUp.getAttribute('popup'),'auto');
135132
popUp.popUp='';
@@ -176,11 +173,11 @@
176173
test((t) => {
177174
const popUp = createPopUp(t);
178175
assertIsFunctionalPopUp(popUp);
179-
popUp.setAttribute('popup','hint'); // Change pop-up type
176+
popUp.setAttribute('popup','manual'); // Change pop-up type
180177
assertIsFunctionalPopUp(popUp);
181178
popUp.setAttribute('popup','invalid'); // Change pop-up type to something invalid
182179
assertIsFunctionalPopUp(popUp);
183-
popUp.popUp = 'hint'; // Change pop-up type via IDL
180+
popUp.popUp = 'manual'; // Change pop-up type via IDL
184181
assertIsFunctionalPopUp(popUp);
185182
popUp.popUp = 'invalid'; // Make invalid via IDL (treated as "manual")
186183
assertIsFunctionalPopUp(popUp);
@@ -190,11 +187,7 @@
190187
const popUp = createPopUp(t);
191188
popUp.showPopUp();
192189
assert_true(popUp.matches(':open'));
193-
popUp.setAttribute('popup','hint'); // Change pop-up type
194-
assert_false(popUp.matches(':open'));
195-
popUp.showPopUp();
196-
assert_true(popUp.matches(':open'));
197-
popUp.setAttribute('popup','manual');
190+
popUp.setAttribute('popup','manual'); // Change pop-up type
198191
assert_false(popUp.matches(':open'));
199192
popUp.showPopUp();
200193
assert_true(popUp.matches(':open'));
@@ -217,7 +210,8 @@
217210
}
218211
}
219212

220-
["auto","hint","manual"].forEach(type => {
213+
const validTypes = ["auto","manual"];
214+
validTypes.forEach(type => {
221215
test((t) => {
222216
const popUp = createPopUp(t);
223217
popUp.setAttribute('popup',type);
@@ -241,7 +235,6 @@
241235
}
242236
});
243237

244-
const validTypes = ["auto","hint","manual"];
245238
function interpretedType(typeString,method) {
246239
if (validTypes.includes(typeString))
247240
return typeString;
@@ -308,8 +301,7 @@
308301
popUp.hidePopUp();
309302
break;
310303
case 'auto':
311-
case 'hint':
312-
assert_false(popUp.matches(':open'),'A popup=auto/hint should light-dismiss');
304+
assert_false(popUp.matches(':open'),'A popup=auto should light-dismiss');
313305
break;
314306
}
315307
}

html/semantics/popups/popup-backdrop-appearance-ref.tentative.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<p>Test for [popup]::backdrop presence and stacking order. The test passes
3434
if there are 3 stacked boxes, with the brightest green on top.p>
3535
<div popup id=bottom>Bottom
36-
<div popup=hint id=middle>Middle
36+
<div popup id=middle>Middle
3737
<div popup=manual id=top>Topdiv>
3838
div>
3939
div>

html/semantics/popups/popup-backdrop-appearance.tentative.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<p>Test for [popup]::backdrop presence and stacking order. The test passes
3636
if there are 3 stacked boxes, with the brightest green on top.p>
3737
<div popup id=bottom>Bottom
38-
<div popup=hint id=middle>Middle
38+
<div popup id=middle>Middle
3939
<div popup=manual id=top>Topdiv>
4040
div>
4141
div>

html/semantics/popups/popup-defaultopen-hints.tentative.html

Lines changed: 0 additions & 20 deletions
This file was deleted.

html/semantics/popups/popup-invoking-attribute.tentative.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
...unsupportedTypes,
6868
];
6969
window.addEventListener('load', () => {
70-
["auto","hint","manual"].forEach(type => {
70+
["auto","manual"].forEach(type => {
7171
invokers.forEach(testcase => {
7272
let t_set = [1], s_set = [1], h_set = [1];
7373
if (testcase.supported) {

html/semantics/popups/popup-light-dismiss.tentative.html

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -458,53 +458,6 @@
458458
},'Ensure circular/convoluted ancestral relationships are functional, with a direct showPopUp()');
459459
script>
460460

461-
462-
<div popup id=p10>Popupdiv>
463-
<div popup=hint id=p11>Hintdiv>
464-
<div popup=manual id=p12>Manualdiv>
465-
<style>
466-
#p10 {top:100px;}
467-
#p11 {top:200px;}
468-
#p12 {top:300px;}
469-
style>
470-
<script>
471-
promise_test(async () => {
472-
const auto = document.querySelector('#p10');
473-
const hint = document.querySelector('#p11');
474-
const manual = document.querySelector('#p12');
475-
// All three can be open at once, if shown in this order:
476-
auto.showPopUp();
477-
hint.showPopUp();
478-
manual.showPopUp();
479-
assert_true(auto.matches(':open'));
480-
assert_true(hint.matches(':open'));
481-
assert_true(manual.matches(':open'));
482-
// Clicking the hint will close the auto, but not the manual.
483-
await clickOn(hint);
484-
assert_false(auto.matches(':open'),'auto should be hidden');
485-
assert_true(hint.matches(':open'),'hint should stay open');
486-
assert_true(manual.matches(':open'),'manual does not light dismiss');
487-
// Clicking outside should close the hint, but not the manual:
488-
await clickOn(outside);
489-
assert_false(auto.matches(':open'));
490-
assert_false(hint.matches(':open'),'hint should close');
491-
assert_true(manual.matches(':open'),'manual does not light dismiss');
492-
manual.hidePopUp();
493-
assert_false(manual.matches(':open'));
494-
auto.showPopUp();
495-
hint.showPopUp();
496-
assert_true(auto.matches(':open'));
497-
assert_true(hint.matches(':open'));
498-
// Clicking on the auto should close the hint:
499-
await clickOn(auto);
500-
assert_true(auto.matches(':open'),'auto should stay open');
501-
assert_false(hint.matches(':open'),'hint should light dismiss');
502-
auto.hidePopUp();
503-
assert_false(auto.matches(':open'));
504-
},'Light dismiss of mixed popup types');
505-
script>
506-
507-
508461
<div popup id=p13>Pop-up 1
509462
<div popup id=p14>Pop-up 2
510463
<div popup id=p15>Pop-up 3div>

html/semantics/popups/popup-manual-crash.tentative.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66

77
<style>
88
[popup] {top: 100px; bottom: auto;}
9-
[popup=""] {left: -300px}
10-
[popup=auto] {left: -100px; }
11-
[popup=hint] {left: 100px; }
12-
[popup=manual] {left: 300px; }
9+
[popup=""] {left: -200px}
10+
[popup=auto] {left: 0; }
11+
[popup=manual] {left: 200px; }
1312
style>
1413

1514
<p>This test passes if it does not crash.p>
16-
<div popup>Blank
17-
<div popup=auto>Autodiv>
15+
<div popup>Auto1
16+
<div popup=auto>Auto2div>
1817
div>
19-
<div popup=hint>Hintdiv>
2018
<div popup=manual>Manualdiv>
2119
<script>
2220
document.querySelectorAll('[popup]').forEach(p => p.showPopUp());

0 commit comments

Comments
 (0)