From 80b2fe2855dd0e470033e8483f4cd74068053ae1 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Fri, 21 Oct 2022 13:13:26 -0700 Subject: [PATCH] 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] https://github.com/openui/open-ui/issues/617#issuecomment-1278015741 Bug: 1307772 Change-Id: Ic9122d7e362eb1c57ef7ea8b6e080a866fca5724 --- .../popup-appearance-ref.tentative.html | 12 +- .../popups/popup-appearance.tentative.html | 12 +- .../popup-attribute-basic.tentative.html | 36 ++-- ...pup-backdrop-appearance-ref.tentative.html | 2 +- .../popup-backdrop-appearance.tentative.html | 2 +- .../popup-defaultopen-hints.tentative.html | 20 --- .../popup-invoking-attribute.tentative.html | 2 +- .../popups/popup-light-dismiss.tentative.html | 47 ----- .../popups/popup-manual-crash.tentative.html | 12 +- .../popups/popup-types.tentative.html | 163 +----------------- 10 files changed, 41 insertions(+), 267 deletions(-) delete mode 100644 html/semantics/popups/popup-defaultopen-hints.tentative.html diff --git a/html/semantics/popups/popup-appearance-ref.tentative.html b/html/semantics/popups/popup-appearance-ref.tentative.html index 43e3fd4ab7ad97..57edb7c583bf81 100644 --- a/html/semantics/popups/popup-appearance-ref.tentative.html +++ b/html/semantics/popups/popup-appearance-ref.tentative.html @@ -5,16 +5,14 @@ -

There should be five pop-ups with similar appearance.

+

There should be four pop-ups with similar appearance.

Blank
Auto
-
Hint
Manual
Invalid
diff --git a/html/semantics/popups/popup-appearance.tentative.html b/html/semantics/popups/popup-appearance.tentative.html index 942734e203e13e..3a848336c5f3ae 100644 --- a/html/semantics/popups/popup-appearance.tentative.html +++ b/html/semantics/popups/popup-appearance.tentative.html @@ -7,18 +7,16 @@ -

There should be five pop-ups with similar appearance.

+

There should be four pop-ups with similar appearance.

Blank
Auto
-
Hint
Manual
Invalid
diff --git a/html/semantics/popups/popup-attribute-basic.tentative.html b/html/semantics/popups/popup-attribute-basic.tentative.html index c20499c3f30fd9..de8d4d5f897003 100644 --- a/html/semantics/popups/popup-attribute-basic.tentative.html +++ b/html/semantics/popups/popup-attribute-basic.tentative.html @@ -11,7 +11,6 @@
Pop up
Pop up
Pop up
-
Pop up
Pop up
Different element type
Different element type
@@ -116,20 +115,18 @@ // Getting the `popUp` IDL value only retrieves valid values. const popUp = createPopUp(t); assert_equals(popUp.popUp,'auto'); - popUp.setAttribute('popup','hint'); - assert_equals(popUp.popUp,'hint'); - popUp.setAttribute('popup','HiNt'); - assert_equals(popUp.popUp,'hint','Case is normalized in IDL'); - assert_equals(popUp.getAttribute('popup'),'HiNt','Case is *not* normalized/changed in the content attribute'); - popUp.popUp='hInT'; - assert_equals(popUp.popUp,'hint','Case is normalized in IDL'); - assert_equals(popUp.getAttribute('popup'),'hInT','Value set from IDL is propagated exactly to the content attribute'); + popUp.setAttribute('popup','auto'); + assert_equals(popUp.popUp,'auto'); + popUp.setAttribute('popup','AuTo'); + assert_equals(popUp.popUp,'auto','Case is normalized in IDL'); + assert_equals(popUp.getAttribute('popup'),'AuTo','Case is *not* normalized/changed in the content attribute'); + popUp.popUp='aUtO'; + assert_equals(popUp.popUp,'auto','Case is normalized in IDL'); + assert_equals(popUp.getAttribute('popup'),'aUtO','Value set from IDL is propagated exactly to the content attribute'); popUp.setAttribute('popup','invalid'); assert_equals(popUp.popUp,'manual','Invalid values should reflect as "manual"'); popUp.removeAttribute('popup'); assert_equals(popUp.popUp,null,'No value should reflect as null'); - popUp.popUp='hint'; - assert_equals(popUp.getAttribute('popup'),'hint'); popUp.popUp='auto'; assert_equals(popUp.getAttribute('popup'),'auto'); popUp.popUp=''; @@ -176,11 +173,11 @@ test((t) => { const popUp = createPopUp(t); assertIsFunctionalPopUp(popUp); - popUp.setAttribute('popup','hint'); // Change pop-up type + popUp.setAttribute('popup','manual'); // Change pop-up type assertIsFunctionalPopUp(popUp); popUp.setAttribute('popup','invalid'); // Change pop-up type to something invalid assertIsFunctionalPopUp(popUp); - popUp.popUp = 'hint'; // Change pop-up type via IDL + popUp.popUp = 'manual'; // Change pop-up type via IDL assertIsFunctionalPopUp(popUp); popUp.popUp = 'invalid'; // Make invalid via IDL (treated as "manual") assertIsFunctionalPopUp(popUp); @@ -190,11 +187,7 @@ const popUp = createPopUp(t); popUp.showPopUp(); assert_true(popUp.matches(':open')); - popUp.setAttribute('popup','hint'); // Change pop-up type - assert_false(popUp.matches(':open')); - popUp.showPopUp(); - assert_true(popUp.matches(':open')); - popUp.setAttribute('popup','manual'); + popUp.setAttribute('popup','manual'); // Change pop-up type assert_false(popUp.matches(':open')); popUp.showPopUp(); assert_true(popUp.matches(':open')); @@ -217,7 +210,8 @@ } } - ["auto","hint","manual"].forEach(type => { + const validTypes = ["auto","manual"]; + validTypes.forEach(type => { test((t) => { const popUp = createPopUp(t); popUp.setAttribute('popup',type); @@ -241,7 +235,6 @@ } }); - const validTypes = ["auto","hint","manual"]; function interpretedType(typeString,method) { if (validTypes.includes(typeString)) return typeString; @@ -308,8 +301,7 @@ popUp.hidePopUp(); break; case 'auto': - case 'hint': - assert_false(popUp.matches(':open'),'A popup=auto/hint should light-dismiss'); + assert_false(popUp.matches(':open'),'A popup=auto should light-dismiss'); break; } } diff --git a/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html b/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html index 4cb0d995699446..34dc357ba208d5 100644 --- a/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html +++ b/html/semantics/popups/popup-backdrop-appearance-ref.tentative.html @@ -33,7 +33,7 @@

Test for [popup]::backdrop presence and stacking order. The test passes if there are 3 stacked boxes, with the brightest green on top.

Bottom -
Middle +
Middle
Top
diff --git a/html/semantics/popups/popup-backdrop-appearance.tentative.html b/html/semantics/popups/popup-backdrop-appearance.tentative.html index a2f761fa8170d1..1a4c6bac65f498 100644 --- a/html/semantics/popups/popup-backdrop-appearance.tentative.html +++ b/html/semantics/popups/popup-backdrop-appearance.tentative.html @@ -35,7 +35,7 @@

Test for [popup]::backdrop presence and stacking order. The test passes if there are 3 stacked boxes, with the brightest green on top.

Bottom -
Middle +
Middle
Top
diff --git a/html/semantics/popups/popup-defaultopen-hints.tentative.html b/html/semantics/popups/popup-defaultopen-hints.tentative.html deleted file mode 100644 index a7535fab203422..00000000000000 --- a/html/semantics/popups/popup-defaultopen-hints.tentative.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - -
This is a popup=hint with defaultopen, which should NOT be open upon load
- - diff --git a/html/semantics/popups/popup-invoking-attribute.tentative.html b/html/semantics/popups/popup-invoking-attribute.tentative.html index b281e1f4c06b1e..63a3c7f443a343 100644 --- a/html/semantics/popups/popup-invoking-attribute.tentative.html +++ b/html/semantics/popups/popup-invoking-attribute.tentative.html @@ -67,7 +67,7 @@ ...unsupportedTypes, ]; window.addEventListener('load', () => { - ["auto","hint","manual"].forEach(type => { + ["auto","manual"].forEach(type => { invokers.forEach(testcase => { let t_set = [1], s_set = [1], h_set = [1]; if (testcase.supported) { diff --git a/html/semantics/popups/popup-light-dismiss.tentative.html b/html/semantics/popups/popup-light-dismiss.tentative.html index 8848806cab7730..d012942c14aa5f 100644 --- a/html/semantics/popups/popup-light-dismiss.tentative.html +++ b/html/semantics/popups/popup-light-dismiss.tentative.html @@ -458,53 +458,6 @@ },'Ensure circular/convoluted ancestral relationships are functional, with a direct showPopUp()'); - -
Popup
-
Hint
-
Manual
- - - -
Pop-up 1
Pop-up 2
Pop-up 3
diff --git a/html/semantics/popups/popup-manual-crash.tentative.html b/html/semantics/popups/popup-manual-crash.tentative.html index b3430a451333c4..bbc01a47ad9359 100644 --- a/html/semantics/popups/popup-manual-crash.tentative.html +++ b/html/semantics/popups/popup-manual-crash.tentative.html @@ -6,17 +6,15 @@

This test passes if it does not crash.

-
Blank -
Auto
+
Auto1 +
Auto2
-
Hint
Manual
-
- -
-
Popup 1 -
Popup 2 -

Anchor

-
Popup 3
-
-
-
Hint anchored to pop-up
-
- -
-
Hint -
Nested hint
-
- -
- -
-
Hint -
Nested auto (note - never visible, since inside display:none subtree)
-
- -
- -
-
Auto -
Nested Auto
-
Nested hint
-
- -
- -
-
Auto
-
Non-Nested hint
- -